Bug 4509 - Colour labels keep not being shown
Summary: Colour labels keep not being shown
Status: RESOLVED INVALID
Alias: None
Product: Claws Mail
Classification: Unclassified
Component: UI/Message List (show other bugs)
Version: 4.0.0
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2021-07-20 15:31 UTC by Paul (mmxx)
Modified: 2022-09-02 09:06 UTC (History)
5 users (show)

See Also:


Attachments
screenshot of the best theme I can use to see "checkboxes" (34.04 KB, image/jpeg)
2021-11-16 00:21 UTC, Pierre Fortin
Details

Description Paul (mmxx) 2021-07-20 15:31:42 UTC
Starting with 4.0.0, the colour labels in the message list disappear upon redraws of the Claws Mail window. Changing to a different folder and then back brings them back.

Tested on two systems with a current Arch Linux.
Comment 1 Paul 2021-07-20 15:50:40 UTC
working fine here.

Are you using wayland, perhaps?
Comment 2 Paul (mmxx) 2021-07-20 16:22:01 UTC
No, this system is running on Gnome 40 and X11.

Simplest sequence to reproduce:

* Message list is displayed correctly with colour labels
* Claws window loses focus, all messages go grey
* Claws window gets focus, no colour labels applied (other formatting like bold for unread messages is applied)
* Change mailboxes and back, colour labels are back

This is also independent on the theme, just reverted to internal theme
Comment 3 Paul 2021-07-20 16:36:49 UTC
I don't believe that there have been any changes to colour labels that would make any difference and, as I say, it continues to work as expected here.

I note in your comment:

> * Claws window loses focus, all messages go grey

What causes all the messages to go grey? It's not claws-mail doing that and is not what heppens here.

Something external seems to be messing with the colours.
Comment 4 Paul 2021-07-20 16:38:04 UTC
You said:

> This is also independent on the theme, just reverted to internal theme

What internal theme? Claws Mail does not have an internal theme, only icon sets.
Comment 5 Paul (mmxx) 2021-07-20 17:19:39 UTC
Second system with Gnome 40/wayland tested - colour labels are only visible direclty after setting them, switching forth and back to older folder does not help to get others displayed.

Downgrade on this system to claws 3.18.0 (no other changes to software or settings): Colour labels work as expected.
Comment 6 Paul 2021-07-20 17:50:03 UTC
You can expect differences between gtk2 and gtk3, this does not necessarily mean it is claws-mail. Here using KDE and X11 all works the same as always. If you had this problem both with X11 and wayland, that points the finger at gnome or your gtk3 theme... or whatever is changing those everything to grey when it loses focus (and failing to re-set).
Comment 7 Frank 2021-10-02 14:43:48 UTC
I have the same issue and noticed other changes in the display of claws-mail around the time this started happening. Once focus is away from the window, all text (menus, folders, mails) gets greyed out.

Archlinux
claws-mail 4.0.0-2
xfce 4.16.0-2
xfwm 4.16.1-2

I am not sure which theme I use, how can I check that (in terms as that is relevant here)?

$ echo $DISPLAY
:0.0
$ echo $WAYLAND_DISPLAY


so I assume my system is not using wayland.
Comment 8 Paul 2021-10-08 10:42:36 UTC
(In reply to Frank from comment #7)
Frank, what is more pertinent is whatever is changing everything to grey when it loses focus and failing to re-set the colours correctly.

This could be the window manager or the theme. I cannot reproduce this behaviour or problem.

The file ~/.config/gtk-3.0/settings.ini should reveal the name of the theme you are using. Look for 'gtk-theme-name'.
Comment 9 Frank 2021-10-10 00:15:53 UTC
Thank you!

~/.config/gtk-3.0/settings.ini did not exist on my system.

"gsettings get org.gnome.desktop.interface gtk-theme" said "Adwaita" as
did "xfconf-query -c xsettings -p /Net/ThemeName"

And I can confirm that this issue does *not* occur if I switch my XFCE
theme from Adwaita to Greybird.

But then claws-mail looked very chunky though, like Windows 95 (or I
guess an default GTK theme?). Not nothing anything I thought it might
be a missing GTK2 theme and installed aur/gtk2-theme-dust. Switching to
Adwaita and back to Greybird again (to reload), claws-mail now has some
nice styling again. I uninstalled gtk2-theme-dust and now doing the
same switching it still looks good.

I guess something was broken on my system, sorry but I don't know what.
I am happy now though and maybe this helps others.
Comment 10 Paul 2021-10-10 10:09:35 UTC
(In reply to Frank from comment #9)
This is nothing to do with gtk2. This is gtk3.
Comment 11 Frank 2021-10-13 19:41:47 UTC
As a follow up embarassement I have to admit that I did still use claws-mail 3 when I tried the above and after installing claws-mail 4 again, the problem still exists regardless of the theme.

Thank you for your patience and sorry for the noise.
Comment 12 Pierre Fortin 2021-11-15 23:46:47 UTC
I just noticed this same issue, and confirm the above comments:
- loss of focus greys the main window.
- focus-return restores colors to folder list and displayed message; but not to the message list.
No idea if the window is repainted on incoming focus by CM or something else; but whatever process repaints is ignoring the message list...  until the folder is re-entered.
Comment 13 Pierre Fortin 2021-11-16 00:21:11 UTC
Created attachment 2261 [details]
screenshot of the best theme I can use to see "checkboxes"

Thia screenshot of the best theme I can use to see "checkboxes" is why I chose the Adwaita theme post bug 4542. It's the only theme that comes close to giving me checkboxes. Note how tiny the checkboxes are -- I cannot detect any difference between checked and unchecked boxes. 

Anyway, here's my /home/pfortin/.config/gtk-3.0/settings.ini:

[Settings]
gtk-application-prefer-dark-theme=false
gtk-button-images=true
gtk-cursor-theme-name=breeze_cursors
gtk-cursor-theme-size=24
gtk-decoration-layout=icon:minimize,maximize,close
gtk-enable-animations=true
gtk-fallback-icon-theme=Adwaita
gtk-font-name=DejaVu Sans,  14
gtk-icon-theme-name=Adwaita-Breeze
gtk-menu-images=true
gtk-modules=window-decorations-gtk-module:colorreload-gtk-module
gtk-primary-button-warps-slider=true
gtk-theme-name=Adwaita
gtk-toolbar-style=3

Operating System: Mageia 8
KDE Plasma Version: 5.20.4
KDE Frameworks Version: 5.76.0
Qt Version: 5.15.2
Kernel Version: 5.10.75-server-1.mga8
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-4710MQ CPU @ 2.50GHz
Memory: 31.3 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 4600
Comment 14 Pierre Fortin 2021-11-16 06:08:02 UTC
More info now that I'm watching...

I have some filtering rules that color certain messages on arrival. As long as these messages remain New or Unread, they do not lose their color & bold font as Read messages do; not even when the window is dimmed.  I doubt themes would be aware of New/Unread vs Read messages...
Comment 15 Paul (mmxx) 2021-11-16 08:06:58 UTC
I can confirm that I have similar filtering rules in place.
Comment 16 Paul 2021-11-16 11:10:33 UTC
(this got too confusing having two users with the same username, so I changed the other 'Paul')

What you two need to do is see what else is the same for you, i.e. gtk3 theme in use, desktop, etc.
Comment 17 Dustin 2021-11-17 11:35:04 UTC
I can confirm the symptoms mentioned here on my system (Linux Mint 20.x XFCE, Claws 4.0.0), but think it's likely it is not a Claws bug (especially since I have two other separate issues related to the message list that others can't reproduce).

I can specifically confirm that the loss of color labeling is 'conditional' in some way. I wasn't sure whether it was related to messages being read or not or whether it had to do with messages being color-labeled in a previous Claws session or the current Claws session.

Probably related, I also had a rare occurrence (only one instance) of the folder label (in the folder list) showing there were three unread messages (which was expected because I had just downloaded a new email), but in the message list there were only two unread messages being shown, with the new email being 'invisible' (i.e. not shown anywhere at all). This was also easily 'fixed' by leaving the folder and then re-entering it.
Comment 18 Pierre Fortin 2021-12-14 19:58:51 UTC
Apparently, normal users are not allowed to re-open...?

Is this bug being ignored?

Simply put, upon loss of focus on CM, New and Unread messages retain their color, all others lose their color -- until the folder is re-entered.
Comment 19 Paul 2021-12-14 23:01:34 UTC
(In reply to Pierre Fortin from comment #18)

This behaviour cannot be reproduced here.
Comment 20 Pierre Fortin 2021-12-19 17:05:38 UTC
More documenting...

* Click to focus
  Anytime focus is lost (switch to another window or desktop), colors are lost
  and are not restored.
* Click to focus (mouse precedence)
  Same as Click to focus
* Focus follows mouse
  Same as Click to focus, w/o clicking; but colors lost when mouse moves to 
  another window; but not if mouse moves over desktop (no window under mouse)
  except if mouse moves over another window, then colors lost. 
* Focus follows mouse (mouse precedence)
  Same as Focus follows mouse
* Focus under mouse
  Same as Focus follows mouse
* Focus strictly under mouse 
  Colors lost upon leaving window (onto another window, or desktop)

If a drop-down menu or right-click popup menu is visible, focus is not lost; even if mouse clicked outside CM window (just dismisses menu). If mouse is over another window, CM colors lost when mouse moves out of other window. (Just system controlling who has focus, as expected.)

Whether focus is lost immediately, or delayed (moving over desktop), colors are always lost upon focus loss. 

Regardless of focus choice, bold & color NOT lost on unread/new messages.

Color-killing "other windows" includes any CM window (compose, reply, config,...)

Need more investigation...

Operating System: Mageia 8
KDE Plasma Version: 5.20.4
KDE Frameworks Version: 5.76.0
Qt Version: 5.15.2
Kernel Version: 5.15.6-server-2.mga8
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-4710MQ CPU @ 2.50GHz
Memory: 31.3 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 4600
Comment 21 Paul (mmxx) 2022-03-07 17:15:10 UTC
Would it help if I can provide a VirtualBox VM where this can be reproduced?
Comment 22 Juca 2022-03-07 17:34:49 UTC
I have the same problem. Colour labels disappear as I leave the message list to: read a mail, click outside the claws-mail window. As mentioned, the message list becomes greyed, colour labels disappear and only get back if I re-enter the folder or if I do ctrl+alt+u (update summary). New and unread messages do retain colour.

This on Linux Mint 20,3 Cinnamon (x86 64)
This on Manjaro 21,1 Gnome (x86 64)


3.17 works fine on both systems
3.18 and/or 4.0 have the above mentioned problem. (I tried them both)

Is there any further development/information on this issue?
thx
Comment 23 Paul 2022-03-07 17:38:57 UTC
Juca: the problem is (very likely to be) the gtk3 theme you are using.
Comment 24 Paul 2022-03-07 17:41:06 UTC
Juca: and nothing changed with colour labels between 3.17.* and 3.18.*
Comment 25 Juca 2022-03-08 14:25:10 UTC
Success!
After some investigation on Paul's comment (#23)...
The problem was indeed the GTK theme.

Here is what I did:

System: Mint 20,3 64 Cinnamon

In terminal:
>GTK_THEME=<name of theme> claws-mail

Did this for a few themes I had in my system, and checked if the colour labels disappeared or not.
I tried several themes and it works with some, doesn't work with others.

Finally, I tried to find a "working" theme that is as-similar-as-possible to the one I currently use and set claws-mail to always open with that theme.
For that, this link helped me : linuxuprising.com/2019/10/how-to-use-different-gtk-3-theme-for.html

Happily using CM 4.0 full colour.
Hoping this is useful.
Thank you all for the comments and your help.
Comment 26 Pierre Fortin 2022-05-06 07:49:54 UTC
Resolved thanks to Brad Rogers.  Brad provided a clue to getting my theme to work properly:  It consisted of adding "env GTK_THEME=Breeze" to claws-mail.desktop.  When that didn't work for me, I tracked down ALL the .desktop files containing my userids and ?claws"...

Found several (because I've run two instances of CM for over 15 years)

Adding Brad's suggested env statement not only resolved unreadable highlighted text (black on dark blue); but it also resolved this issue of losing colors when CM lost focus.  Here are my changes:

pfortin.desktop:
Exec=env GTK_THEME=Breeze /usr/local/bin/claws-mail
--alternate-config-dir .claws-mail.pfortin

pierre.desktop:
Exec=env GTK_THEME=Breeze /usr/local/bin/claws-mail
--alternate-config-dir .claws-mail.pierre

'pfortin claws-mail.desktop':
# Changed "Exec=" to read:
[Desktop Action ComposeMail]
Exec=env GTK_THEME=Breeze /usr/local/bin/claws-mail
--alternate-config-dir .claws-mail.pfortin --compose
...
[Desktop Action GetMail]
Exec=env GTK_THEME=Breeze /usr/local/bin/claws-mail
--alternate-config-dir .claws-mail.pfortin --receive-all
...
[Desktop Action SendFile]
Exec=env GTK_THEME=Breeze /usr/local/bin/claws-mail
--alternate-config-dir .claws-mail.pfortin --compose --attach %f
...
[Desktop Entry]
...
Exec=env GTK_THEME=Breeze /usr/local/bin/claws-mail
--alternate-config-dir .claws-mail.pfortin %u

Likewise for 'pierre claws-mail.desktop'
Comment 27 Paul 2022-05-06 09:03:14 UTC
(In reply to Pierre Fortin from comment #26)

In other words, this issue was caused by the theme.
Comment 28 Little Girl 2022-05-06 16:55:11 UTC
I can confirm this in this environment and it makes no difference which GTK theme I use:

KDE Plasma Version 5.24.4
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
Graphics Platform X11
Claws Mail version: 4.0.0
GTK theme: Default or Emacs or Breeze or Greybird-Pro

It happens any time I do anything that opens a child window in Claws Mail or when I cover the Claws Mail window by opening another program on top of it or moving another program over the top of it. When the main Claws Mail window loses focus, the message list colors go away until I leave the current folder and then open the folder again.
Comment 29 Little Girl 2022-05-06 17:16:31 UTC
Here's an animated GIF that shows the behavior: https://imgur.com/a/IQ97IVY
Comment 30 Pierre Fortin 2022-05-09 22:52:19 UTC
For me, the problem was not the theme; it was that GTK_THEME was not set for whatever needs it to enable the theme to be used be CM; hence the "signpost" comment I made in the mailing list.  I could use different ways to start CM; so that's why I put GTK_THEME in all those possible CM start options:
- command line: probably best to use an alias...
   alias cm="env GTK_THEME=<theme> <path_to_CM> [<options>]"
- Application Menu: *.desktop files (see comment 26 above).
- CM Desktop icon: ditto
As soon as that environment variable was set right before CM gets invoked, all was good...
HTH
Comment 31 Paul 2022-05-10 07:38:29 UTC
(In reply to Pierre Fortin from comment #30)

There always is a GTK theme, using GTK_THEME just overrides the default theme.
Comment 32 Dustin 2022-06-16 03:16:31 UTC
My system(s): Claws 4.1.0 on Linux Mint 20.3 Xfce. I've tried a number of themes (including Greybird-Pro) and none of them have solved it for me. I'm now going to focus on desktop environment (DE), window manager (WM), etc. settings (sticking with the the Greybird-Pro theme as a fixed variable, since it's been confirmed by at least one other user of not having this problem on their system) to see if I can find one or more that fixes this on my system.
Comment 33 Little Girl 2022-08-11 20:23:57 UTC
SOLVED

This issue has been solved for me in Claws Mail 4.0.0 quite accidentally by mi in the Claws Mail mailing list, who contributed several CSS rules. it turns out that the "window" rule works the magic:

To fix it, close Claws Mail, open the hidden ~/.config/gtk-3.0/gtk.css file in a text editor (you'll need to show hidden files to access it if you're using a GUI), add this rule to the bottom of the file (or paste it into the file if it's empty), save the file, and open Claws Mail:

window {
  background-color: #d0d0d0;
  color: #404040;
  }

Note that you may need to tweak those colors to match your GTK color scheme.
Comment 34 claws 2022-09-02 09:06:31 UTC
Just chiming in here with Claws-Mail 4.1.0 on GNOME 3.38 Wayland, Adwaita theme:

The workaround by Little Girl works and (at least in my case) can be shortened to

```
window {
  color: @theme_fg_color;
}
```

Before: leave focus -> message list text becomes grey -> enter focus -> message list text black, no colour labels.

With CSS workaround: leave focus -> message list text stays same, no greying out -> enter focus -> message list same with colour labels ✅.

As a note to the Claws devs: thank you so much for a very useful (if not the most useful) MUA. Let me also suggest that you try to provide the best out-of-box experience for your users. Fiddling around with CSS themes is not the best UX for new users, and it's probably a lot of users given Adwaita is the default GNOME theme. While I acknowledge that the bug lies somewhere with Adwaita or GTK-3, you might want to consider providing a workaround/solution in Claws proper until it's fixed in Adwaita/GTK, just for a better out-of-the-box UX  and happier users :-).

Note You need to log in before you can comment on or make changes to this bug.