Closed asztalosdani closed 1 year ago
I think theme should receive a parameter named center_ignore_scrollbar_thickness
. The problem here is that when computing the position, if the menu overflows, then the thickness of the scrollbars is added. Hence, the widgets are centered concerning their scrollarea, but not regarding the window. This value must be False
for backward-compatibility reasons.
Yes, that should do it!
Fixed in #449. Let me know if this solves your issue 👯
Yes, it works, thanks!
Version v4.3.7
uploaded to pip!
Environment information Describe your environment information, such as:
Describe the bug I would like to center the menu items even when there is a scrollbar. (I added the red line in paint to visualize the center)
To Reproduce
Expected behavior Center the items, or at least give me an option to toggle this behaviour.
Additional context The reason is, I'm creating an application to be run on a Raspberry Pi on a 320x240 tft screen, with a few physical buttons below it, so you clearly see where is the center of the screen, and that the menu items are off-center. But even if you don't have a tiny screen, if you have a main menu with a few items, so without a scrollbar -> centered, then a submenu with more items so with a scrollbar -> off-center, and you switch between them, the jump is noticable.