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

Styles: Gtk4 prep #379

Merged
merged 4 commits into from Feb 28, 2024
Merged

Styles: Gtk4 prep #379

merged 4 commits into from Feb 28, 2024

Conversation

danirabbit
Copy link
Member

In latest GTK 4, the only non-deprecated use of StyleContext is to set a provider for the whole screen. Since we have a finite number of monitor colors, we really don't need to generate this CSS. Instead we can just have a set number of color style classes and then assign a style class to each display widget.

  • Set the CSS name of display widgets
  • Create color-number classes with predefined styles
  • Tiny style stuff, make the label slightly bolder, give the widget a little rounded corner, clear icon palette to improve contrast of star icons
  • Add one style provider to the screen, not to each widget for each color

@danirabbit danirabbit requested a review from a team February 22, 2024 21:47
@danirabbit danirabbit mentioned this pull request Feb 24, 2024
data/Display.css Outdated Show resolved Hide resolved
Copy link
Collaborator

@jeremypw jeremypw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This results in an extra terminal warning about -gtk-icon-pallete' is not a valid property name but the plug nevertheless appears and operates as normal. I assume this is due to a version issue that will go away in Gtk4?

Made a comment about a possible typo in the css.

@danirabbit
Copy link
Member Author

@jeremypw sorry about that! Fixed the typos and cleared the warnings. Dunno how I missed that 😬

@jeremypw jeremypw merged commit f761b3c into master Feb 28, 2024
4 checks passed
@jeremypw jeremypw deleted the danirabbit/css-gtk4prep branch February 28, 2024 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants