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 778180 - CSS property for background of new mail in the message list
CSS property for background of new mail in the message list
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
3.22.x (obsolete)
Other Linux
: Normal enhancement
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
: 733496 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-02-04 17:29 UTC by Prometheus
Modified: 2019-12-10 08:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Prometheus 2017-02-04 17:29:56 UTC
If someone selects a dark them then when a new message arrives it is hard to distinguish it as one has to figure it out only from the icon. An option for changing the background for a new message in the message list would really help.
Comment 1 Milan Crha 2017-02-07 10:12:18 UTC
Thanks for a bug report. I agree the bold font is not that easy to spot with a dark theme. What would be the background color you want to use, please? The row currently has these states:
  - odd row
  - even row
  - selected & focused
  - selected & unfocused

Thus there might be added some sort of

  - marked

background for unread mail. Either an option with exact color (in GSettings only) would be added or it can be made a CSS property, thus could be configured from outside.
Comment 2 Prometheus 2017-02-07 10:55:43 UTC
(In reply to Milan Crha from comment #1)
> Thus there might be added some sort of
> 
>   - marked
> 
> background for unread mail. Either an option with exact color (in GSettings
> only) would be added or it can be made a CSS property, thus could be
> configured from outside.

Thanks Milan for responding and most of all for your time, I really appreciate your work.

I agree with you for a new setting. If it could be configured with dconf it probably would be better than putting it in a CSS file where everyone would have to start looking.

Regarding the color, I color-picked the current selection color and it is in RGB: 33 87 143 (HTML: 21578f). After doing some research on the web and trying the colors, I think that the color RGB:18 135 168 (HTML: 1287a8) is a good solution of a pre-configured value. I don't know if it is possible to put two pre-configured values for user selection (sorry I am not familiar with gsettings).
Comment 3 Milan Crha 2017-02-07 13:19:49 UTC
There's always only one default. And to have it backward compatible I would set no background color anyway.

I've been looking on this meanwhile and I decided to use the CSS (I'm sorry), also because it's more about theming the message list. With the changes below you can edit

    ~/.config/gtk-3.0/gtk.css

and write there something like:

MessageList,* {
        -MessageList-new-mail-bg-color: orange;
}

or better in your case, instead of "orange", "rgb(18,135,168)" or "#12878a" (quotes for clarity only). There is no foreground color, thus use with cautious. I also made the background used only if the row is not selected, which is correct, from my point of view.

Created commit c0c0630 in evo master (3.23.90+)
Comment 4 Milan Crha 2018-10-25 14:23:47 UTC
*** Bug 733496 has been marked as a duplicate of this bug. ***
Comment 5 Steven Bakker 2018-10-26 08:39:18 UTC
Funny you should mention that, "there is no foreground color." I was actually hoping for a configurable FG color, rather than BG. Still, I'm not the one coding this, so I'm not complaining. BG will work fine for me as well. ;-)

Cheers,
Steven
Comment 6 Milan Crha 2018-10-26 11:02:52 UTC
You can influence the foreground color with filters, by setting a label or a direct color value. It's not removed once the message is marked as read, but the idea was that if the foreground can be changed this way, then it might make a bit more sense to rather change the background color. I'm not saying it's the best option, though.
Comment 7 Milan Crha 2018-10-26 11:03:12 UTC
s/option/choice/
Comment 8 B Jones 2019-12-09 21:48:39 UTC
(In reply to Milan Crha from comment #3)
> MessageList,* {
>         -MessageList-new-mail-bg-color: orange;
> }

Milan, I'd like to do something similar with the folder (tree) view. It's difficult to distinguish at a glance which folders are bold to indicate new items (when using a dark theme).

I'd like to either change the font colour or size, or change the background colour for those folders which contain new items. Is this possible via CSS? I struggled to find the correct selector and rule (side question, how are these elements discoverable?).

Thanks in advance.
Comment 9 Milan Crha 2019-12-10 08:24:03 UTC
(In reply to B Jones from comment #8)
> I'd like to do something similar with the folder (tree) view.

There's no style property for the folder tree, it's "slightly" extended standard GtkTreeView. It has some style properties [1], but nothing for what you want, I think.

> (side question, how are these elements discoverable?).

Either in the code, or gtk+ provides debugging window, where can be seen many things, including widget structure. It's required to enable it first. Try to search for "gtk inspector", it may give some results.

With respect of the gtk+ CSS selectors, I'm quite confused with them too, it's one reason why the part of the CSS code you quoted contains the '*', which means "apply to everything".

[1] https://developer.gnome.org/gtk3/stable/GtkTreeView.html#GtkTreeView.style-properties