GNOME Bugzilla – Bug 662334
Dark themes don't work well
Last modified: 2017-06-26 15:42:50 UTC
Hi, I've been checking out gnome-contacts, and while I like the app, it just doesn't play nice with my dark theme. Any dark theme I've tried has always had a white background in the contacts pane, and white text as well, because that is the color for dark themes. The rest of the app themes nicely.
The one theme that is relevant here is highcontrast-inverse, and gnome-contacts does in fact have several outright bugs in that theme.
The dark version of Adwaita also does this.
The lowcontrast theme also shows themability issues
Created attachment 200470 [details] [review] Patch to fix the css Sorry for the bad formatting in the name, but I'm a bit rusty with git's format-patch :P This fixes this bug for the most part, the X in a circle is prettymuch invisible ( At least, in adawata-dark ) but it's at least readable
Where do I apply this to check?
Thanks, I tried this patch, and it works great with most a11y themes. low contrast and highcontrast-inverse work flawlessly now. However, with highcontrast, the main page becomes all black, instead of black-on-white as is probably intended.
This isn't quite right The plan is to move all the custom css to the adwaita theme, as realistically it is adwaita specific. This will fix most of the issues with other themes, although there might be other issues hidden by this.
This bug is not fixed in gnome-contacts-3.6.0. Any news about this? Is there anything we can do to help?
(In reply to comment #8) > This bug is not fixed in gnome-contacts-3.6.0. Any news about this? Is there > anything we can do to help? You could talk to the theme developers about moving the CSS to Adwaita. CC'ing a couple of them now...
My plan was integrating in adwaita contacts css cleaning it up a bit, but I hit a nice performance bug which is blocking me, as soon as it gets sorted out (so I can actually try working on the theme for it w/o waiting for ages) I'll start once again.
(In reply to comment #10) > My plan was integrating in adwaita contacts css cleaning it up a bit, but I hit > a nice performance bug which is blocking me, as soon as it gets sorted out (so > I can actually try working on the theme for it w/o waiting for ages) I'll start > once again. Is that performance bug fixed in 3.8?
*** Bug 687012 has been marked as a duplicate of this bug. ***
*** Bug 697607 has been marked as a duplicate of this bug. ***
*** Bug 699051 has been marked as a duplicate of this bug. ***
Can confirm this bug in GNOME 3.10 - any news?
Yes, in GNOME 3.10 this bug is already present.
This bug continues on in Gnome 3.12. There seems to be no change in this bug in the last 2-3 versions of Gnome. It seems that Gnome-contacts is not as high traffic of an application as the others.
If someone wants to take this on, they will need to review what custom CSS there is for contacts, and work on Adwaita so that stock theme does everything we need it to.
I've made progress on this. This has landed on master here: https://git.gnome.org/browse/gnome-contacts/commit/?id=05cdb1cd6bd679a8d8db51e3869c5a833dba1063
*** Bug 734615 has been marked as a duplicate of this bug. ***
Review of attachment 200470 [details] [review]: CSS code has changed much since this patch was made
Created attachment 283423 [details] Address field fix I was working on this and found out that most of the issues are fixed upstream with the latest git build. The only thing I noticed so far is that in the contact editor the address & notes field don't use the default system theme. In the attachment is what I used to correct the issue for the address field, but I haven't figured out the notes field yet.
Can you format this patch properly against master? (In reply to comment #22) > Created an attachment (id=283423) [details] > Address field fix > > I was working on this and found out that most of the issues are fixed upstream > with the latest git build. > > The only thing I noticed so far is that in the contact editor the address & > notes field don't use the default system theme. > > In the attachment is what I used to correct the issue for the address field, > but I haven't figured out the notes field yet.
Created attachment 285978 [details] [review] Postal + Notes CSS fixes for Adwaita Dark I decided to try my hand at this. This includes a modified version of Cody's patch for postal addresses (borders and :focus seem to have since been added to master, so I omitted these), as well as a fix for Notes styled on the code for postal. Actually, the CSS is the same for .contacts-postal-entry and .contacts-text-entry (new CSS class in this patch); maybe it would make more sense to change .contacts-postal-entry to something more generic, and use that class for both? I'm leaving .contacts-text-entry as a separate class for now in case textboxes (notes) and textfields (postal) should be styled differently in GTK+, I've no experience there. This is my first patch, gotten by `git diff > patch.diff`. Please let me know if this isn't the proper way, thanks!
Hi David, not a maintainer of this project, just sharing the info since you asked: the correct way to make and share a patch is to create a commit in your local branch, and then you do git format-patch thecommit_or_serie_of_commits and it will spit out .patch files for you, with the correct authorship metadata. You can then attach that patch file to bugzilla and people can cherry-pick that into their tree and push it.
Created attachment 286140 [details] [review] postal, notes CSS take2 Jean-François, thank you! Attached is my (hopefully) correct patch. I was able to build this off master, and the postal and notes fields colors appear correctly on my Fedora 20 x86_64 machine (GNOME 3.12 copr), using both the default (light) Adwaita and dark Adwaita variants. After reviewing the .contacts-postal-entry code, I decided the :nth-child attribute won't probably make much sense for Notes, so I renamed my new CSS class from .contacts-text-entry to .contacts-notes-entry, to keep naming separate and schemes consistent.
(In reply to comment #26) > Created an attachment (id=286140) [details] [review] > postal, notes CSS take2 > > Jean-François, thank you! Attached is my (hopefully) correct patch. I was able > to build this off master, and the postal and notes fields colors appear > correctly on my Fedora 20 x86_64 machine (GNOME 3.12 copr), using both the > default (light) Adwaita and dark Adwaita variants. > > After reviewing the .contacts-postal-entry code, I decided the :nth-child > attribute won't probably make much sense for Notes, so I renamed my new CSS > class from .contacts-text-entry to .contacts-notes-entry, to keep naming > separate and schemes consistent. I'll review the patch, and hopefully, for 3.14.1 we will have it. Too late on the schedule for having in it now. Thxs for your work tho
Review of attachment 286140 [details] [review]: ::: data/ui/style.css @@ +86,3 @@ border-radius: 0 0 0 0; border-width: 1px 1px 0 1px; + background-color: @theme_base_color; Which background-color takes the entry by default? Since there's no hardcoded color specified, shouldn't the entry take the expected background-color? @@ +101,3 @@ + border-radius: 0 0 0 0; + border-width: 1px 1px 0 1px; + background-color: @theme_base_color; Same here
> Since there's no hardcoded color specified, shouldn't the entry > take the expected background-color? Huh, indeed. I upgraded to Fedora 21 alpha last night (GNOME 3.14), have only the official Fedora GNOME Contacts binary installed, and the colors appear correct for every field. This definitely wasn't the case when I built it a few weeks ago against Fedora 20's GTK 3.12---the background color for these fields was coming through as a bright white, with white-colored text when I entered contact details, which is to say: it was not remotely usable without specifying the background color as in the patch. I guess it came as part of the 3.14 theming / Adwaita improvements? Contacts 3.14 looks gorgeous. I've only tested with Adwaita's dark variant, but for Adwaita, I think this bug is finally resolved(!). :)
(In reply to comment #29) > > Since there's no hardcoded color specified, shouldn't the entry > > take the expected background-color? > > Huh, indeed. I upgraded to Fedora 21 alpha last night (GNOME 3.14), have only > the official Fedora GNOME Contacts binary installed, and the colors appear > correct for every field. This definitely wasn't the case when I built it a few > weeks ago against Fedora 20's GTK 3.12---the background color for these fields > was coming through as a bright white, with white-colored text when I entered > contact details, which is to say: it was not remotely usable without specifying > the background color as in the patch. I guess it came as part of the 3.14 > theming / Adwaita improvements? Contacts 3.14 looks gorgeous. > > I've only tested with Adwaita's dark variant, but for Adwaita, I think this bug > is finally resolved(!). :) Thxs, I would like some confirmation from Matthias and Allan before closing it
I think that you can safely close this old issue, Gnome-Contacts now works very well with Adwaita dark.
Indeed, I don't see any problems anymore with the dark theme. If anyone still has problems with the latest Contacts, please open a new bug.