Akascape / CTkListbox

A simple listbox for customtkinter (extenstion/add-on)
MIT License
153 stars 13 forks source link

scroll bar alignment issue #16

Closed rmills closed 11 months ago

rmills commented 1 year ago

I don't have an easy way to test across OS's but at least for me on windows the scroll bar is aligned a few pixels too far right and covers the border slightly. Tested across 3 windows installs and all have the same alignment issue. It's easy enough to adjust in the class but I'm hesitant to send a pull request as this could be something on my end or intentional style choice.

Example: https://imgur.com/a/U7HdiOg

A simple offset works but should probably be based on the scroll bar width:

self._scrollbar.grid_configure(padx=(0,border_width + 4))
self._scrollbar.configure(width=12)

Example:

scroll_bar_width = 12
scroll_bar_offset = (border_width + scroll_bar_width) - 8  # 8 is whatever the default border offset would be
self._scrollbar.grid_configure(padx=(0, scroll_bar_offset))
self._scrollbar.configure(width=scroll_bar_width)