Akascape / CTkMenuBar

Modern menu/tool bar widget library for customtkinter. (extension/add-on)
Creative Commons Zero v1.0 Universal
111 stars 9 forks source link

Horizontal menu spacing between 'CustomDropdownMenu' and 'add_submenu' is large #13

Closed matthew-efseaff closed 8 months ago

matthew-efseaff commented 8 months ago

The horizontal spacing between a 'CustomDropdownMenu' and an 'add_submenu' is larger than I'd like it to be. Is there a way to shrink this distance down? Thank you

Menu_spacing

Akascape commented 8 months ago

@matthew-efseaff Try padx value in negative

matthew-efseaff commented 8 months ago

@matthew-efseaff Try padx value in negative

The code below shifts the main menu left (relative to parent 'Settings', compare with original image above) but does nothing to close the gap between menu and submenu. self.drop_menu_settings = CustomDropdownMenu(widget=self.menu_bar_settings, padx=-15)

Menu_spacing2

Where else can I try? padx isn't recognized as an option anywhere else (add_submenu, add_option...) Thank you

Akascape commented 8 months ago

@matthew-efseaff Is your display not scaled to 100%, maybe it's a scaling issue. You can deactivate scaling in customtkinter.

VillainousSsnake commented 7 months ago

@matthew-efseaff Is your display not scaled to 100%, maybe it's a scaling issue. You can deactivate scaling in customtkinter.

How would I fix the spacing without deactivating the scaling awareness? I'm having the same problem and if I turn the scaling awareness off it makes my application's title bar widgets look very small.

Heres an example: image

Akascape commented 7 months ago

@VillainousSsnake Will fix it soon

matthew-efseaff commented 7 months ago

Once scaling awareness is turned off (or left on) using: customtkinter.deactivate_automatic_dpi_awareness() further calls to change the scaling like below:

customtkinter.set_widget_scaling(float_value)  # widget dimensions and text size
customtkinter.set_window_scaling(float_value)  # window geometry dimensions

cause the horizontal spacing of CustomDropdownMenu and the add_submenu to behave poorly. 75 125

VillainousSsnake commented 7 months ago

@VillainousSsnake Will fix it soon

Thank you!

Akascape commented 7 months ago

@VillainousSsnake @matthew-efseaff Now no need to deactivate scaling, I have fixed this, update to the latest version.