GNOME Bugzilla – Bug 778180
CSS property for background of new mail in the message list
Last modified: 2019-12-10 08:24:03 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.
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.
(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).
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+)
*** Bug 733496 has been marked as a duplicate of this bug. ***
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
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.
s/option/choice/
(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.
(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