FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Merge pull request #4236 from PySimpleGUI/Dev-latest · gitrymt/PySimpleGUI@d6a4769 · GitHub

Commit d6a4769

Browse files
authored
Merge pull request PySimpleGUI#4236 from PySimpleGUI/Dev-latest
Fix for scrollable column still scrolling despite contents being smal…
2 parents 91f6e90 + 48530f1 commit d6a4769

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import cv2, PySimpleGUI as sg
2-
window, cap = sg.Window('Demo Application - OpenCV Integration', [[sg.Image(filename='', key='image')], ], location=(800, 400)), cv2.VideoCapture(0)
2+
window, cap = sg.Window('Demo Application - OpenCV Integration', [[sg.Image(key='-IMAGE-')], ], location=(800, 400)), cv2.VideoCapture(0)
33
while window(timeout=20)[0] is not None:
4-
window['image'](data=cv2.imencode('.png', cap.read()[1])[1].tobytes())
4+
window['-IMAGE-'](data=cv2.imencode('.png', cap.read()[1])[1].tobytes())

‎PySimpleGUI.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/python3
2-
version = __version__ = "4.40.0 Released 26-Apr-2021"
2+
version = __version__ = "4.40.0.1 Unreleased\nFix for scrollable Column showing can be scrolled when the contents are actually smaller"
33

44
__version__ = version.split()[0] # For PEP 396 and PEP 345
55

@@ -6283,6 +6283,8 @@ def resize_frame(self, e):
62836283
self.canvas.itemconfig(self.frame_id, height=e.height, width=e.width)
62846284

62856285
def yscroll(self, event):
6286+
if self.canvas.yview() == (0.0, 1.0):
6287+
return
62866288
if event.num == 5 or event.delta < 0:
62876289
self.canvas.yview_scroll(1, "unit")
62886290
elif event.num == 4 or event.delta > 0:

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL