Merge pull request #1824 from PySimpleGUI/Dev-latest

Dev latest
This commit is contained in:
MikeTheWatchGuy 2019-08-16 19:06:18 -04:00 committed by GitHub
commit c8826bc9f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 11 deletions

View File

@ -34,14 +34,12 @@ sg.ChangeLookAndFeel('Black') # make it look cool
NUM_LINES = 48 # number of lines of text elements. Depends on cameras image size and the variable SC (scaller)
if USING_QT:
layout = [[sg.T(i, size_px=(800, 12), font=('Courier', font_size), key='_OUT_' + str(i))] for i in range(NUM_LINES)]
else:
layout = [[sg.T(i,size=(120,1), font=('Courier', font_size), pad=(0,0), key='_OUT_'+str(i))] for i in range(NUM_LINES)]
layout += [[ sg.Button('Exit', size=(5,1)),
sg.T('GCF', size=(4,1)), sg.Spin([round(i,2) for i in np.arange(0.1,20.0,0.1)], initial_value=1, key='_SPIN_GCF_', size=(5,1)),
sg.T('WCF', size=(4,1)), sg.Slider((1,4), resolution=.05, default_value=1.75, orientation='h', key='_SLIDER_WCF_', size=(15,15))
]]
sg.T('WCF', size=(4,1)), sg.Slider((1,4), resolution=.05, default_value=1.75, orientation='h', key='_SLIDER_WCF_', size=(15,15))]]
# create the window and show it without the plot
window = sg.Window('Demo Application - OpenCV Integration', layout, location=(800,400), font='Any 18')

View File

@ -1,5 +1,5 @@
#!/usr/bin/python3
version = __version__ = "4.2.0.5 Unreleased"
version = __version__ = "4.2.0.7 Unreleased"
# 888888ba .d88888b oo dP .88888. dP dP dP
@ -540,6 +540,7 @@ class Element():
self.Visible = visible
self.TKRightClickMenu = None
self.Widget = None # Set when creating window. Has the main tkinter widget for element
self.Tearoff = False
def _RightClickMenuCallback(self, event):
"""
@ -5934,7 +5935,9 @@ class Window:
def VisibilityChanged(self):
"""
Not used in tkinter, but supplied becuase it is used in Qt. Want to remain source code compatible
Not used in tkinter, but supplied becuase it is used in Qt. Want to remain source code compatible so that if
you are making this call in your PySimpleGUIQt code, you can switch to PySimpleGUI and it will not complain
about a missing method. Just know that in this version of PySimpleGUI, it does nothing
"""
# A dummy function. Needed in Qt but not tkinter
return
@ -10023,7 +10026,7 @@ def PopupError(*args, title=None, button_color=(None, None), background_color=No
:param location: (Default = (None))
"""
tbutton_color = DEFAULT_ERROR_BUTTON_COLOR if button_color == (None, None) else button_color
Popup(*args, title=title, button_type=POPUP_BUTTONS_ERROR, background_color=background_color, text_color=text_color,
return Popup(*args, title=title, button_type=POPUP_BUTTONS_ERROR, background_color=background_color, text_color=text_color,
non_blocking=non_blocking, icon=icon, line_width=line_width, button_color=tbutton_color,
auto_close=auto_close,
auto_close_duration=auto_close_duration, font=font, no_titlebar=no_titlebar, grab_anywhere=grab_anywhere,
@ -10034,8 +10037,8 @@ def PopupError(*args, title=None, button_color=(None, None), background_color=No
def PopupCancel(*args, title=None, button_color=None, background_color=None, text_color=None, auto_close=False,
auto_close_duration=None, non_blocking=False, icon=None, line_width=None, font=None,
no_titlebar=False, grab_anywhere=False, keep_on_top=False, location=(None, None)):
"""Display Popup with "cancelled" button text
:return:
"""
Display Popup with "cancelled" button text
:param *args:
:param title:
@ -10054,7 +10057,7 @@ def PopupCancel(*args, title=None, button_color=None, background_color=None, tex
:param location:
"""
Popup(*args, title=title, button_type=POPUP_BUTTONS_CANCELLED, background_color=background_color,
return Popup(*args, title=title, button_type=POPUP_BUTTONS_CANCELLED, background_color=background_color,
text_color=text_color,
non_blocking=non_blocking, icon=icon, line_width=line_width, button_color=button_color, auto_close=auto_close,
auto_close_duration=auto_close_duration, font=font, no_titlebar=no_titlebar, grab_anywhere=grab_anywhere,
@ -10084,7 +10087,7 @@ def PopupOK(*args, title=None, button_color=None, background_color=None, text_co
:param location: Location on screen to display
:param location:
"""
Popup(*args, title=title, button_type=POPUP_BUTTONS_OK, background_color=background_color, text_color=text_color,
return Popup(*args, title=title, button_type=POPUP_BUTTONS_OK, background_color=background_color, text_color=text_color,
non_blocking=non_blocking, icon=icon, line_width=line_width, button_color=button_color, auto_close=auto_close,
auto_close_duration=auto_close_duration, font=font, no_titlebar=no_titlebar, grab_anywhere=grab_anywhere,
keep_on_top=keep_on_top, location=location)
@ -10372,7 +10375,7 @@ def PopupAnimated(image_source, message=None, background_color=None, text_color=
grab_anywhere=True, keep_on_top=True, location=(None, None), alpha_channel=None,
time_between_frames=0, transparent_color=None):
"""
"Plays" an animated GIF file. This function has its own internal clocking meaning you can call it at any frequency
Show animation one frame at a time. This function has its own internal clocking meaning you can call it at any frequency
and the rate the frames of video is shown remains constant. Maybe your frames update every 30 ms but your
event loop is running every 10 ms. You don't have to worry about delaying, just call it every time through the
loop.