From: Carlos Lopez Date: Wed, 13 Jan 2010 18:30:20 +0000 (+0100) Subject: Suit new standard Gdk cursors for the Mirror, Rotate, Scale, Smooth move and Text... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=921fdb078945d6d08cfc9d3025486b338fe043b1;p=synfig.git Suit new standard Gdk cursors for the Mirror, Rotate, Scale, Smooth move and Text tools --- diff --git a/synfig-studio/src/gtkmm/mod_mirror/state_mirror.cpp b/synfig-studio/src/gtkmm/mod_mirror/state_mirror.cpp index a2594ad..4ed6a07 100644 --- a/synfig-studio/src/gtkmm/mod_mirror/state_mirror.cpp +++ b/synfig-studio/src/gtkmm/mod_mirror/state_mirror.cpp @@ -124,6 +124,7 @@ public: void update_axes() { duck_dragger_->axis=get_axis(); + get_canvas_view()->work_area->set_cursor(get_axis() == AXIS_X?Gdk::SB_H_DOUBLE_ARROW:Gdk::SB_V_DOUBLE_ARROW); } Smach::event_result event_stop_handler(const Smach::event& x); @@ -201,8 +202,8 @@ StateMirror_Context::StateMirror_Context(CanvasView* canvas_view): keypress_connect=get_work_area()->signal_key_press_event().connect(sigc::mem_fun(*this,&StateMirror_Context::key_event),false); keyrelease_connect=get_work_area()->signal_key_release_event().connect(sigc::mem_fun(*this,&StateMirror_Context::key_event),false); -// get_canvas_view()->work_area->set_cursor(Gdk::CROSSHAIR); - get_canvas_view()->work_area->reset_cursor(); + get_canvas_view()->work_area->set_cursor(Gdk::SB_H_DOUBLE_ARROW); +// get_canvas_view()->work_area->reset_cursor(); App::toolbox->refresh(); @@ -214,7 +215,10 @@ bool StateMirror_Context::key_event(GdkEventKey *event) { if (event->keyval==GDK_Shift_L || event->keyval==GDK_Shift_R ) + { set_axis(get_axis()==AXIS_X ? AXIS_Y:AXIS_X); + get_canvas_view()->work_area->set_cursor(get_axis() == AXIS_X?Gdk::SB_H_DOUBLE_ARROW:Gdk::SB_V_DOUBLE_ARROW); + } return false; //Pass on the event to other handlers, just in case } diff --git a/synfig-studio/src/gtkmm/state_rotate.cpp b/synfig-studio/src/gtkmm/state_rotate.cpp index 64d2e35..7ffa4f2 100644 --- a/synfig-studio/src/gtkmm/state_rotate.cpp +++ b/synfig-studio/src/gtkmm/state_rotate.cpp @@ -195,8 +195,8 @@ StateRotate_Context::StateRotate_Context(CanvasView* canvas_view): get_work_area()->set_allow_layer_clicks(true); get_work_area()->set_duck_dragger(duck_dragger_); -// get_canvas_view()->work_area->set_cursor(Gdk::CROSSHAIR); - get_canvas_view()->work_area->reset_cursor(); + get_canvas_view()->work_area->set_cursor(Gdk::EXCHANGE); +// get_canvas_view()->work_area->reset_cursor(); App::toolbox->refresh(); diff --git a/synfig-studio/src/gtkmm/state_scale.cpp b/synfig-studio/src/gtkmm/state_scale.cpp index bd2305b..5f8a2f5 100644 --- a/synfig-studio/src/gtkmm/state_scale.cpp +++ b/synfig-studio/src/gtkmm/state_scale.cpp @@ -181,8 +181,8 @@ StateScale_Context::StateScale_Context(CanvasView* canvas_view): get_work_area()->set_allow_layer_clicks(true); get_work_area()->set_duck_dragger(duck_dragger_); -// get_canvas_view()->work_area->set_cursor(Gdk::CROSSHAIR); - get_canvas_view()->work_area->reset_cursor(); + get_canvas_view()->work_area->set_cursor(Gdk::SIZING); +// get_canvas_view()->work_area->reset_cursor(); App::toolbox->refresh(); diff --git a/synfig-studio/src/gtkmm/state_smoothmove.cpp b/synfig-studio/src/gtkmm/state_smoothmove.cpp index 57862d8..d8221e9 100644 --- a/synfig-studio/src/gtkmm/state_smoothmove.cpp +++ b/synfig-studio/src/gtkmm/state_smoothmove.cpp @@ -197,8 +197,8 @@ StateSmoothMove_Context::StateSmoothMove_Context(CanvasView* canvas_view): App::toolbox->refresh(); -// get_canvas_view()->work_area->set_cursor(Gdk::CROSSHAIR); - get_canvas_view()->work_area->reset_cursor(); + get_canvas_view()->work_area->set_cursor(Gdk::FLEUR); + //get_canvas_view()->work_area->reset_cursor(); load_settings(); } diff --git a/synfig-studio/src/gtkmm/state_text.cpp b/synfig-studio/src/gtkmm/state_text.cpp index c1912ab..0ee03ac 100644 --- a/synfig-studio/src/gtkmm/state_text.cpp +++ b/synfig-studio/src/gtkmm/state_text.cpp @@ -317,7 +317,7 @@ StateText_Context::StateText_Context(CanvasView *canvas_view): // Connect a signal //get_work_area()->signal_user_click().connect(sigc::mem_fun(*this,&studio::StateText_Context::on_user_click)); - get_canvas_view()->work_area->set_cursor(Gdk::CROSSHAIR); + get_canvas_view()->work_area->set_cursor(Gdk::XTERM); App::toolbox->refresh(); }