Skip to content

Commit

Permalink
[Listbox.py] fix scrollbar behaviour
Browse files Browse the repository at this point in the history
When scrollbarMode="showNever" the scrollbar did not show when going deeper in the menu but appeared when exiting each level.

(cherry picked from commit a6a090bafb5fc4faf4f73f60bcfe7b096197ad5d)
  • Loading branch information
Huevos committed Mar 18, 2023
1 parent 6389749 commit 5121ff0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/python/Components/Renderer/Listbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ def postWidgetCreate(self, instance):
instance.selectionChanged.get().append(self.selectionChanged)
self.wrap_around = self.wrap_around # trigger
self.selection_enabled = self.selection_enabled # trigger
for (attrib, value) in self.skinAttributes:
if attrib == "scrollbarMode":
self.__scrollbarMode = value
self.scrollbarMode = self.scrollbarMode # trigger

def preWidgetRemove(self, instance):
Expand Down Expand Up @@ -95,7 +98,9 @@ def changed(self, what):
if hasattr(self.source, "selectionEnabled"):
self.selection_enabled = self.source.selectionEnabled
if hasattr(self.source, "scrollbarMode"):
self.scrollbarMode = self.source.scrollbarMode
for (attrib, value) in self.skinAttributes:
if attrib == "scrollbarMode":
self.scrollbarMode = value
if len(what) > 1 and isinstance(what[1], str) and what[1] == "style":
return
if self.content:
Expand Down

0 comments on commit 5121ff0

Please sign in to comment.