After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 755476 - rendering of GdTaggedEntry tags is broken
rendering of GdTaggedEntry tags is broken
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Themes
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-09-23 16:14 UTC by Matthias Clasen
Modified: 2015-09-25 10:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fixable (56.67 KB, image/png)
2015-09-23 20:28 UTC, Matthias Clasen
Details

Description Matthias Clasen 2015-09-23 16:14:58 UTC
After recent changes in libgd, the tags are essentially invisible (dark-on-dark, or white-on-white). Affect apps include at least: gnome-music, gnome-documents, gnome-photos, totem.
Comment 1 Lapo Calamandrei 2015-09-23 16:20:21 UTC
IF the tag behaves I can quickly fix that in adwaita, anyway it's an alien lib, I was told (by, uhm, you actually :)) not to stick non GTK+ stuff in adwaita (see floating status bar, to name one), shall we change that policy?
Comment 2 Matthias Clasen 2015-09-23 20:28:21 UTC
Created attachment 311980 [details]
fixable
Comment 3 Matthias Clasen 2015-09-23 20:28:55 UTC
the rendering is fixable if applications agree on style classes to set on the tags
Comment 4 Matthias Clasen 2015-09-23 20:36:35 UTC
... or set their own style classes and provide their own css.
Comment 5 Lapo Calamandrei 2015-09-23 20:59:40 UTC
The current issue is caused by the entry background being inherited by the tag and not being reset by the app shipped css ('background-image: none;' should suffice), so I can't really fix this in adwaita without at least a style class, say 'tag', working all over the place (which could be set by libgd, I guess).
I can assume that 'documents-entry-tag' is what apps are using.
ATM Adwaita doesn't provide style for that tag at all.
Comment 6 Matthias Clasen 2015-09-23 23:07:52 UTC
None of the users of GdTaggedEntry that I've looked at seems to be setting any style class on their tags, currently. Indeed, just having  libgd provide a tag class should be an easy solution.
Comment 7 Matthias Clasen 2015-09-23 23:11:10 UTC
Oh, I'm wrong. There is a default style class, and it is as you say: documents-entry-tag
Comment 8 Lapo Calamandrei 2015-09-24 12:31:10 UTC
So what shall we do? Ask apps to fix their stuff or fix this generally in Adwaita?
That styleclass is pretty ugly anyway, I'd really prefer something generic (say 'tag') in Adwaita, whatever we do would probably require apps to modify their shipped css.
A proper general solution would require some thinkering though, I think everything sporting the GdTaggedEntry at the moment just use a blue tag, since differntly coloured tags actually makes sense we should probably consider that somehow. It would be nice to have libgd hackers opinions also.
Comment 9 Matthias Clasen 2015-09-24 14:36:05 UTC
not sure what you mean with 'at the moment'. As my screenshot shows, at the moment everything sporting GdTaggedEntry is broken...

There's no such thing as "libgd hackers", really

Anyway, if you want my opinion: Please add some minimal styling to Adwaita so that the default style class looks non-broken. If apps want to use their own style classes, they will have to use their own css.
Comment 10 Lapo Calamandrei 2015-09-24 15:15:45 UTC
Apps are already uaing their own styling, that styling is broken though.
Comment 11 Lapo Calamandrei 2015-09-24 15:20:39 UTC
So to summarize, I can push their fix in adwaita, but I don't like that much. I'd prefer to directly move the entry tag styling in adwaita doing things properly.
Comment 12 Cosimo Cecchi 2015-09-24 16:28:13 UTC
IMO if we move the style to Adwaita, we should have the widget (or the tags feature) in GTK proper.
Until then, my suggestion is to add the CSS snippet directly to every application that needs it.
Comment 13 Matthias Clasen 2015-09-24 19:41:31 UTC
alright then, you get to fix all the apps... can we at least put a suitable css snipplet in libgd for apps to copy ?
Comment 14 Lapo Calamandrei 2015-09-24 20:46:24 UTC
I think you got Cosimo wrong, I'm pretty sure he meant he's going to implement the tag in the the entry in gtk+ properly
Comment 15 Matthias Clasen 2015-09-24 20:57:52 UTC
that is not an easy thing to do, and not a fix that will give us readable tags in 3.18.1
Comment 16 Cosimo Cecchi 2015-09-24 22:36:38 UTC
Lapo, to be clear what I meant is that we should implement the tag in the entry for 3.20, but patch affected apps for 3.18.1.

I just pushed a fix to gnome-documents. This was happening there because since https://git.gnome.org/browse/libgd/commit/?id=7e0dd4b15ea80673f62249ac092763b10fc226ad the entry's context will be reused. Since the entry specifies a background-image, the style should first remove it, or the background color will not be applied: https://git.gnome.org/browse/gnome-documents/commit/?id=178fc7a285f942a7f5a58ba17882de880bf610d6

I will look at other the applications mentioned in comment#0 if they need a similar treatment.
Comment 17 Cosimo Cecchi 2015-09-24 23:05:07 UTC
Filed https://bugzilla.gnome.org/show_bug.cgi?id=755600 for gnome-photos and https://bugzilla.gnome.org/show_bug.cgi?id=755601 for gnome-music.
Totem is crashing for me at startup so I could not test there.

I also added an example CSS to libgd to theme the entry.
Since libgd is a library without an initialization method it would be a bit hard to make sure the style is added automatically. I think I'd rather spend that time adding this feature to GtkEntry.

I think this bug could be closed, now that we've determined that there is no bug in GTK.
Comment 18 Lapo Calamandrei 2015-09-24 23:57:41 UTC
Yay, thanks Cosimo!