Follow the system style, add a compact mode and show the 1-9 keys - #218
Open
geodro wants to merge 2 commits into
Open
Follow the system style, add a compact mode and show the 1-9 keys#218geodro wants to merge 2 commits into
geodro wants to merge 2 commits into
Conversation
Junction forced Adw.ColorScheme.FORCE_DARK and hardcoded its colors, so it was a dark window whatever the desktop asked for, and on a light style the labels and window controls turned dark-on-dark. Fixes sonnyp#96. Style: - The color scheme now defaults to "default", so libadwaita follows the org.freedesktop.appearance portal - color scheme, accent color and contrast. GNOME, KDE Plasma and others implement it. - A "Style" section in the menu (Follow System / Light / Dark) overrides it, stored in a new "color-scheme" key whose values match AdwColorScheme. - The hardcoded #353433, #1e1e1e, white and black are replaced with @popover_bg_color, @view_bg_color, @borders and @accent_*, so light, dark and high contrast all render correctly. - The focused tile is tinted with the accent color instead of a fixed white wash that was invisible on light backgrounds. - "Test Junction" in the welcome window no longer forces white text, which was invisible on a light background. Compact mode: - A "Compact Mode" menu toggle backed by a new "compact" key shrinks icons (92 -> 48), tiles (134 -> 80), padding and the window (772x218 -> 560x140). - Compact tiles are icons only whatever "Show App Names" says - a name ellipsizes to uselessness under an 80px tile. The name stays in the tooltip. Keyboard: - Each of the first nine tiles now shows the digit that opens it. The shortcut already existed but was only discoverable from the Keyboard Shortcuts window, and compact mode hides names entirely. - 1-9 on the numeric keypad work too, not just the number row.
Both MenuButtons pointed at a single shared PopoverMenu instance. A GtkPopover can only have one parent, so GTK reparented it and logged gtk_widget_set_parent criticals on every launch. The visible symptoms were a stray arrow pointing at the hidden header button, and the menu opening on its own. Using menu-model: on each button gives each one a correctly parented popover built from the same GMenu, and the criticals go away. Compact mode, after trying it on a real desktop: - Icons 48 -> 64 and tiles 80px, so the tile hugs the icon instead of leaving 16px of dead space around it. The folder icon follows, 24 -> 32. - Window corner radius 30px -> 18px when compact. 30px is a big bite out of a 140px tall window, and the curve cut into the first tile.
geodro
marked this pull request as ready for review
July 27, 2026 12:04
sonnyp
reviewed
Aug 2, 2026
sonnyp
left a comment
Owner
There was a problem hiding this comment.
Hello,
Thank you, please split this into
- One popover per menu button
- Follow system theme
For now and we'll look at 1-9 and compact mode afterwards.
This was referenced Aug 4, 2026
Author
|
Done, split as requested:
I'll keep this branch around for the compact mode and 1-9 keys work to revisit afterwards — let me know if you'd rather I close this PR in the meantime. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Junction called
set_color_scheme(FORCE_DARK)and hardcoded#353433/#1e1e1e/white/blackinstyle.css. On a light desktop the window stayed dark but libadwaita flipped the foreground colors, so the app labels and the window controls became dark-on-dark. Fixes #96.These are separable changes on one branch, and I am happy to split them into separate PRs if you'd prefer.
Follow the system style
default, so libadwaita follows theorg.freedesktop.appearanceportal: color scheme, accent color and contrast. GNOME, KDE Plasma and others implement it.color-schemekey whose values matchAdwColorSchemeso they can be passed straight toset_color_scheme.@popover_bg_color,@view_bg_color,@bordersand@accent_*.@popover_bg_coloris within a shade of the old#353433in dark, and gives a sane light appearance.alpha(white, 0.3), which was invisible on light backgrounds..welcome button.linkno longer forces white text, which was invisible on a light background.prefers-contrast: moreblock thickens the entry border and focus ring.One popover per menu button
Both
MenuButtons pointed at a single sharedPopoverMenuinstance. AGtkPopovercan only have one parent, so GTK reparented it and loggedgtk_widget_set_parentcriticals on every launch. On Plasma the visible symptoms were a stray arrow pointing at the hidden header button, and the menu opening by itself. Each button now usesmenu-model:and gets its own correctly parented popover from the sameGMenu. The criticals go from one per launch to zero.This one is independent of the theming work and could land on its own.
Compact mode
compactkey: icons 92 to 64, tiles 134 to 80, tighter padding, window 772x218 to 560x140, and the window corner radius 30px to 18px because 30px cuts into the first tile at that height.Show the 1-9 keys
getButtonForKeyvalnow also acceptsKP_0toKP_9, so the numeric keypad works and not just the number row.