GNOME Bugzilla – Bug 645134
switch: fix boundaries for the switch motion
Last modified: 2011-03-18 13:52:46 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.
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.
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.
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