From 0d6dbacd7d32ddac0af2ada47eb7ce54f7a01f49 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Tue, 15 Mar 2022 20:07:19 +1000 Subject: [PATCH] fill3: Don't show scrollbars when the scroll position is negative --- fill3/fill3/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fill3/fill3/__init__.py b/fill3/fill3/__init__.py index cd38891..3bf854a 100755 --- a/fill3/fill3/__init__.py +++ b/fill3/fill3/__init__.py @@ -314,8 +314,8 @@ class View: if full_width == 0 or full_height == 0: return self.portal.appearance_for(dimensions) x, y = self.portal.position - hide_scrollbar_vertical = self.hide_scrollbars and full_height <= height - hide_scrollbar_horizontal = self.hide_scrollbars and full_width <= width + hide_scrollbar_vertical = self.hide_scrollbars and (full_height <= height or y < 0) + hide_scrollbar_horizontal = self.hide_scrollbars and (full_width <= width or x < 0) if not hide_scrollbar_horizontal: full_width = max(full_width, x + width) self.horizontal_scrollbar.interval = (x / full_width, (x + width) / full_width)