linuxmint / cinnamon

A Linux desktop featuring a traditional layout, built from modern technology and introducing brand new innovative features.
GNU General Public License v2.0
4.45k stars 733 forks source link

cinnamon-settings themes: needs advice to ensure you select same variant (dark/light) for both controls (GTK) and icon themes #10660

Open SebastJava opened 2 years ago

SebastJava commented 2 years ago
 * Cinnamon 5.2.7
   - No daily builds PPA
 * Mint 20.3

Mint-Y-Dark-light-bad-mix

cinnamon-settings_themes

EDIT: Most or all applications shipping with Mint 20.3 are automatically okay, using some symbolic icons. I only had trouble with Inkscape (1.1.1 from PPA) and... WidgetFactory. This issue seems to occur only with the other applications, the ones not included with the Mint distribution.

Issue In cinnamon-settings themes (Menu > Preferences > Themes), sometimes I select some dark GTK variant, like Mint-Y-Dark for example, and I forget to select some corresponding dark icon theme, like Mint-Y-Dark for example. Or vice-versa: I should select a light icon theme for a light GTK theme. And then, on some toolbars, the icons are very low contrast, almost unreadable. Now I know how to solve this, but I saw on the forums that some people just don't know why this is happening.

Steps to reproduce

  1. Select a dark GTK theme.
  2. Ignore or forget you should also change your icon theme.
  3. Take a look at some toolbar (see screenshot).

Expected behavior I would expect some automated process to ensure I select dark icons for a dark GTK theme, and vice-versa. Or at least I should get a warning message.

EDIT 2022-03-08: This index.theme found in the Mint-Y theme and other themes is a X-GNOME-Metatheme. Everything is already there to make it work right. And it does works fine on Mate, but not on Cinnamon... So, what i am trying to say here is that i am not asking for any super-sophisticated mechanism. It should just work as specified in /usr/share/themes/Mint-Y/index.theme, for example.

rado84-github commented 2 years ago

The autoselection of "controls" depends on whether or not that has been specified in the index.theme file. I have specified it for my own theme and it works:

Picture_created_28-02-2022_11-15-48

SebastJava commented 2 years ago

This reminds me of another, related issue: https://github.com/linuxmint/mint-themes/issues/366. Now this is fixed in this repository, but we are still waiting for a new release, with this fix. Anyway, i tried. I edited my /usr/share/themes/Mint-Y-Dark/index.theme as follows:

[Desktop Entry]
Type=X-GNOME-Metatheme
Name=Mint-Y-Dark
Comment=A dark flat theme with transparent elements
Encoding=UTF-8

[X-GNOME-Metatheme]
GtkTheme=Mint-Y-Dark
MetacityTheme=Mint-Y
IconTheme=Mint-Y-Dark
CursorTheme=DMZ-Black
ButtonLayout=menu:minimize,maximize,close

Steps to reproduce:

  1. In /usr/share/themes/Mint-Y-Dark/index.theme, modify: IconTheme=Mint-Y -> IconTheme=Mint-Y-Dark and save.
  2. Go to Menu > Preferences > Themes, and select Mint-Y (light) for both the Controls and Icons.
  3. Restart the computer, just to make sure.
  4. Go back to Menu > Preferences > Themes, and select Mint-Y-Dark for the Controls.

Expected behavior: The icons would also automatically be set to Mint-Y-Dark. Actual behavior: The icons did not change, thus some toolbars will be very low contrast, almost invisible. (Check my OP screenshots ▲.)

Of course, i just have to change the icon theme to the dark version, and everything works fine. But not everybody knows this, and they end up complaining on the forums...

@IvoAndonov Are you on Cinnamon ? Otherwise, it does works fine, all automated, on Mate, and maybe on Xfce too, i don't know.

rado84-github commented 2 years ago

@IvoAndonov Are you on Cinnamon ? Otherwise, it does works fine, all automated, on Mate, and maybe on Xfce too, i don't know.

Yes, Cinnamon 5.2.7. Not Mint, but Cinnamon for life! :)

SebastJava commented 2 years ago

@IvoAndonov I am not sure we are talking about the same thing. I am talking about the auto selection of icons when selecting the GTK theme. So, lets take a look at your example index.theme in your screenshot above ▲ (https://github.com/linuxmint/cinnamon/issues/10660#issuecomment-1054045474).

Line 08 GtkTheme=BGT-v1.7 Line 10 IconTheme=Humanity-Dark

Are you saying:

  1. In cinnamon-settings themes (the standard themes chooser pictured below ▼)
  2. You select Controls: Black-Green_Transparent-v1.7_for-Cinn_by-Valso
  3. You then automatically get your GtkTheme=BGT-v1.7
  4. And you automatically get your IconTheme=Humanity-Dark

Really? You get your IconTheme=Humanity-Dark, automatically, when selecting this GtkTheme? Can you confirm this, please?

Here i can change my GTK theme easily, but then i have to click on the icon theme to change them too, separately! And i have the same Cinnamon version as yours: 5.2.7. On LinuxMint 20.3.

Example: I select Mint-Y-Dark controls and then i should also select Mint-Y-Dark icons, in this themes chooser.

image

rado84-github commented 2 years ago

I just did try it and... it seems to be autoselecting controls from my index.theme but it doesn't always work and I have no idea why. After a reboot, if I change the icons and controls theme and then back to my theme, it autoselects Humanity Dark but if I do that switch again without system reboot, it doesn't happen the same way. Edit: second reboot, third reboot... Ah, now it happened to autoselect and then it "dies" again. I can't figure it out why this is happening. Apparently there's a bug but I doubt that anyone can pinpoint it.

SebastJava commented 2 years ago

BONUS: I just saw this issue in the LM-forums, again ! Here: https://forums.linuxmint.com/viewtopic.php?p=2148839#p2148839 There you can see this guy, Surfer57, selects "light" (base) icons with dark controls. And this is not the first time i see this. I bet there are lots of people who are unaware of this mismatch, and then they end up complaining about invisible things like dark toolbars on dark backgrounds...

SebastJava commented 2 years ago

EDIT 2022-03-08: This index.theme found in the Mint-Y theme and other themes is a X-GNOME-Metatheme. Everything is already there to make it work right. And it does works fine on Mate, but not on Cinnamon... So, what i am trying to say here is that i am not asking for any super-sophisticated mechanism. It should just work as specified in /usr/share/themes/Mint-Y/index.theme, for example.

smurphos commented 2 years ago

The index theme is there for compatibility with MATE's appearance module. Cinnamon not referencing it is a feature not a bug. I don't want my icon theme reverting from my choice to something different every time I change GTK theme. That would be incredibly annoying behaviour.

SebastJava commented 2 years ago

@smurphos Okay, understood. But there should be some info, something to inform people they should select, for example :

Otherwise, some people may end up with this toolbar : image And they have no idea on how to solve this.

JosephMcc commented 2 years ago

I'm 100% with @smurphos on this. I'm not at all a fan of how Mate handles this. Not only that, the problem here is pretty specific to mint themes. Not a lot of themes have this specific issue.

smurphos commented 2 years ago

And they have no idea on how to solve this.

I'd argue that a significant proportion of naive users change their Mint-Y theme from light to dark in the welcome screen and that handles this for them.

Any user that makes it as far as the Themes settings module and explore the options should cotton on fairly fast that the icon theme setting and the Controls/GTK theme setting are independent and that changing icon theme might be a solution to poor icon theme visibility. There's only so much hand holding any OS can give by default. If they get that far and don't realise and need to ask that what's support forums are for. I at least glance at most theme related queries on the Mint forums and although this does come up it's not very frequent at all.

SebastJava commented 2 years ago

I agree, there should be no coercive mechanism, no annoying constant pop-ups, but some simple note or other smart occasional pop-up message ?

Example:

NOTE: Mint-Y and similar icons are available in light and dark variants. These icons are the same, light or dark. The difference is in the “actions” directory. These are used on certain things such as toolbars. So you should always select light icons for light controls, and dark icons for dark controls. This will ensure that all of your toolbars are clearly visible.

On the other hand, do not hesitate to mix the colors!

Example sketch:

cinnamon-settings_themes-note-sketch

SebastJava commented 2 years ago

[...] the problem here is pretty specific to mint themes. Not a lot of themes have this specific issue.

Mint-X and Mint-Y are not just some themes amongst hundreds of other themes. They are the standard, installed, trustworthy LinuxMint themes. Some advice on proper usage would be welcomed, IMHO.

DirkHaar commented 2 years ago

@SebastJava What's that program in your opening post? Can you edit colour settings with it?

SebastJava commented 2 years ago

@DirkHaar That's the Widget Factory: A showcase for GTK+ widgets, designed for testing themes.

Widget Factory is a very useful program, but hard to find. It is part of a bigger package called Gtk-3-examples.

Install Gtk-3-examples to get this Widget Factory.

I can't remember for sure, but i think i had to edit my menu to get this program, Widget Factory, to be available from my menu. Or maybe it was already there, in the menu, but i had to click on "Show" to make it available. Command: gtk3-widget-factory. With this command you can create a launcher, or add it to your menu, or launch it from your terminal.

Can you edit colour settings with it?

Yes. There are so many things you can do with this, I can't list them all !

Experiments with colour settings:

  1. Open Widget Factory
  2. In Widget Factory, click on menu icon to open the Inspector
  3. Use the Inspector to spot your element name and CSS selector
  4. You can click on the CSS tab to do some experiments through direct CSS edits.

Quick example, setting the headerbar/titlebar background-color: image

headerbar,
.titlebar:not(headerbar) {
  background-color: #09A78D; }

NOTE: You can't edit the assets with this. The assets are made of PNG images and this is a different story. For more information on how to edit the Mint-Y themes, take a look at my fork: https://github.com/SebastJava/mint-yz-theme#readme ...and more specifically: https://github.com/SebastJava/mint-yz-theme/blob/master/Do-It-Yourself.md

DirkHaar commented 2 years ago

I'm gonna adopt you😘 At least I owe you a beer or such.

DirkHaar commented 2 years ago

I already had awf in my menu which starts a display-only version, I wasn't aware that by starting as gtk3-... there are edit functions.

SebastJava commented 2 years ago

@DirkHaar

[...] there are edit functions.

Yes, but these edit functions are only there for instant testing purposes. Once you found, using the Inspector, the CSS selector you were looking for, and got the results you were looking for, you will still need to do a copy-paste to edit the real gtk.css file(s).

SebastJava commented 2 years ago

related: How do I change themes? on LM forums.