Theme: use other exported colors

Bug #1862056 reported by Frederik Feichtmeier
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gnome-software (Ubuntu)
Fix Released
Undecided
Robert Ancell

Bug Description

Adwaita and Yaru both export colors at the top of their CSS file from within this source files:
https://gitlab.gnome.org/GNOME/gtk/blob/master/gtk/theme/Adwaita/_colors-public.scss#L84
https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-24/gtk/theme/Adwaita/_colors-public.scss

gnome-software uses some of those colors in their in-app CSS that overwrites the global gtk theme:
https://gitlab.gnome.org/GNOME/gnome-software/blob/master/src/gtk-style.css

Most likely those are the correct colors. In three cases sadly not and it is too late to get an upstream change for 20.04 now because gnome is already in UI freeze for this cycle:

1) The round checkmarks inside the App boxes that show that the app is installed are orange instead of green, which is semantically wrong since they are not selected and should instead show that you successfully installed that app:

https://gitlab.gnome.org/GNOME/gnome-software/blob/master/src/gtk-style.css#L12
Change
.installed-icon {
 color: @theme_selected_bg_color;
}
to
.installed-icon {
 color: @success_color;
}
https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-24/gtk/theme/Adwaita/_colors-public.scss#L84
-> exported to: https://gitlab.gnome.org/GNOME/gtk/blob/gtk-3-24/gtk/theme/Adwaita/gtk-contained.css#L2021

2) The little [1] boxes inside the "stackswitcher" in the headerbar (it's actually a buttonbox in this case, but this is offtopic) that show up if you are either installing X apps or have X updates would be orange, if we would not "hack" a biiiig box-shadow over them to make them green. This is first of all a dirty hack and secondly there are little orange pixels showing up at the rounding
Change
.counter-label {
 ...
 ...
 background-color: mix(@theme_selected_bg_color, @theme_selected_fg_color, 0.3);
 ...
 ...
 ...
}

To
.counter-label {
 ...
 ...
 background-color: @success_color;
 ...
 ...
 ...
}
https://gitlab.gnome.org/GNOME/gnome-software/blob/master/src/gtk-style.css#L422

3) The "given" stars are not visible in both Adwaita and Yaru dark. For some reason, upstream transparentizes them into oblivion with the "shade-function". The enabled stars should just use the theme's fg color:
Change
.star-enabled,
.star-enabled:disabled {
 color: shade(@theme_fg_color, 0.8);
}
to
.star-enabled,
.star-enabled:disabled {
 color: @theme_fg_color;
}
https://gitlab.gnome.org/GNOME/gnome-software/blob/master/src/gtk-style.css#L412

Thank you very much in advance! I try to get this into gnome-shell's upstream repo in the next cycle

Tags: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-software (Ubuntu):
status: New → Confirmed
Revision history for this message
Frederik Feichtmeier (feichtmeier) wrote :

Here is a patch, I hope this works :)

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "gnome_software_css_ubuntu_theme.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Frederik - can you propose these changes upstream now? Even though may not land, they're worth discussing now to confirm they are correct. It's also not too hard to get a freeze exception if the change is obviously correct.

Changed in gnome-software (Ubuntu):
assignee: nobody → Robert Ancell (robert-ancell)
status: Confirmed → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-software - 3.35.2-0ubuntu2

---------------
gnome-software (3.35.2-0ubuntu2) focal; urgency=medium

  * d/p/0029-Fix-CSS-colors-to-work-correctly-with-Yaru-Adwaita.patch:
    - Use theme exported colors (LP: #1862056)
  * d/p/0001-GsApp-Add-a-new-do-not-auto-update-quirk.patch:
  * d/p/0002-fwupd-Use-new-GS_APP_QUIRK_DO_NOT_AUTO_UPDATE.patch:
  * d/p/0003-snap-Stop-snaps-from-being-automatically-updated.patch:
    - Stop snaps being automatically updated (LP: #1862158)

 -- Robert Ancell <email address hidden> Tue, 11 Feb 2020 12:07:52 +1300

Changed in gnome-software (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Frederik Feichtmeier (feichtmeier) wrote :

Hey! Awesome it got fixed to fast, just received the update in 20.04 daily :) Cheers!

I will try to get this into upstream, since it makes more sense for them too!

Revision history for this message
Frederik Feichtmeier (feichtmeier) wrote :
Revision history for this message
Frederik Feichtmeier (feichtmeier) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.