Added VStretch element. Removed vert parm from Stretch element. FIXED the upgrade from GitHub by creating an init file on the fly.
This commit is contained in:
parent
0d0b7588a0
commit
b13eec9263
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
|
|
||||||
version = __version__ = "4.46.0.19 Unreleased"
|
version = __version__ = "4.46.0.20 Unreleased"
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Changelog since 4.46.0 release to PyPI on 10 Aug 2021
|
Changelog since 4.46.0 release to PyPI on 10 Aug 2021
|
||||||
|
@ -52,6 +52,9 @@ version = __version__ = "4.46.0.19 Unreleased"
|
||||||
Changed the repr method of the user settings object to use the pretty printer to format the information into a nicer string
|
Changed the repr method of the user settings object to use the pretty printer to format the information into a nicer string
|
||||||
4.46.0.19
|
4.46.0.19
|
||||||
Added a vert parm to the Stretch element so that it's used in a vertical manner. MUCH easier to center things in windows now
|
Added a vert parm to the Stretch element so that it's used in a vertical manner. MUCH easier to center things in windows now
|
||||||
|
4.46.0.20
|
||||||
|
Added VStretch element that does the same as the Strech except in the vertical direction. Removed the vert parm from Stretch
|
||||||
|
Added fix for the upgrade from GitHub that now creates __init__.py file
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__version__ = version.split()[0] # For PEP 396 and PEP 345
|
__version__ = version.split()[0] # For PEP 396 and PEP 345
|
||||||
|
@ -8063,18 +8066,26 @@ class ErrorElement(Element):
|
||||||
# Stretch Element #
|
# Stretch Element #
|
||||||
# ---------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------- #
|
||||||
# This is for source code compatibility with tkinter version. No tkinter equivalent but you can fake it using a Text element that expands in the X direction
|
# This is for source code compatibility with tkinter version. No tkinter equivalent but you can fake it using a Text element that expands in the X direction
|
||||||
def Stretch(vert=False):
|
def Stretch():
|
||||||
"""
|
"""
|
||||||
Acts like a Stretch element found in the Qt port. Takes an optional parm that will change it into a vertical stretch.
|
Acts like a Stretch element found in the Qt port.
|
||||||
Normally used in a horizontl fashion. Placing one on each side of an element will enter the element.
|
Used in a Horizontal fashion. Placing one on each side of an element will enter the element.
|
||||||
:param vert: If True, then the stretch will be in the vertical direction instead of horizontal
|
Place one to the left and the element to the right will be right justified. See VStretch for vertical type
|
||||||
:type vert: (bool)
|
|
||||||
:return: (Text)
|
:return: (Text)
|
||||||
"""
|
"""
|
||||||
if not vert:
|
return Text(font='_ 1', pad=(0,0), expand_x=True)
|
||||||
return Text(font='_ 1', pad=(0,0), expand_x=True)
|
|
||||||
else:
|
|
||||||
return Text(font='_ 1', pad=(0,0), expand_y=True)
|
def VStretch():
|
||||||
|
"""
|
||||||
|
Acts like a Stretch element found in the Qt port.
|
||||||
|
Used in a Vertical fashion.
|
||||||
|
:return: (Text)
|
||||||
|
"""
|
||||||
|
return Text(font='_ 1', pad=(0,0), expand_y=True)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------- #
|
# ------------------------------------------------------------------------- #
|
||||||
# Window CLASS #
|
# Window CLASS #
|
||||||
|
@ -21037,7 +21048,11 @@ def _copy_files_from_github():
|
||||||
|
|
||||||
# create an __init__.py file
|
# create an __init__.py file
|
||||||
with open(os.path.join(path, '__init__.py'), 'w', encoding='utf-8') as f:
|
with open(os.path.join(path, '__init__.py'), 'w', encoding='utf-8') as f:
|
||||||
f.write('')
|
f.writelines([
|
||||||
|
'name="PySimpleGUI"\n',
|
||||||
|
'from .PySimpleGUI import *\n',
|
||||||
|
'from .PySimpleGUI import __version__'
|
||||||
|
])
|
||||||
|
|
||||||
# install the pysimplegui package from local dist
|
# install the pysimplegui package from local dist
|
||||||
# https://pip.pypa.io/en/stable/user_guide/?highlight=subprocess#using-pip-from-your-program
|
# https://pip.pypa.io/en/stable/user_guide/?highlight=subprocess#using-pip-from-your-program
|
||||||
|
|
Loading…
Reference in New Issue