After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 304548 - Hovering over an pressed ToggleButton makes it look like not pressed
Hovering over an pressed ToggleButton makes it look like not pressed
Status: RESOLVED NOTABUG
Product: gtk+
Classification: Platform
Component: Widget: Other
2.6.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 303850
 
 
Reported: 2005-05-17 17:22 UTC by Jaap A. Haitsma
Modified: 2005-06-17 18:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch removing prelight from active toggle buttons (698 bytes, patch)
2005-05-26 21:10 UTC, Jaap A. Haitsma
none Details | Review
Correct patch (2.76 KB, patch)
2005-06-05 17:52 UTC, Jaap A. Haitsma
none Details | Review
OK now really the correct patch (3.91 KB, patch)
2005-06-05 21:54 UTC, Jaap A. Haitsma
none Details | Review
Improved patch (4.92 KB, patch)
2005-06-06 20:04 UTC, Jaap A. Haitsma
none Details | Review

Description Jaap A. Haitsma 2005-05-17 17:22:40 UTC
NOTE this bug is a bit theme dependent, but improving the GTKToggleButton would
solve this bug for all themes immediately. (I use the clearlooks theme)

If you hover over a toggle button the button becomes bright gray. It doesn't
matter if the button is in pressed state or in a non pressed state. Because of
this effect it is very difficult to see if a button is in pressed on non pressed
state if you hover over it
Comment 1 Jaap A. Haitsma 2005-05-26 21:10:13 UTC
Created attachment 46924 [details] [review]
Patch removing prelight from active toggle buttons

By removing prelight from an active/enabled togglebutton. The difference
between a n active and non-active toggle is larger.
Comment 2 Jaap A. Haitsma 2005-06-05 16:14:00 UTC
ping. 
Could you review the patch?
Thanks
Comment 3 Jaap A. Haitsma 2005-06-05 17:52:55 UTC
Created attachment 47287 [details] [review]
Correct patch

Oops, of course the prelight has to remain for check buttons and radio buttons
etc.
Comment 4 Jaap A. Haitsma 2005-06-05 21:54:03 UTC
Created attachment 47296 [details] [review]
OK now really the correct patch
Comment 5 Jaap A. Haitsma 2005-06-06 20:04:17 UTC
Created attachment 47346 [details] [review]
Improved patch

I think this patch is a better than the previous one, because if now one of
children of togglebutton overides the button->enter method it will still work
Comment 6 Benjamin Berg 2005-06-13 20:58:17 UTC
Ok, as you said, this is theme dependend. So I think the best way is to fix the
theme/engine.
I personaly wouldn't like to loose the prelight, since the theme that I am using
has a nice prelight for toggle buttons.
Comment 7 Jaap A. Haitsma 2005-06-13 21:13:05 UTC
Is the prelight in your theme different for pressed and non pressed toggle buttons? 
The gtk code suggests to me that that is not possible.

What's the theme you use?
Comment 8 Benjamin Berg 2005-06-14 18:04:02 UTC
Hmm, you got a point here.
Yeah, it is impossible to define a different prelight colors for the toggle
button. I am using the eXperience theme. For prelight it draws all buttons as
before, but with an orange bevel around it. I think that this works good.

Well, it is possible to just use another color inside the engine, and an engine
can - by ignoring the prelight - do the same as you suggest, and just use the
active/normal colors.
The check in the engine will have to use the shadow_type to determine how to
draw the button. It will be IN for ACTIVE GtkToggleButtons, and OUT for NORMAL
ones. 

So IMHO this should be changed in the engine/theme.
Comment 9 Benjamin Berg 2005-06-14 18:29:55 UTC
It should also be possible to check the "active" property, or call
gtk_toggle_button_get_active ().
Comment 10 Federico Mena Quintero 2005-06-15 01:32:27 UTC
This is related to bug #301651
Comment 11 Jaap A. Haitsma 2005-06-17 18:34:00 UTC
OK I discovered that the newest clearlooks theme (cvs of today) changes somehow
the prelight for enabled togglebuttons. So it's possible to change it in a theme.
Closing this bug