summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2017-03-21 20:41:59 +0000
committertavmjong-free <tavmjong@free.fr>2017-03-21 20:41:59 +0000
commita6c82507f599a302e85f1a2faae0c6a27d672d9e (patch)
tree005f302120c98d8ac9bf9cc4ff6ef3d1b99f8837 /src
parentAdd verbs for canvas rotation. (diff)
downloadinkscape-a6c82507f599a302e85f1a2faae0c6a27d672d9e.tar.gz
inkscape-a6c82507f599a302e85f1a2faae0c6a27d672d9e.zip
Add entry for canvas rotate step in Inkscape Preferences dialog.
Change default rotation step to 15 degrees. (bzr r15605)
Diffstat (limited to 'src')
-rw-r--r--src/ui/dialog/inkscape-preferences.cpp3
-rw-r--r--src/ui/dialog/inkscape-preferences.h1
-rw-r--r--src/ui/tools/tool-base.cpp5
-rw-r--r--src/verbs.cpp3
-rw-r--r--src/widgets/desktop-widget.cpp5
5 files changed, 12 insertions, 5 deletions
diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp
index c5e8a6de6..958d73746 100644
--- a/src/ui/dialog/inkscape-preferences.cpp
+++ b/src/ui/dialog/inkscape-preferences.cpp
@@ -1310,6 +1310,9 @@ void InkscapePreferences::initPageBehavior()
_steps_zoom.init ( "/options/zoomincrement/value", 101.0, 500.0, 1.0, 1.0, M_SQRT2, true, true);
_page_steps.add_line( false, _("_Zoom in/out by:"), _steps_zoom, _("%"),
_("Zoom tool click, +/- keys, and middle click zoom in and out by this multiplier"), false);
+ _steps_rotate.init ( "/options/rotateincrement/value", 1, 90, 1.0, 5.0, 15, false, false);
+ _page_steps.add_line( false, _("_Rotate canvas by:"), _steps_rotate, _("degrees"),
+ _("Rotate canvas clockwise and counter-clockwise by this amount."), false);
this->AddPage(_page_steps, _("Steps"), iter_behavior, PREFS_PAGE_BEHAVIOR_STEPS);
// Clones options
diff --git a/src/ui/dialog/inkscape-preferences.h b/src/ui/dialog/inkscape-preferences.h
index 781b5e48e..91465f6a9 100644
--- a/src/ui/dialog/inkscape-preferences.h
+++ b/src/ui/dialog/inkscape-preferences.h
@@ -215,6 +215,7 @@ protected:
UI::Widget::PrefSpinUnit _steps_scale;
UI::Widget::PrefSpinUnit _steps_inset;
UI::Widget::PrefSpinButton _steps_zoom;
+ UI::Widget::PrefSpinButton _steps_rotate;
UI::Widget::PrefRadioButton _t_sel_trans_obj;
UI::Widget::PrefRadioButton _t_sel_trans_outl;
diff --git a/src/ui/tools/tool-base.cpp b/src/ui/tools/tool-base.cpp
index 389056762..cd5defcc6 100644
--- a/src/ui/tools/tool-base.cpp
+++ b/src/ui/tools/tool-base.cpp
@@ -760,8 +760,9 @@ bool ToolBase::root_handler(GdkEvent* event) {
/* ctrl + shift, rotate */
double rotate_inc = prefs->getDoubleLimited(
- "/options/rotateincrement/value", M_PI/90, M_PI/180, M_PI/4, "°" );
-
+ "/options/rotateincrement/value", 15, 1, 90, "°" );
+ rotate_inc *= M_PI/180.0;
+
switch (event->scroll.direction) {
case GDK_SCROLL_UP:
// Do nothing
diff --git a/src/verbs.cpp b/src/verbs.cpp
index d0f2f2614..78967e89b 100644
--- a/src/verbs.cpp
+++ b/src/verbs.cpp
@@ -1885,7 +1885,8 @@ void ZoomVerb::perform(SPAction *action, void *data)
gdouble zoom_inc =
prefs->getDoubleLimited( "/options/zoomincrement/value", M_SQRT2, 1.01, 10 );
gdouble rotate_inc =
- prefs->getDoubleLimited( "/options/rotateincrement/value", M_PI/90, M_PI/180, M_PI/4, "°" );
+ prefs->getDoubleLimited( "/options/rotateincrement/value", 15, 1, 90, "°" );
+ rotate_inc *= M_PI/180.0;
double zcorr = 1.0;
Glib::ustring abbr = prefs->getString("/options/zoomcorrection/unit");
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp
index 1587d7a05..d8c27f5b7 100644
--- a/src/widgets/desktop-widget.cpp
+++ b/src/widgets/desktop-widget.cpp
@@ -595,8 +595,9 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
gtk_widget_set_tooltip_text (dtw->rotation_status, _("Rotation. (Also Ctrl+Shift+Scroll)"));
gtk_widget_set_size_request (dtw->rotation_status, STATUS_ROTATION_WIDTH, -1);
gtk_entry_set_width_chars (GTK_ENTRY (dtw->rotation_status), 7);
- gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (dtw->rotation_status), FALSE);
- gtk_spin_button_set_digits (GTK_SPIN_BUTTON (dtw->rotation_status), 2);
+ gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (dtw->rotation_status), FALSE);
+ gtk_spin_button_set_digits (GTK_SPIN_BUTTON (dtw->rotation_status), 2);
+ gtk_spin_button_set_increments (GTK_SPIN_BUTTON (dtw->rotation_status), 1.0, 15.0);
gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (dtw->rotation_status), GTK_UPDATE_ALWAYS);
// Callbacks