Code

Ctrl+click in pen/pencil tool: Created dots are now selected; Alt is used for randomn...
[inkscape.git] / src / ui / dialog / inkscape-preferences.cpp
index b0c8bcb85fedda751d74d478977b364eef534472..34e97a71372789c4e35634d1e1abcd8d4a85d81f 100644 (file)
@@ -235,6 +235,16 @@ void InkscapePreferences::AddConvertGuidesCheckbox(DialogPage& p, const std::str
     p.add_line( false, "", *cb, "", _("Converting an object to guides places these along the object's true edges (imitating the object's shape), not along the bounding box."));
 }
 
+void InkscapePreferences::AddDotSizeSpinbutton(DialogPage& p, const std::string& prefs_path, double def_value)
+{
+    PrefSpinButton* sb = Gtk::manage( new PrefSpinButton);
+    sb->init ( prefs_path, "dot-size", 0.0, 1000.0, 0.1, 10.0, def_value, false, false);
+    p.add_line( false, _("Ctrl+click dot size:"), *sb, "times current stroke width", 
+                       _("Size of dots created with Ctrl+click (relative to current stroke width)"),
+                       false );
+}
+
+
 void StyleFromSelectionToTool(gchar const *prefs_path, StyleSwatch *swatch)
 {
     SPDesktop *desktop = SP_ACTIVE_DESKTOP;
@@ -407,10 +417,12 @@ void InkscapePreferences::initPageTools()
                            _("This value affects the amount of smoothing applied to freehand lines; lower values produce more uneven paths with more nodes"),
                            false );
     this->AddNewObjectsStyle(_page_pencil, "tools.freehand.pencil");
+    this->AddDotSizeSpinbutton(_page_pencil, "tools.freehand.pencil", 3.0);
     //Pen
     this->AddPage(_page_pen, _("Pen"), iter_tools, PREFS_PAGE_TOOLS_PEN);
     this->AddSelcueCheckbox(_page_pen, "tools.freehand.pen", true);
     this->AddNewObjectsStyle(_page_pen, "tools.freehand.pen");
+    this->AddDotSizeSpinbutton(_page_pen, "tools.freehand.pen", 3.0);
     //Calligraphy
     this->AddPage(_page_calligraphy, _("Calligraphy"), iter_tools, PREFS_PAGE_TOOLS_CALLIGRAPHY);
     this->AddSelcueCheckbox(_page_calligraphy, "tools.calligraphic", false);