Bug 3509 - Selected item in MCC is not readable with oxygen theme (OK with Ia Ora)
Summary: Selected item in MCC is not readable with oxygen theme (OK with Ia Ora)
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Juan Luis Baptiste
QA Contact:
URL:
Whiteboard:
Keywords: PATCH, UPSTREAM
Depends on:
Blocks: 4300
  Show dependency treegraph
 
Reported: 2011-11-27 23:35 CET by Pierre Jarillon
Modified: 2012-02-16 23:43 CET (History)
4 users (show)

See Also:
Source RPM: oxygen-gtk-1.1.5-2.mga2
CVE:
Status comment:


Attachments
Screenshot with MCC - The focus is on system which is black on dark backgroiund (135.85 KB, image/png)
2011-11-28 23:40 CET, Pierre Jarillon
Details

Description Pierre Jarillon 2011-11-27 23:35:31 CET
With mageia2 alpha 1 the item which has the focus in left panel of MCC cannot be read. It is black on a dark background.
Comment 1 Marja Van Waes 2011-11-28 16:56:42 CET
(In reply to comment #0)
> With mageia2 alpha 1 the item which has the focus in left panel of MCC cannot
> be read. It is black on a dark background.

Mageia2 alpha1, so changing version to cauldron

Pierre, do you mind attaching a screen shot?

CC: (none) => marja11, thierry.vignaud
Version: 1 => Cauldron
Source RPM: (none) => drakconf

Comment 2 Marja Van Waes 2011-11-28 17:08:54 CET
@ Pierre

I forgot to ask: How did you install Mga2Alpha1 ? 
Do you use the default theme?
Comment 3 Thierry Vignaud 2011-11-28 17:18:52 CET
What theme do you use?

Keywords: (none) => NEEDINFO

Comment 4 Pierre Jarillon 2011-11-28 23:40:30 CET
Created attachment 1149 [details]
Screenshot with MCC - The focus is on system which is black on dark backgroiund

Mageia release 2 (Cauldron) for x86_64
The theme is the Oxygen (default)

The word under the cursor is not readable. Here it is the line "Systeme".
Comment 5 Marja Van Waes 2011-12-06 14:30:21 CET
I can confirm now: I installed Mageia 2 Alpha 1 i586 from DVD, with the default theme I have the same issue in MCC, when going over the menu on the left with the cursor. 

assigning to maintainer

Keywords: NEEDINFO => (none)
Hardware: x86_64 => All
Assignee: bugsquad => thierry.vignaud

Comment 6 Thierry Vignaud 2011-12-10 05:49:03 CET
Given the result differs depending on the used theme, I would say it's an oxygen-gtk bug.
eg run the following commands and compare:

GTK2_RC_FILES=/usr/share/themes/Ia\ Ora/gtk-2.0/gtkrc mcc
GTK2_RC_FILES=/usr/share/themes/oxygen-gtk/gtk-2.0/gtkrc mcc

Summary: Selected item in MCC is not readable => Selected item in MCC is not readable with oxygen theme (OK with Ia Ora)
Source RPM: drakconf => oxygen-gtk-1.1.5-2.mga2

Thierry Vignaud 2011-12-10 05:54:20 CET

Assignee: thierry.vignaud => juan.baptiste

Comment 7 Pierre Jarillon 2011-12-12 01:27:22 CET
I have found two problems:

1-/usr/share/themes/Ia\ Ora/  this directory does not exists
    $ ll /usr/share/themes/
    total 16
    drwxr-xr-x 4 root root 4096 déc.   4 17:24 Default/
    drwxr-xr-x 4 root root 4096 déc.   4 17:24 Emacs/
    drwxr-xr-x 3 root root 4096 déc.  10 19:18 oxygen-gtk/
    drwxr-xr-x 4 root root 4096 déc.   4 17:24 Raleigh/

2- Started from a konsole, this massage is issued when MCC is launched:
    Gtk-Message **: Failed to load module "canberra-gtk-module" at /usr/lib/libDrakX/mygtk2.pm line 20.
Comment 8 Thierry Vignaud 2011-12-12 08:36:10 CET
1) just install Ia Ora in order to test then!
2)That's totally unrelated and generic to all gtk+ apps
Comment 9 Pierre Jarillon 2011-12-12 10:20:00 CET
Ia Ora is not a valid theme. I have tried with Ia Ora Blue:

GTK2_RC_FILES=/usr/share/themes/Ia\ Ora\ Blue/gtk-2.0/gtkrc mcc

It works fine. The background of the item which has the focus is white and the item is perfectly shown and seen.
It is clearly an oxygen-gtk bug.
Comment 10 Juan Luis Baptiste 2012-01-18 08:27:48 CET
I just updated oxygen-gtk to 1.2.0, can someone please test and see if the issue persist ?

Thanks
Comment 11 Marja Van Waes 2012-01-18 10:26:24 CET
I just updated and rebooted.

The problem is still there, sorry

drakbug confirms: Used theme: oxygen-gtk

[marja@DenkBlok ~]$ rpm -qa | grep oxygen
liboxygen-gtk-1.2.0-1.mga2
oxygen-gtk-1.2.0-1.mga2
oxygen-gtk3-1.2.0-0.20111219.1.mga2
liboxygen-gtk3-1.2.0-0.20111219.1.mga2
liboxygenstyle4-4.7.97-1.mga2
liboxygenstyleconfig4-4.7.97-1.mga2
oxygen-icon-theme-4.7.97-1.mga2
[marja@DenkBlok ~]$
Comment 12 Hugo Pereira Da Costa 2012-01-24 00:44:06 CET
Could someone provide a screenshot ? 
(and possibly file a copy of this bug to bugs.kde.org, product oxygen, component gtk-engine) ? This should be fixable ...

CC: (none) => hugo

Comment 13 Marja Van Waes 2012-01-24 16:20:45 CET
(In reply to comment #12)
> Could someone provide a screenshot ? 
> (and possibly file a copy of this bug to bugs.kde.org, product oxygen,
> component gtk-engine) ? This should be fixable ...

the screenshot was already attached by Pierre in comment 4: attachment 1149 [details]

What makes you think it could be an upstream issue?

So far, I've never seen this problem outside of the Mageia Control Center
Comment 14 Hugo Pereira Da Costa 2012-01-24 17:00:59 CET
Thanks, and sorry for not having read the thread carefully enough.
Well, the fact that it does not happen with other gtk styles, 
and that oxygen-gtk has quite a lot of workarounds, some of which not working well (or not being enough protected) against custom widgets, which this one is.

Notably, it might well overwrite some of the "app specific" resources, this for the sake of consistency with Qt, but with sometime unfortunate effects, again for custom widgets. 

I guess that since I can actually reproduce the bug here, I could quite possibly fix ;)

Hugo, (oxygen-gtk dev).
Comment 15 Marja Van Waes 2012-01-24 18:50:52 CET
(In reply to comment #14)

> I guess that since I can actually reproduce the bug here, I could quite
> possibly fix ;)
> 
> Hugo, (oxygen-gtk dev).

Great :)

I must say that I'm impressed that upstream is stooping down to find bugs :D
Comment 16 Hugo Pereira Da Costa 2012-01-25 18:36:55 CET
ok. After some investigation, it seems to me that the issue cannot be fixed in oxygen.

Here's my understanding:
The widgets that appear in the list are GtkButtons, marked as "flat"
(gtk_button_get_relief( GTK_BUTTON( widget ) ) == GTK_RELIEF_NONE)

For such flat buttons, (such as typically the one you find in toolbars), oxygen
- draws nothing when not hovered (which is fine here)
- only draws a light outline (blue) on mouse-hover, and, unlike other styles do not draw any background.

This is fine when the buttons "text" color is unchanged between  un-hover (NORMAL) and hover state (PRELIGHT), as is the default in e.g. toolbar.

Now unfortunately here, the color *is* changed for the unhover state (to white, and most likely by mcc itself), but is not changed for hover state (so falling back to black, the default). Hence the readability issue.

It could in principle be changed to white (consistently with the NORMAL) state, in mcc, but that would break other styles, that do draw a "normal" background under "hovered" buttons. Now you could also change the bg color in PRELIGHT state accordingly (to something dark enough). And that would solve it all. 

So: not much I can do on the "readability" front in oxygen. All the code there is correct, and consistent with the behaviour of default widgets, but does not end up nice with the customization of mcc (dark background). This is typically the kind of issues you get when using "custom" background.

Advice welcome. 

Now there is another problem: the selection (blue) rect is sometime not painted entirely for the widget. This, I believe is a separate issue, possibly oxygen-gtk related (my guess is that there is some mess-up due to the background pixmap) and which I am still investigating.

Cheers,

Hugo
Comment 17 Hugo Pereira Da Costa 2012-01-25 18:50:13 CET
Oooops.
Forget what I've said. I've actually found a fix in oxygen-gtk, which makes sense.
Will test some more and push soon. 
Will report here afterwards.
Comment 18 Hugo Pereira Da Costa 2012-01-27 09:23:16 CET
Link to corresponding KDE bug:
https://bugs.kde.org/show_bug.cgi?id=292557
Comment 19 Marja Van Waes 2012-01-27 09:53:26 CET
(In reply to comment #18)
> Link to corresponding KDE bug:
> https://bugs.kde.org/show_bug.cgi?id=292557

Thanks, Hugo :)

Keywords: (none) => UPSTREAM
See Also: (none) => https://bugs.kde.org/show_bug.cgi?id=292557

Comment 20 Thierry Vignaud 2012-01-27 10:30:05 CET
Juan, can you take care of backporting the following commit?
https://projects.kde.org/projects/playground/artwork/oxygen-gtk/repository/revisions/ff280db9640328b486f3098ff81d328ba65b5084

Keywords: (none) => PATCH
Status: NEW => ASSIGNED

Manuel Hiebel 2012-01-27 16:55:19 CET

Blocks: (none) => 4300

Manuel Hiebel 2012-01-27 16:55:37 CET

Blocks: 4300 => (none)

Comment 21 Manuel Hiebel 2012-01-27 17:03:32 CET
(sorry for the noise don't know what happen :/)

Blocks: (none) => 4300

Comment 22 Juan Luis Baptiste 2012-01-28 03:09:59 CET
(In reply to comment #20)
> Juan, can you take care of backporting the following commit?
> https://projects.kde.org/projects/playground/artwork/oxygen-gtk/repository/revisions/ff280db9640328b486f3098ff81d328ba65b5084

Sure, as soon as I'm back from vacations  :)
Comment 23 Juan Luis Baptiste 2012-02-01 06:55:30 CET
Ok patch added and sent a new version to the BS. I tested it and works fine. Please test too.
Comment 24 Marja Van Waes 2012-02-01 09:18:34 CET
(In reply to comment #23)
> Ok patch added and sent a new version to the BS. I tested it and works fine.
> Please test too.

For me

* works fine when moving upwards with the mouse (very well visible lighter blue line around the focused item) 
* works reasonable when moving downwards (the lighter blue line is only visible above the focused item instead of all around it)
Comment 25 Hugo Pereira Da Costa 2012-02-01 09:39:01 CET
In principle, the incomplete blue highlight issue has also been (almost) fixed with:

https://projects.kde.org/projects/playground/artwork/oxygen-gtk/repository/revisions/1d924c7a23797c010b1568c68a240c22ecb4a697

There is still one issue when moving the mouse over an element *the first time*
I'm investigating.
Comment 26 D Morgan 2012-02-16 16:53:40 CET
Please test new oxygen rpm.

CC: (none) => dmorganec

Comment 27 Pierre Jarillon 2012-02-16 22:44:44 CET
IMHO the bug can be closed as resolved. Thanks!
Comment 28 Manuel Hiebel 2012-02-16 23:43:07 CET
Ok thanks all

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED


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