diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-11-10 03:53:52 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-12-01 16:17:15 +0000 |
| commit | 4d1ba71e8d611170cf35345343f82de639db9aa4 (patch) | |
| tree | 5e78b4cdec9bbd1862a492746ff2b9d1b3f6e772 /src/display | |
| parent | Working with canvas to split (diff) | |
| download | inkscape-4d1ba71e8d611170cf35345343f82de639db9aa4.tar.gz inkscape-4d1ba71e8d611170cf35345343f82de639db9aa4.zip | |
Handling cursor for dragin split
Diffstat (limited to 'src/display')
| -rw-r--r-- | src/display/sp-canvas.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp index ae7427f69..b9c09bec1 100644 --- a/src/display/sp-canvas.cpp +++ b/src/display/sp-canvas.cpp @@ -1994,11 +1994,13 @@ int SPCanvas::paint() arena = SP_CANVAS_ARENA (desktop->drawing); split_x = !vertical ? 1 : value; split_y = vertical ? 1 : value; - Geom::IntCoord coord1x = allocation.x + (int(allocation.width * (1-split_x))) - 1; - Geom::IntCoord coord1y = allocation.y + (int(allocation.height * (1-split_y))) - 1; - Geom::IntCoord coord2x = allocation.x + (int(allocation.width * split_x)) + 1; - Geom::IntCoord coord2y = allocation.y + (int(allocation.height * split_y)) + 1; - _spliter = Geom::OptIntRect(coord1x, coord1y, coord2x, coord2y); + guint hruler_gap = desktop->get_hruler_thickness(); + guint vruler_gap = desktop->get_vruler_thickness(); + Geom::IntCoord coord1x = allocation.x + (int(allocation.width * (1-split_x))) - 1 - vruler_gap; + Geom::IntCoord coord1y = allocation.y + (int(allocation.height * (1-split_y))) - 1 - hruler_gap; + Geom::IntCoord coord2x = allocation.x + (int(allocation.width * split_x)) + 1 - vruler_gap; + Geom::IntCoord coord2y = allocation.y + (int(allocation.height * split_y)) + 1 - hruler_gap; + _spliter = Geom::OptIntRect(coord1x, coord1y, coord2x, coord2y); } cairo_rectangle_int_t crect = { _x0, _y0, int(allocation.width * split_x), int(allocation.height * split_y)}; cairo_rectangle_int_t crect_outline = { _x0 + int(allocation.width * (1-split_x)), _y0 + int(allocation.height * (1-split_y)), int(allocation.width * split_x), int(allocation.height * split_y)}; |
