mate-desktop / libmatekbd

Keyboard management library
https://mate-desktop.org
GNU Lesser General Public License v2.1
17 stars 11 forks source link

[GTK+3] Keyboard layout indicator text in the panel is always white [$10] #28

Open GiedriusS opened 8 years ago

GiedriusS commented 8 years ago

As seen in this screenshot https://i.imgur.com/VRBC772.jpg the indicator text that shows the current layout is white. And it is always white regardless of the theme being used. This happens only on gtk3 builds. @raveit65 also confirmed this. libmatekbd version: [*] libmatekbd-1.12.0_1 MATE keyboard library

--- There is a **[$10 open bounty](https://www.bountysource.com/issues/28058223-gtk-3-keyboard-layout-indicator-text-in-the-panel-is-always-white?utm_campaign=plugin&utm_content=tracker%2F1554631&utm_medium=issues&utm_source=github)** on this issue. Add to the bounty at [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1554631&utm_medium=issues&utm_source=github).
monsta commented 8 years ago

Workaround:

gsettings set org.mate.peripherals-keyboard-xkb.indicator foreground-color '0 0 0'

This will set the font to be always black. If you don't plan changing theme to dark this should be ok :smile:

raveit65 commented 8 years ago

nice finder, in a ideal world it should read theme fg color, but a gsettings key is sufficient :)

raveit65 commented 8 years ago

possible fix https://git.gnome.org/browse/libgnomekbd/commit/?id=ab411c5084e1816df56f97351132329aeb4123be

monsta commented 8 years ago

Yes, it might be. I've already seen it before but didn't like the "hack" word... but we can try it since there's no other fix around...

monsta commented 8 years ago

Nice, it's indeed fixed now, thanks @XRevan86 :smile: The font has a bit weird rendering (somewhat blurred), but the color is correct for both light and dark themes.

monsta commented 8 years ago

So I saw this fixed in Debian Testing with GTK+ 3.20, but now I see it in Ubuntu MATE 16.10 with GTK+ 3.18... tried Menta, TraditionalGreen and other themes, the font is still white. :confused:

monsta commented 8 years ago

@flexiondotorg: can you reproduce this in Ubuntu 16.10?

monsta commented 7 years ago

@flexiondotorg: I see it now in Ubuntu 16.10 - only with Radiant-MATE though. Seems to be fixed in other themes, at least for 3.20.

oz123 commented 7 years ago

This bug still exists for me in mate-1.16 built on gentoo.

oz123 commented 7 years ago

As a work around for this annoying issue, I can suggest the following remedy:

edit foreground-color in org->mate->desktop->peripherals->keyboard->indicator.

Change it to 0 0 0.

monsta commented 7 years ago

Which theme do you use?

oz123 commented 7 years ago

This happened with GTK+3.18 and GTK+3.20, with the following themes:

Menta, TraditionalGreen, TraditionalOK, GreenSubmarine, BlueMenta and Adwaita.

raveit65 commented 7 years ago

This happened with GTK+3.18 and GTK+3.20, with the following themes:

Menta, TraditionalGreen, TraditionalOK, GreenSubmarine, BlueMenta and Adwaita.

Not here in fedora with gtk+-3.20/22, Changing to a theme with another bg color for the panel change the font color like it should.

monsta commented 7 years ago

Using latest mate-themes is the key. Here I have GTK+ 3.18.9, and I use the latest 3.18 themes, and I don't see this issue.

vkotovv commented 7 years ago

Btw, issue is still present in Ubuntu 16.04 LTS, because it uses GTK+ 3.18. Had to use this workaround with `foreground-color'

monsta commented 7 years ago

If you use the default MATE packages in 16.04, then it's GTK+2 build. I'm not sure we'll be able to fix this for GTK+2.

vkotovv commented 7 years ago

No, I'm using mate 1.18 ppa

monsta commented 7 years ago

Ok, then a theme fix is needed.

raveit65 commented 7 years ago

No, I'm using mate 1.18 ppa

And which theme are you using? I fixed that for Mate-Radiant theme https://github.com/flexiondotorg/ubuntu-mate-themes/commit/61217fea9b1ac963eadf953226254deb25376a16 If you use another theme you need to add something like this

/* needed for keyboard layout indicator applet */
.mate-panel-menu-bar {
    color: @theme_fg_color;
}

Note, .mate-panel-menu-bar is the main style class for the panel.

vkotovv commented 7 years ago

I use Radiance (as it stated through Appearance Preferences), I guess Mate-Radiant is the other name for that. How can I make use of your fix @raveit65 ?

raveit65 commented 7 years ago

No, Mate-Radiant is based on Radiance but adjusted for Mate. Create ~.config/gtk-3.0/gtk.css with that content.

/* needed for keyboard layout indicator applet */
.mate-panel-menu-bar {
    color: @fg_color;
}

and reload session for restarting mate-settings-daemon. As you can see /usr/share/themes/Radiance/gtk-3.20/gtk-main.css use another color definition as Radiant-Mate.

monsta commented 7 years ago

@flexiondotorg: I can confirm Radiant-MATE still has this issue, not only in 16.04, but also in 16.10 and 17.04. I see @raveit65 fixed it, but I'm not sure if an SRU would be allowed for this change...

monsta commented 7 years ago

Happens with GTK+ 3.14 as well, but with a weird effect: the indicator has light green + white colors (with a gradient), at least in my VM. This looks quite funny with BlackMATE theme. :slightly_smiling_face:

Reopening, we need to get this fixed for any theme and any GTK+ version...

N0rbert commented 6 years ago

From my wrongly reported bug:

Steps to reproduce:

  1. Install Ubuntu 18.04 LTS
  2. Install ubuntu-mate-desktop
  3. Set light theme from mate-control-center Appearance - for example darkroom: darkroom

Expected results:

Actual results:

MATE general version

1.18.4

Linux Distribution

Ubuntu 18.04 LTS

Link to downstream report of your Distribution

Issue filed to the launchpad as bug 1728711.

raveit65 commented 6 years ago

Reopening, we need to get this fixed for any theme and any GTK+ version...

Any one working on that? This is fixed in Mate themes an Ubuntu Mate themes. I see no reason to let a report open if no one is working on that.

tamplan commented 5 years ago

I can't reproduce this bug on fedora 30 with libmatekbd 1.23 (master) with light theme: Capture du 2019-06-16 22-19-19

Regards

max-dw-i commented 3 years ago

Still can reproduce with any non-standard light theme (which do not have the fix from https://github.com/mate-desktop/libmatekbd/issues/28#issuecomment-297430508). MATE v1.24.1.