mirror of https://github.com/GNOME/gimp.git
request motion hints in the navigation popup and redraw the window
2005-11-22 Sven Neumann <sven@gimp.org> * libgimpwidgets/gimpscrolledpreview.c: request motion hints in the navigation popup and redraw the window immidiately to give better feedback.
This commit is contained in:
parent
e7acde6676
commit
887129a2c3
|
@ -1,3 +1,9 @@
|
|||
2005-11-22 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimpwidgets/gimpscrolledpreview.c: request motion hints in
|
||||
the navigation popup and redraw the window immidiately to give
|
||||
better feedback.
|
||||
|
||||
2005-11-22 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimpwidgets/gimppreview.c: moved the controls closer to the
|
||||
|
|
|
@ -601,7 +601,9 @@ gimp_scrolled_preview_nav_button_press (GtkWidget *widget,
|
|||
GDK_FLEUR);
|
||||
|
||||
gdk_pointer_grab (area->window, TRUE,
|
||||
GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_MOTION_MASK,
|
||||
GDK_BUTTON_RELEASE_MASK |
|
||||
GDK_BUTTON_MOTION_MASK |
|
||||
GDK_POINTER_MOTION_HINT_MASK,
|
||||
area->window, cursor,
|
||||
event->time);
|
||||
|
||||
|
@ -665,15 +667,16 @@ gimp_scrolled_preview_nav_popup_event (GtkWidget *widget,
|
|||
GdkEventMotion *motion_event = (GdkEventMotion *) event;
|
||||
GtkAdjustment *hadj;
|
||||
GtkAdjustment *vadj;
|
||||
gint cx, cy;
|
||||
gdouble x, y;
|
||||
|
||||
hadj = gtk_range_get_adjustment (GTK_RANGE (preview->hscr));
|
||||
vadj = gtk_range_get_adjustment (GTK_RANGE (preview->vscr));
|
||||
|
||||
x = (motion_event->x *
|
||||
(hadj->upper - hadj->lower) / widget->allocation.width);
|
||||
y = (motion_event->y *
|
||||
(vadj->upper - vadj->lower) / widget->allocation.height);
|
||||
gtk_widget_get_pointer (widget, &cx, &cy);
|
||||
|
||||
x = cx * (hadj->upper - hadj->lower) / widget->allocation.width;
|
||||
y = cy * (vadj->upper - vadj->lower) / widget->allocation.height;
|
||||
|
||||
x += hadj->lower - hadj->page_size / 2;
|
||||
y += vadj->lower - vadj->page_size / 2;
|
||||
|
@ -686,6 +689,7 @@ gimp_scrolled_preview_nav_popup_event (GtkWidget *widget,
|
|||
vadj->upper - vadj->page_size));
|
||||
|
||||
gtk_widget_queue_draw (widget);
|
||||
gdk_window_process_updates (widget->window, FALSE);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue