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

gtk: apply all window appearance changes in syncAppearance #5404

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pluiedev
Copy link
Contributor

@pluiedev pluiedev commented Jan 28, 2025

The GTK side of appearance code is kind of a mess with several different functions all having the responsibility of interacting with each other and setting the appropriate window appearance. It should solely be the responsibility of the syncAppearance function to apply appearance changes, with other callbacks/functions calling it instead: much like what we already do for the macOS apprt.

I also took the time to refactor the libadwaita version checks since calling versionAtLeast(0, 0, 0) does get old after a while. Now almost all checks are given human-readable names and contributors need not memorize what the relevant version checks all are. Moved to another PR

@pluiedev pluiedev force-pushed the push-oqozzwxyltut branch 2 times, most recently from c8b3cc0 to 12104f4 Compare January 28, 2025 08:42
@mitchellh
Copy link
Contributor

Just a note that just to be extra safe I'm going to push this after the 1.1 release.

@pluiedev
Copy link
Contributor Author

Just a note that just to be extra safe I'm going to push this after the 1.1 release.

On Discord I've seen a bunch of bugs now that can be fixed by calling syncAppearance more regularly and in more places, and I think it'd be great if this can be part of 1.1.1. I can move the Adwaita refactors to another PR.

@pluiedev pluiedev force-pushed the push-oqozzwxyltut branch 3 times, most recently from 58b66ab to b68bf08 Compare February 5, 2025 09:29
The GTK side of appearance code is kind of a mess with several different
functions all having the responsibility of interacting with each other
and setting the appropriate window appearance. It should solely be the
responsibility of the `syncAppearance` function to apply appearance
changes, with other callbacks/functions calling it instead: much like
what we already do for the macOS apprt.
Several keys are now able to affect existing windows (especially
window-decoration, whose config documentation got a greater overhaul)
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