[rhythmbox] header: munge button events to pretend the slider trough is much wider
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] header: munge button events to pretend the slider trough is much wider
- Date: Sat, 27 Oct 2012 13:31:58 +0000 (UTC)
commit 493e85023f8fe9bf0996141d2eb6bcdbd657e833
Author: Jonathan Matthew <jonathan d14n org>
Date: Sat Oct 27 23:31:25 2012 +1000
header: munge button events to pretend the slider trough is much wider
widgets/rb-header.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/widgets/rb-header.c b/widgets/rb-header.c
index 3ea65e1..54fcb71 100644
--- a/widgets/rb-header.c
+++ b/widgets/rb-header.c
@@ -886,6 +886,8 @@ slider_press_callback (GtkWidget *widget,
GdkEventButton *event,
RBHeader *header)
{
+ int height;
+
header->priv->slider_dragging = TRUE;
header->priv->slider_drag_moved = FALSE;
header->priv->latest_set_time = -1;
@@ -900,6 +902,10 @@ slider_press_callback (GtkWidget *widget,
event->button = 2;
#endif
+ /* more hack: pretend the trough is at least 20 pixels high */
+ height = gtk_widget_get_allocated_height (widget);
+ if (abs (event->y - (height / 2)) < 10)
+ event->y = height / 2;
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]