Mint-X themes - white text w/ gtk3.4 [SOLVED, patch incl.]

Archived topics about LMDE 1 and LMDE 2
doktornotor
Level 4
Level 4
Posts: 203
Joined: Mon Jan 23, 2012 6:28 pm

Mint-X themes - white text w/ gtk3.4 [SOLVED, patch incl.]

Post by doktornotor »

This is extremely annoying, see screenshot. What is up with this? :x (Using Xfce but that does not matter, even LightDM looks like this.)

Edit: fixed, patch in this post.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
dclement

Re: Mint-X themes - unusable GTK3 apps (white text on silver

Post by dclement »

Hi,

I'm having the very same problem. It's not only Mint-X themes, is it? In my case, almost every theme has this strange behavior. I even have black backgrounds in some apps where it should obviously be white:
mintx.png
Also, do you have this kind of warning when you start a GTK app. from the command line?

Code: Select all

(gedit:2956): Gtk-WARNING **: Theme parsing error: <data>:8:15: Not using units is deprecated. Assuming 'px'.
I'm not sure it was the case before I installed proprietary drivers. Do you have them installed?

As a temporary workaround, I have found that Adwaita and Greybird themes worked well. So I'm using the latter before someone comes up with a real solution.

Regards, Daniel
dclement

Re: Mint-X themes - unusable GTK3 apps (white text on silver

Post by dclement »

Well, answering to myself, I was able to track down this but to a LibreOffice update.

I wanted to pull the very latest LibreOffice version from the Debian Sid repo. (what an idea...). It's some dependency installed at this time which broke many of the desktop themes.

Unfortunately, I can't tell which dependency.

HTH, Daniel
Lippy

Re: Mint-X themes - unusable GTK3 apps (white text on silver

Post by Lippy »

If you are tracking Testing/Sid, then it would have been the GTK+ 3.4 update that caused it. It did for me anyway. If that's the case, then the themes just need updating. Until then, I'd use a theme that works for now.
doktornotor
Level 4
Level 4
Posts: 203
Joined: Mon Jan 23, 2012 6:28 pm

Re: Mint-X themes - unusable GTK3 apps (white text on silver

Post by doktornotor »

Lippy wrote: Until then, I'd use a theme that works for now.
Well, that is about none that I could find - except for the default fallback junk which looks like... *censored* *censored* *censored* What kind of upstream genius felt the urge to cause this pointless borkage? :x
dclement

Re: Mint-X themes - unusable GTK3 apps (white text on silver

Post by dclement »

Lippy,
Lippy wrote:If you are tracking Testing/Sid, then it would have been the GTK+ 3.4 update that caused it. It did for me anyway. If that's the case, then the themes just need updating. Until then, I'd use a theme that works for now.
I'm rather new to Linux Mint: what does "tracking Testing or Sid" mean? Also, what package contains GTK+ 3.4? From what I noticed before, I'd bet LibreOffice 3.5 wants that package updated.

doktornotor
doktornotor wrote:Well, that is about none that I could find
Have you tried Adwaita or Greybird? I found them to work quite acceptably even when others don't.
Lippy

Re: Mint-X themes - unusable GTK3 apps (white text on silver

Post by Lippy »

dclement wrote:I'm rather new to Linux Mint: what does "tracking Testing or Sid" mean?
By default you are pointing to the Update Pack repositories which are hosted by Mint. Tracking Testing/Sid means pointing the sources directly to either the Debian Testing or Sid (aka Unstable) repositories. Some people do this in order to have more current packages, but it comes at a cost of stability. This isn't recommended to try as it is not supported in LMDE; you can end up with a few breakages, and it could wreck your install if you don't know what you are doing. The latest Mint packages for example are built for the most recent Update Pack and can soon become incompatible with Debian Testing/Sid as the packages are constantly changing.
dclement wrote:Also, what package contains GTK+ 3.4?
This should tell you what version of GTK+ 3 you have.

Code: Select all

dpkg -l libgtk-3-0
If it's older than 3.4 then your theme issues are being caused by a different problem. If it is at 3.4, then it's likely that something in your sources list has made you update to it early. In any case, Mint-X on my system currently looks identical to how it looks in your screenshot so I suspect it is GTK+ 3.4 that is causing the problem. :)
zerozero

Re: Mint-X themes - unusable GTK3 apps (white text on silver

Post by zerozero »

i assume that all the gtk themes based on the adwaita engine would work properly
(in this box here, tracking testing, so with a funny mixture of gnome3.2 and gnome3.4 right now) Atolm-gtk3 has no problems http://browse.deviantart.com/?qh=&secti ... 3#/d3f1ic6 (it's a dark theme but a search for adwaita http://browse.deviantart.com/?qh=&secti ... &q=adwaita might bring other options)
dclement

Re: Mint-X themes - unusable GTK3 apps (white text on silver

Post by dclement »

Lippy wrote:Tracking Testing/Sid means pointing the sources directly to either the Debian Testing or Sid (aka Unstable) repositories. Some people do this in order to have more current packages, but it comes at a cost of stability.
That's exactly what I had done when I was trying to get LibreOffice 3.5. It does't seem to depend on any libgtk-3-0.

However,
Lippy wrote:This should tell you what version of GTK+ 3 you have.

Code: Select all
dpkg -l libgtk-3-0
mine is 3.2.3-1 so it's OK. But indeed Sid has version 3.4.2-1 in the repos.

So now that I have managed to downgrade to this version, perhaps it would make sense to "pin" it so it doesn't get an unattended upgrade and breaks my XFCE themes again.

My guess is that for the little time I "tracked Sid" to get LibreOffice upgraded, it updated my libgtk-3-0 in the process and I considered it (wrongly) as a dependency.

Bottom line: maybe I can get LibreOffice 3.5 from Debian Sid after all, provided I take care not to update libgtk-3. But I'll try this on a USB drive first, just to see if it works well.
dclement

Re: Mint-X themes - unusable GTK3 apps (white text on silver

Post by dclement »

I think I finally got the final word of all this.

With LibreOffice you'd want to install libreoffice-gnome (if you're not to get an ugly Windows-looking LibreOffice).

Now this libreoffice-gnome depends on libgtk-3-0, which breaks many Mint themes when upgraded. Kind of checkmate.

I think it would be wise to pin libgtk-3-0 to a 3.2 version until the conflict with LXDE themes is sorted out.

Cheers, Daniel
Monsta
Level 10
Level 10
Posts: 3071
Joined: Fri Aug 19, 2011 3:46 am

Re: Mint-X themes - unusable GTK3 apps (white text on silver

Post by Monsta »

dclement wrote:With LibreOffice you'd want to install libreoffice-gnome (if you're not to get an ugly Windows-looking LibreOffice).

Now this libreoffice-gnome depends on libgtk-3-0, which breaks many Mint themes when upgraded. Kind of checkmate.
Hmm... this looks like a major warning regarding the future Update Pack 5 (or the process of preparing it, to be precise) :)

The current libreoffice-gnome (3.4.5) here in UP4 merely depends on libreoffice-gtk which in turn depends on libgtk2.0-0 >= 2.24.0... so it's still Gtk+2, not 3.
dclement

Re: Mint-X themes - unusable GTK3 apps (white text on silver

Post by dclement »

Monsta wrote:The current libreoffice-gnome (3.4.5) here in UP4 merely depends on libreoffice-gtk which in turn depends on libgtk2.0-0 >= 2.24.0... so it's still Gtk+2, not 3.
I know nothing about packaging, but could it be that the LMDE package libreoffice-gnome have different dependencies (libgtk2) than its Debian Sid counterpart (libgtk3)?

If LibreOffice 3.5 eventually works under LMDE with libgtk2, all is well, except that we'll have to wait for the LMDE version.

If not, we'll have to be cautious.
Monsta
Level 10
Level 10
Posts: 3071
Joined: Fri Aug 19, 2011 3:46 am

Re: Mint-X themes - unusable GTK3 apps (white text on silver

Post by Monsta »

Hmm, libreoffice-gtk still depends on libgtk2.0-0 (>= 2.24.0) in Sid. Have you by any chance installed libreoffice-gtk3 instead?
On the other hand, libreoffice-gnome depends only on libreoffice-gtk (without 3) in both Wheezy and Sid. I don't know what to think :)
dclement

Re: Mint-X themes - unusable GTK3 apps (white text on silver

Post by dclement »

Monsta wrote:libreoffice-gtk still depends on libgtk2.0-0 (>= 2.24.0) in Sid. Have you by any chance installed libreoffice-gtk3 instead?
No, libreoffice-gtk indeed.
libreoffice-gnome depends only on libreoffice-gtk (without 3) in both Wheezy and Sid.
Yes, that's what I believed from the pages you mentioned. Yet, there must be a tricky path of dependencies, because despite what you read on these pages, you never can install LibreOffice 3.5 and libreoffice-gnome without libgtk-3-0 ver. 3.4 (thus breaking the desktop themes).

I tried this on a live USB key:
* lock the libgtk-3-0 version to 3.2 in Synaptic;
* change repositories for Debian Sid;
* upgrade LibreOffice (-> OK, but looks like Windows :( );
* change back repositories to LMDE standards;
* try to install libreoffice-gnome.

That was impossible: Synaptic wanted me to remove all LibreOffice packages! :?
doktornotor
Level 4
Level 4
Posts: 203
Joined: Mon Jan 23, 2012 6:28 pm

Re: Mint-X themes - unusable GTK3 apps (white text on silver

Post by doktornotor »

Fixed - the below is a patch for Mint-X and Mint-X-Metal, for others, I guess do the same.

Code: Select all

--- /usr/share/themes/Mint-X/gtk-3.0/gtk-widgets.css	2012-06-24 12:20:42.606634258 +0200
+++ /usr/share/themes/Mint-X/gtk-3.0/gtk-widgets.css	2012-06-24 12:24:10.087168651 +0200
@@ -66,6 +66,16 @@
 	-unico-inner-stroke-width: 0;
 }
 
+GtkWindow {
+	color: @fg_color;
+}
+
+* {
+	/* inherit the color from parent by default */
+	color: inherit;
+	background-color: @bg_color;
+}
+
 /**********
  * states *
  **********/
--- /usr/share/themes/Mint-X-Metal/gtk-3.0/gtk-widgets.css	2012-06-24 12:32:34.677725260 +0200
+++ /usr/share/themes/Mint-X-Metal/gtk-3.0/gtk-widgets.css	2012-06-24 12:33:26.531077542 +0200
@@ -66,6 +66,16 @@
 	-unico-inner-stroke-width: 0;
 }
 
+GtkWindow {
+        color: @fg_color;
+}
+
+* {
+        /* inherit the color from parent by default */
+        color: inherit;
+        background-color: @bg_color;
+}
+
 /**********
  * states *
  **********/
Result:
remmina_gtk3_fixed.png
Mint-X-Themes.zip
Credits: braway @ Ubuntu forums
Last edited by doktornotor on Sun Jun 24, 2012 6:59 am, edited 1 time in total.
Monsta
Level 10
Level 10
Posts: 3071
Joined: Fri Aug 19, 2011 3:46 am

Re: Mint-X themes - white text w/ gtk3.4 [SOLVED, patch incl

Post by Monsta »

Right... now that I saw your patch, I've realized I could just look at the github to see the changes in Mint 13's Mint-X theme (it has to be compatible with GTK+ 3.4). :)

Look at these github pages:
gtk-widgets.css in mint-themes package (Mint 13)
gtk-widgets.css in mint-x-theme package (LMDE)

BTW, note some little differences (theme_fg_color/theme_bg_color instead of fg_color/bg_color)...

I guess Clem will apply these changes while preparing the Update Pack 5 - IIRC it will bring Gnome 3.4 to LMDE.
doktornotor
Level 4
Level 4
Posts: 203
Joined: Mon Jan 23, 2012 6:28 pm

Re: Mint-X themes - white text w/ gtk3.4 [SOLVED, patch incl

Post by doktornotor »

Monsta wrote: I guess Clem will apply these changes while preparing the Update Pack 5 - IIRC it will bring Gnome 3.4 to LMDE.
Not for me, Xfce here... :D Anyway, the github master one works just fine as well. 8)
Monsta
Level 10
Level 10
Posts: 3071
Joined: Fri Aug 19, 2011 3:46 am

Re: Mint-X themes - white text w/ gtk3.4 [SOLVED, patch incl

Post by Monsta »

Gnome 3.4 goes together with GTK+ 3.4 :) so the update affects even XFCE or LXDE - if you run any GTK+3 apps in it :)

I can't help but post a quote from this blog post:
Clem wrote:I’ll apologize in advance for the sarcasm here.. I need to take another cheap shot at the GTKGnome developers here. GTK3 isn’t a reliable API. Maybe it should be called libgnome instead. GTK3.4 came with Gnome3.4, and wasn’t compatible with previous GTK3 themes. This means all GTK3 applications looked really ugly not only with all the GTK2 themes which don’t support GTK3 (almost all of them), but also the few which did. With this in mind we had three options:
  1. Give you a desktop with poor integration and applications which look different based on the API they use (which is completely unacceptable)
  2. Ditch all GTK3 applications from Mint and replace them with earlier GTK2 versions, or GTK2 or QT applications (this includes Gnome apps, but also Gdebi, Transmission and a few others)
  3. Rant like mad, remove all themes, and waste countless hours in giving Mint-X and Mint-Z proper GTK “3.4″ support even though it’s likely to break again in 3.6…
We went for option 3 “this time”. I hope this little example was enough to convince 3rd party developers not to use GTK3. I couldn’t find any release notes or documentation explaining the regression or how to solve the issue.. I genuinely get the feeling that GTK 3.4 is developed for Gnome 3.4, that it doesn’t really matter if it breaks things and that we’re not supposed to use it outside of Gnome.
doktornotor
Level 4
Level 4
Posts: 203
Joined: Mon Jan 23, 2012 6:28 pm

Re: Mint-X themes - white text w/ gtk3.4 [SOLVED, patch incl

Post by doktornotor »

Monsta wrote:Gnome 3.4 goes together with GTK+ 3.4 :) so the update affects even XFCE or LXDE - if you run any GTK+3 apps in it :)
Well, tracking Debian unstable, so... :)
Monsta wrote: I can't help but post a quote from this blog post:
Clem wrote:I’ll apologize in advance for the sarcasm here.. I need to take another cheap shot at the GTKGnome developers here. GTK3 isn’t a reliable API. Maybe it should be called libgnome instead. GTK3.4 came with Gnome3.4, and wasn’t compatible with previous GTK3 themes. This means all GTK3 applications looked really ugly not only with all the GTK2 themes which don’t support GTK3 (almost all of them), but also the few which did.

...

I hope this little example was enough to convince 3rd party developers not to use GTK3. I couldn’t find any release notes or documentation explaining the regression or how to solve the issue.. I genuinely get the feeling that GTK 3.4 is developed for Gnome 3.4, that it doesn’t really matter if it breaks things and that we’re not supposed to use it outside of Gnome.
clem++

(I already commented on upstream suckage here. Absolutely pointless borkage. :x )
diazepan11

Re: Mint-X themes - white text w/ gtk3.4 [SOLVED, patch incl

Post by diazepan11 »

There is still an issue with Mint-X-Metal in Gedit that stills write in silver colour. But on the rest it works. Mixt-X works perfect.
Locked

Return to “LMDE Archive”