Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xlet-settings.py: Ensure settings window expands to fit toolbar #11910

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

fredcw
Copy link
Contributor

@fredcw fredcw commented Oct 30, 2023

Fix bug where toolbar disappears if the window is too narrow.

As the settings window Toolbar only contains one ToolItem, this ToolItem can disappear if the window is too narrow and Toolbar:show-arrow property is set to true. Set Toolbar:show-arrow to false to ensure that the window will expand to accommodate the full width of the Toolbar.

ref. linuxmint/cinnamon-spices-applets#5065

As the settings window Toolbar only contains one ToolItem, this ToolItem can disappear if the window is too narrow and Toolbar:show-arrow property is set to true. Set Toolbar:show-arrow to false to ensure that the window will expand to accommodate the full width of the Toolbar.
@claudiux
Copy link
Member

claudiux commented Oct 30, 2023

This seems to work fine. What happens when, due to translation, the width of the toolbar becomes greater than that of the desktop?
It would be cool if you could create several toolbars when the number of buttons prevents you from displaying them all in a single toolbar.

@fredcw
Copy link
Contributor Author

fredcw commented Oct 30, 2023

What happens when, due to translation, the width of the toolbar becomes greater than that of the desktop?

The window just becomes wider than the desktop so that you'll have to drag the window to see all of it. Better than the toolbar disappearing though I guess.

It would be cool if you could create several toolbars when the number of buttons...

Yes, you'd think that the Gtk.StackSwitcher widget would do that automatically but it doesn't. Using two stackswitchers, one above the other, I think would look a bit odd though as they'd look separate from each other. An alternative is to detect if the stackswitcher is too wide and if so, make it a vertical switcher at the side of the window. In any case, it's easier to just make sure that applet configs don't use too many tabs.

@claudiux
Copy link
Member

You're right.

@claudiux claudiux merged commit 3a376e8 into linuxmint:master Oct 30, 2023
4 checks passed
@fredcw fredcw deleted the settings_toolbar branch October 30, 2023 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants