diff options
| author | Martin Owens <doctormo@gmail.com> | 2016-04-02 18:21:12 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2016-04-02 18:21:12 +0000 |
| commit | ab843636c11bb0d0550a8987fbdfcb089a55832e (patch) | |
| tree | ce5db2b27601e5726a3183abccafcde41f6755e2 /src/ui/draw-anchor.cpp | |
| parent | Remove unused variable warnings. (diff) | |
| download | inkscape-ab843636c11bb0d0550a8987fbdfcb089a55832e.tar.gz inkscape-ab843636c11bb0d0550a8987fbdfcb089a55832e.zip | |
Fix node size regression and add ctrlResize property for multiple use.
Fixed bugs:
- https://launchpad.net/bugs/1562197
(bzr r14761)
Diffstat (limited to 'src/ui/draw-anchor.cpp')
| -rw-r--r-- | src/ui/draw-anchor.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/ui/draw-anchor.cpp b/src/ui/draw-anchor.cpp index e5a7a493e..c3bc5676d 100644 --- a/src/ui/draw-anchor.cpp +++ b/src/ui/draw-anchor.cpp @@ -26,9 +26,6 @@ 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. */ @@ -81,18 +78,19 @@ 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, - "size", NODE_SIZE_MOUSEOVER, NULL); + ControlManager::getManager().setControlResize(anchor->ctrl, 4); + g_object_set(anchor->ctrl, "fill_color", FILL_COLOR_MOUSEOVER, NULL); anchor->active = TRUE; } return anchor; } if (anchor->active) { - g_object_set(anchor->ctrl, "fill_color", FILL_COLOR_NORMAL, - "size", NODE_SIZE_NORMAL, NULL); + ControlManager::getManager().setControlResize(anchor->ctrl, 0); + g_object_set(anchor->ctrl, "fill_color", FILL_COLOR_NORMAL, NULL); anchor->active = FALSE; } + return NULL; } |
