X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2Fxo-paint.c;h=f52f1240173e4c6143cd05481781dfd71e5b94b6;hb=0c9075b0b48fb9d2c36327bc70eb95dcc0942e3c;hp=798643c49fa3100e1f3e70eaea481e36e321ca59;hpb=78c2f8fa93f7adcb9157699c92b1498d878f66b2;p=xournal.git diff --git a/src/xo-paint.c b/src/xo-paint.c index 798643c..f52f124 100644 --- a/src/xo-paint.c +++ b/src/xo-paint.c @@ -93,6 +93,9 @@ void update_cursor(void) else if (ui.cur_item_type == ITEM_SELECTRECT) { ui.cursor = gdk_cursor_new(GDK_TCROSS); } + else if (ui.toolno[ui.cur_mapping] == TOOL_HAND) { + ui.cursor = gdk_cursor_new(GDK_HAND1); + } gdk_window_set_cursor(GTK_WIDGET(canvas)->window, ui.cursor); } @@ -895,3 +898,15 @@ void rethicken_selection(int val) "width-units", item->brush.thickness, NULL); } } + +void do_hand(GdkEvent *event) +{ + double pt[2], val; + int cx, cy; + + get_pointer_coords(event, pt); + gnome_canvas_get_scroll_offsets(canvas, &cx, &cy); + cx -= (pt[0]-ui.hand_refpt[0])*ui.zoom; + cy -= (pt[1]-ui.hand_refpt[1])*ui.zoom; + gnome_canvas_scroll_to(canvas, cx, cy); +}