diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-12-29 10:18:01 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-12-29 10:18:01 +0000 |
| commit | 9564781d4eef5ac13b2c4ec393171d00fbdacd1d (patch) | |
| tree | 93481b36fc6004238b6e919db03ac1680e11f096 /src/ui/dialog | |
| parent | remove git remnants (diff) | |
| parent | Merge branch 'master' into powerpencilII (diff) | |
| download | inkscape-9564781d4eef5ac13b2c4ec393171d00fbdacd1d.tar.gz inkscape-9564781d4eef5ac13b2c4ec393171d00fbdacd1d.zip | |
Merge branch 'master' of gitlab.com:inkscape/inkscape
Diffstat (limited to 'src/ui/dialog')
| -rw-r--r-- | src/ui/dialog/inkscape-preferences.cpp | 41 | ||||
| -rw-r--r-- | src/ui/dialog/inkscape-preferences.h | 5 |
2 files changed, 7 insertions, 39 deletions
diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index f1129513f..0ac12d15c 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -204,41 +204,15 @@ void InkscapePreferences::AddBaseSimplifySpinbutton(DialogPage &p, Glib::ustring false ); } -void InkscapePreferences::AddPressureSensibility(DialogPage &p, Glib::ustring const &prefs_path, double def_value) +void InkscapePreferences::AddPencilPowerStrokePressureStep(DialogPage &p, Glib::ustring const &prefs_path, gint def_value) { PrefSpinButton* sb = Gtk::manage( new PrefSpinButton); - sb->init ( prefs_path + "/pressure-sensibility", 1, 100.0, 1.0, 10.0, def_value, true, false); - p.add_line( false, _("Pressure sensibility:"), *sb, _("on tablet usage"), - _("Pressure sensibility, 12 is the default value"), + sb->init ( prefs_path + "/ps-step-pressure", 1, 100, 1, 10, def_value, true, false); + p.add_line( false, _("Pressure change for new knot:"), *sb, _("%"), + _("Percentage increase / decrease of stylus pressure that is required to create a new PowerStroke knot."), false ); } -void InkscapePreferences::AddPowerStrokeKnotDistanceFactor(DialogPage &p, Glib::ustring const &prefs_path, double def_value) -{ - PrefSpinButton* sb = Gtk::manage( new PrefSpinButton); - sb->init ( prefs_path + "/knots-distance", 0.1, 9999.0, 1.0, 10.0, def_value, false, false); - p.add_line( false, _("Pressure min knot distance factor:"), *sb, _("on tablet usage"), - _("Min distance between knots, this is a factor value computed with other parameters, 135 is the default one"), - false ); -} - -void InkscapePreferences::AddPowerStrokeGapPressureFactor(DialogPage &p, Glib::ustring const &prefs_path, double def_value) -{ - PrefSpinButton* sb = Gtk::manage( new PrefSpinButton); - sb->init ( prefs_path + "/gap-pressure", 0.01, 9999.0, 1.0, 10.0, def_value, false, false); - p.add_line( false, _("Pressure inputs difference for made knots:"), *sb, _("on tablet usage"), - _("Diference between input pressure to make a powerstroke knot, this is a factor value computed with other parameters, 1 is the default value"), - false ); -} - -void InkscapePreferences::AddPowerStrokeUseOptimusValues(DialogPage &p, Glib::ustring const &prefs_path, bool def_value) -{ - PrefCheckButton* cb = Gtk::manage( new PrefCheckButton); - cb->init ( _("Use optimiced powerstroke values instead the default ones:"), prefs_path + "/optimus-powerstroke", def_value); - p.add_line( false, "", *cb, "", _("Use optimized powerstroke parameters values in pencil tool por pressure inputs instead the default ones")); -} - - static void StyleFromSelectionToTool(Glib::ustring const &prefs_path, StyleSwatch *swatch) { SPDesktop *desktop = SP_ACTIVE_DESKTOP; @@ -457,11 +431,8 @@ void InkscapePreferences::initPageTools() this->AddNewObjectsStyle(_page_pencil, "/tools/freehand/pencil"); this->AddDotSizeSpinbutton(_page_pencil, "/tools/freehand/pencil", 3.0); this->AddBaseSimplifySpinbutton(_page_pencil, "/tools/freehand/pencil", 25.0); - _page_pencil.add_group_header( _("Pencil pressure")); - this->AddPowerStrokeUseOptimusValues(_page_pencil, "/tools/freehand/pencil", true); - this->AddPressureSensibility(_page_pencil, "/tools/freehand/pencil", 12.0); - this->AddPowerStrokeKnotDistanceFactor(_page_pencil, "/tools/freehand/pencil", 135.0); - this->AddPowerStrokeGapPressureFactor(_page_pencil, "/tools/freehand/pencil", 1.0); + _page_pencil.add_group_header( _("Pressure sensitivity settings")); + this->AddPencilPowerStrokePressureStep(_page_pencil, "/tools/freehand/pencil", 5); _page_pencil.add_group_header( _("Sketch mode")); _page_pencil.add_line( true, "", _pencil_average_all_sketches, "", diff --git a/src/ui/dialog/inkscape-preferences.h b/src/ui/dialog/inkscape-preferences.h index 58e61470c..e0bd7f257 100644 --- a/src/ui/dialog/inkscape-preferences.h +++ b/src/ui/dialog/inkscape-preferences.h @@ -501,10 +501,7 @@ protected: static void AddFirstAndLastCheckbox(UI::Widget::DialogPage& p, Glib::ustring const &prefs_path, bool def_value); static void AddDotSizeSpinbutton(UI::Widget::DialogPage& p, Glib::ustring const &prefs_path, double def_value); static void AddBaseSimplifySpinbutton(UI::Widget::DialogPage& p, Glib::ustring const &prefs_path, double def_value); - static void AddPressureSensibility(UI::Widget::DialogPage& p, Glib::ustring const &prefs_path, double def_value); - static void AddPowerStrokeKnotDistanceFactor(UI::Widget::DialogPage& p, Glib::ustring const &prefs_path, double def_value); - static void AddPowerStrokeGapPressureFactor(UI::Widget::DialogPage& p, Glib::ustring const &prefs_path, double def_value); - static void AddPowerStrokeUseOptimusValues(UI::Widget::DialogPage& p, Glib::ustring const &prefs_path, bool def_value); + static void AddPencilPowerStrokePressureStep(UI::Widget::DialogPage& p, Glib::ustring const &prefs_path, gint def_value); static void AddNewObjectsStyle(UI::Widget::DialogPage& p, Glib::ustring const &prefs_path, const gchar* banner = NULL); void on_pagelist_selection_changed(); |
