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 3 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.

@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.

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.
Doing `versionAtLeast(0, 0, 0)` to check for the existence of libadw
and `versionAtLeast(1, 4, 0)` wherever tab overviews are used gets old
after a while. We consolidate all of these checks (except for one
unconfirmed bugfix) into easily readable functions so that maintainers
don't have to memorize which libadw version added which functionality.
@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.

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