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 645134 - switch: fix boundaries for the switch motion
switch: fix boundaries for the switch motion
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-03-18 13:44 UTC by Cosimo Cecchi
Modified: 2011-03-18 13:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
switch: fix boundaries for the switch motion (1.93 KB, patch)
2011-03-18 13:44 UTC, Cosimo Cecchi
committed Details | Review

Description Cosimo Cecchi 2011-03-18 13:44:00 UTC
GtkSwitch has a bug when dragging it; if you try drag the slider outside the trough boundaries, it will overflow the allocated space. This patch fixes it.
Comment 1 Cosimo Cecchi 2011-03-18 13:44:07 UTC
Created attachment 183716 [details] [review]
switch: fix boundaries for the switch motion

We were ignoring the focus ring padding, and we were incorrectly setting
handle_x to padding.left, while the draw handler already takes padding
into account while redrawing.
Comment 2 Emmanuele Bassi (:ebassi) 2011-03-18 13:47:52 UTC
Review of attachment 183716 [details] [review]:

looks generally okay to me.

was pondering on the cost of getting the style class and querying the padding for each motion notification. if it's just querying cached data then it's fine, but otherwise it might be worth caching this stuff ourselves on each style-updated.
Comment 3 Emmanuele Bassi (:ebassi) 2011-03-18 13:47:53 UTC
Review of attachment 183716 [details] [review]:

looks generally okay to me.

was pondering on the cost of getting the style class and querying the padding for each motion notification. if it's just querying cached data then it's fine, but otherwise it might be worth caching this stuff ourselves on each style-updated.
Comment 4 Cosimo Cecchi 2011-03-18 13:52:39 UTC
GtkStyleContext caches the properties for us, so I pushed this.
Thanks for the review!

Attachment 183716 [details] pushed as 78051a6 - switch: fix boundaries for the switch motion