diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2016-03-24 01:28:21 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2016-03-24 01:28:21 +0000 |
| commit | 718f5323cdab58042763107010fafbdc697c3c4f (patch) | |
| tree | 164e442357777ac1714464415943e6869b901a8a /src/ui | |
| parent | Fixing Krzysztof review (diff) | |
| parent | "Backport" some Krzysztof review parts of mirror symmetry LPE also hapens on ... (diff) | |
| download | inkscape-718f5323cdab58042763107010fafbdc697c3c4f.tar.gz inkscape-718f5323cdab58042763107010fafbdc697c3c4f.zip | |
update to trunk
(bzr r13682.1.37)
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/draw-anchor.cpp | 9 | ||||
| -rw-r--r-- | src/ui/interface.cpp | 2 | ||||
| -rw-r--r-- | src/ui/tools/pen-tool.cpp | 21 | ||||
| -rw-r--r-- | src/ui/widget/preferences-widget.cpp | 4 | ||||
| -rw-r--r-- | src/ui/widget/unit-tracker.h | 2 |
5 files changed, 25 insertions, 13 deletions
diff --git a/src/ui/draw-anchor.cpp b/src/ui/draw-anchor.cpp index 6b9a88ed7..e5a7a493e 100644 --- a/src/ui/draw-anchor.cpp +++ b/src/ui/draw-anchor.cpp @@ -26,6 +26,9 @@ using Inkscape::ControlManager; #define FILL_COLOR_NORMAL 0xffffff7f #define FILL_COLOR_MOUSEOVER 0xff0000ff +#define NODE_SIZE_NORMAL 7.0 +#define NODE_SIZE_MOUSEOVER 10.0 + /** * Creates an anchor object and initializes it. */ @@ -78,14 +81,16 @@ SPDrawAnchor *sp_draw_anchor_test(SPDrawAnchor *anchor, Geom::Point w, bool acti if ( activate && ( Geom::LInfty( w - anchor->dc->getDesktop().d2w(anchor->dp) ) <= (ctrl->box.width() / 2.0) ) ) { if (!anchor->active) { - g_object_set(anchor->ctrl, "fill_color", FILL_COLOR_MOUSEOVER, NULL); + g_object_set(anchor->ctrl, "fill_color", FILL_COLOR_MOUSEOVER, + "size", NODE_SIZE_MOUSEOVER, NULL); anchor->active = TRUE; } return anchor; } if (anchor->active) { - g_object_set(anchor->ctrl, "fill_color", FILL_COLOR_NORMAL, NULL); + g_object_set(anchor->ctrl, "fill_color", FILL_COLOR_NORMAL, + "size", NODE_SIZE_NORMAL, NULL); anchor->active = FALSE; } return NULL; diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp index 69b229519..531aa728d 100644 --- a/src/ui/interface.cpp +++ b/src/ui/interface.cpp @@ -1786,7 +1786,7 @@ void ContextMenu::MakeItemMenu (void) /* Group */ mi = Gtk::manage(new Gtk::MenuItem(_("_Group"), 1)); mi->signal_activate().connect(sigc::mem_fun(*this, &ContextMenu::ActivateGroup)); - if (_desktop->selection->isEmpty() || _desktop->selection->single()) { + if (_desktop->selection->isEmpty()) { mi->set_sensitive(FALSE); } else { mi->set_sensitive(TRUE); diff --git a/src/ui/tools/pen-tool.cpp b/src/ui/tools/pen-tool.cpp index 2ed366a7d..18af8e105 100644 --- a/src/ui/tools/pen-tool.cpp +++ b/src/ui/tools/pen-tool.cpp @@ -1220,7 +1220,18 @@ bool PenTool::_handleKeyPress(GdkEvent *event) { case GDK_KEY_KP_Enter: if (this->npoints != 0) { this->ea = NULL; // unset end anchor if set (otherwise crashes) - this->_finish(false); + if(MOD__SHIFT_ONLY(event)) { + // All this is needed to stop the last control + // point dispeating and stop making an n-1 shape. + Geom::Point const p(0, 0); + if(this->red_curve->is_empty()) { + this->red_curve->moveto(p); + } + this->_finishSegment(p, 0); + this->_finish(true); + } else { + this->_finish(false); + } ret = true; } break; @@ -1783,12 +1794,12 @@ void PenTool::_setSubsequentPoint(Geom::Point const p, bool statusbar, guint sta if (statusbar) { gchar *message = is_curve ? - _("<b>Curve segment</b>: angle %3.2f°, distance %s; with <b>Ctrl</b> to snap angle, <b>Enter</b> to finish the path" ): - _("<b>Line segment</b>: angle %3.2f°, distance %s; with <b>Ctrl</b> to snap angle, <b>Enter</b> to finish the path"); + _("<b>Curve segment</b>: angle %3.2f°, distance %s; with <b>Ctrl</b> to snap angle, <b>Enter</b> or <b>Shift+Enter</b> to finish the path" ): + _("<b>Line segment</b>: angle %3.2f°, distance %s; with <b>Ctrl</b> to snap angle, <b>Enter</b> or <b>Shift+Enter</b> to finish the path"); if(this->spiro || this->bspline){ message = is_curve ? - _("<b>Curve segment</b>: angle %3.2f°, distance %s; with <b>Shift+Click</b> make a cusp node, <b>Enter</b> to finish the path" ): - _("<b>Line segment</b>: angle %3.2f°, distance %s; with <b>Shift+Click</b> make a cusp node, <b>Enter</b> to finish the path"); + _("<b>Curve segment</b>: angle %3.2f°, distance %s; with <b>Shift+Click</b> make a cusp node, <b>Enter</b> or <b>Shift+Enter</b> to finish the path" ): + _("<b>Line segment</b>: angle %3.2f°, distance %s; with <b>Shift+Click</b> make a cusp node, <b>Enter</b> or <b>Shift+Enter</b> to finish the path"); } this->_setAngleDistanceStatusMessage(p, 0, message); } diff --git a/src/ui/widget/preferences-widget.cpp b/src/ui/widget/preferences-widget.cpp index e906762e3..d56506d62 100644 --- a/src/ui/widget/preferences-widget.cpp +++ b/src/ui/widget/preferences-widget.cpp @@ -468,12 +468,8 @@ ZoomCorrRuler::on_draw(const Cairo::RefPtr<Cairo::Context>& cr) { Glib::ustring abbr = prefs->getString("/options/zoomcorrection/unit"); if (abbr == "cm") { draw_marks(cr, 0.1, 10); - } else if (abbr == "ft") { - draw_marks(cr, 1/12.0, 12); } else if (abbr == "in") { draw_marks(cr, 0.25, 4); - } else if (abbr == "m") { - draw_marks(cr, 1/10.0, 10); } else if (abbr == "mm") { draw_marks(cr, 10, 10); } else if (abbr == "pc") { diff --git a/src/ui/widget/unit-tracker.h b/src/ui/widget/unit-tracker.h index 0fe5bda80..8fa9ff304 100644 --- a/src/ui/widget/unit-tracker.h +++ b/src/ui/widget/unit-tracker.h @@ -42,8 +42,8 @@ public: Inkscape::Util::Unit const * getActiveUnit() const; void addUnit(Inkscape::Util::Unit const *u); - void prependUnit(Inkscape::Util::Unit const *u); void addAdjustment(GtkAdjustment *adj); + void prependUnit(Inkscape::Util::Unit const *u); void setFullVal(GtkAdjustment *adj, gdouble val); GtkAction *createAction(gchar const *name, gchar const *label, gchar const *tooltip); |
