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

Theme GTK3/4 window controls to match COSMIC theme #464

Merged
merged 26 commits into from
May 28, 2024
Merged

Theme GTK3/4 window controls to match COSMIC theme #464

merged 26 commits into from
May 28, 2024

Conversation

nabrious0
Copy link
Contributor

This PR relies on the COSMIC GTK3/4 theming feature and extends it to also theme window control buttons

(This covers colors, hover background color, window active/inactive state colors, transitions (animations) and more...)

Examples below ( ↓ )

Eddy - GTK3 (Light/Dark)
image
image

Flatseal - GTK4|libadwaita (Light/Dark)
image
image

Main Menu - GTK4|libadwaita (Light/Dark)
image
image

Nautilus (GNOME Files) - GTK3 (Light/Dark)
image
image

@mmstick
Copy link
Member

mmstick commented May 25, 2024

Is it possible to make all icons in the header bar match the accent color?

@nabrious0
Copy link
Contributor Author

Is it possible to make all icons in the header bar match the accent color?

Haven't looked into it but I'm 99.99% sure it's possible, I'll check and report back.

@nabrious0
Copy link
Contributor Author

Is it possible to make all icons in the header bar match the accent color?

image

Yup, it is.

@nabrious0
Copy link
Contributor Author

Here are updated screenshots to include the colored icons:

Main Menu - GTK4|libadwaita
image
image

Flatseal - GTK4|libadwaita
image
image

Nautilus (GNOME Files) - GTK3
image
image

@mmstick
Copy link
Member

mmstick commented May 25, 2024

I see that some icons still aren't being colored correctly, but that's closer to our designs than before. All icons in the header bar should have the accent color whenever a window is focused, and then an inactive grey color when the window is unfocused. I'm not sure if it's possible to change the color based on window focus status in GTK.

@nabrious0
Copy link
Contributor Author

nabrious0 commented May 25, 2024

I see that some icons still aren't being colored correctly, but that's closer to our designs than before. All icons in the header bar should have the accent color whenever a window is focused, and then an inactive grey color when the window is unfocused. I'm not sure if it's possible to change the color based on window focus status in GTK.

It is possible, on libadwaita that is .selector:backdrop {} and I already do that for libadwaita on GTK3 I have yet to find the selector.

@nabrious0
Copy link
Contributor Author

Some updates, here's Geary
image

Updated Nautilus screenshot with all icons colored (pathbar left out on purpose)
image

@mmstick mmstick requested a review from wash2 May 27, 2024 21:19
@nabrious0
Copy link
Contributor Author

nabrious0 commented May 27, 2024

Colors even more icons according to accent color, and makes them all gray when a window is inactive (currently exclusive to libadwaita)

Also, sets window corner radius to '6px' like COSMIC applications

image
image

@git-f0x
Copy link
Contributor

git-f0x commented May 27, 2024

Just a note: afaik COSMIC apps use either 8px (Round, Slightly Round) or 2px (Square) window corner radius, at least from looking at the config in Settings.

@nabrious0
Copy link
Contributor Author

Just a note: afaik COSMIC apps use either 8px (Round, Slightly Round) or 2px (Square) window corner radius, at least from looking at the config in Settings.

Huh interesting, cause after setting it to 6px and putting a COSMIC app and libadwaita app on top of each other, they seemed to perfectly match, I'll double check.

Copy link
Contributor

@wash2 wash2 left a comment

Choose a reason for hiding this comment

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

This looks great! I've just suggested a couple small changes.

cosmic-theme/src/output/gtk4_output.rs Outdated Show resolved Hide resolved
cosmic-theme/src/output/gtk4_output.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@wash2 wash2 left a comment

Choose a reason for hiding this comment

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

I applied the suggestions.

@nabrious0
Copy link
Contributor Author

Awesome! I didn't even know getting the real border radii was possible, thanks!

@wash2 wash2 merged commit 9f017de into pop-os:master May 28, 2024
11 checks passed
wash2 added a commit that referenced this pull request Jun 14, 2024
mmstick pushed a commit that referenced this pull request Jun 14, 2024
@iamkartiknayak
Copy link

Will this ever be reinstated?

@jackpot51
Copy link
Member

No, we cannot reinstate this.

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.

6 participants