diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-11-09 00:28:21 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-12-01 16:15:28 +0000 |
| commit | ea12fd7a597d4dc0707bf7e16e5c9fdb65f6aae5 (patch) | |
| tree | ff056d51563271f3a58f6758594968c213a0f974 | |
| parent | Initial commit of split canvas (diff) | |
| download | inkscape-ea12fd7a597d4dc0707bf7e16e5c9fdb65f6aae5.tar.gz inkscape-ea12fd7a597d4dc0707bf7e16e5c9fdb65f6aae5.zip | |
Adding minor fixes
| -rw-r--r-- | src/desktop.cpp | 2 | ||||
| -rw-r--r-- | src/display/sp-canvas.cpp | 8 | ||||
| -rw-r--r-- | src/preferences-skeleton.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/desktop.cpp b/src/desktop.cpp index 027e6ff45..b3065c2d4 100644 --- a/src/desktop.cpp +++ b/src/desktop.cpp @@ -1555,7 +1555,7 @@ void SPDesktop::toggleSplitMode() dtw->splitCanvas(_split_canvas); GtkAllocation allocation; gtk_widget_get_allocation(GTK_WIDGET(dtw->canvas), &allocation); - getCanvas()->requestRedraw(getCanvas()->_x0, getCanvas()->_y0, allocation.width, allocation.height); + getCanvas()->requestRedraw(getCanvas()->_x0, getCanvas()->_y0, getCanvas()->_x0 + allocation.width, getCanvas()->_y0 + allocation.height); } } diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp index 927d7c9cd..4b11fe707 100644 --- a/src/display/sp-canvas.cpp +++ b/src/display/sp-canvas.cpp @@ -1948,15 +1948,15 @@ int SPCanvas::paint() SPCanvasArena *arena = nullptr; bool split = false; bool inverse = prefs->getBool("/window/splitcanvas/inverse", false); + bool vertical = prefs->getBool("/window/splitcanvas/vertical", true); double split_x = 1; double split_y = 1; - double split_width = 1; - double split_height = 1; if (desktop && desktop->splitMode()) { + double value = split_x = prefs->getDoubleLimited("/window/splitcanvas/value", 0.5, 0, 1); split = desktop->splitMode(); arena = SP_CANVAS_ARENA (desktop->drawing); - split_x = prefs->getDoubleLimited("/window/splitcanvas/x", 0.5, 0, 1); - split_y = prefs->getDoubleLimited("/window/splitcanvas/y", 1 , 0, 1); + split_x = !vertical ? 1 : value; + split_y = vertical ? 1 : value; } GtkAllocation allocation; gtk_widget_get_allocation(GTK_WIDGET(this), &allocation); diff --git a/src/preferences-skeleton.h b/src/preferences-skeleton.h index 144ad5096..06a00d2af 100644 --- a/src/preferences-skeleton.h +++ b/src/preferences-skeleton.h @@ -37,7 +37,7 @@ static char const preferences_skeleton[] = " <group id=\"panels\" state=\"1\"/>\n" " <group id=\"rulers\" state=\"1\"/>\n" " <group id=\"scrollbars\" state=\"1\"/>\n" -" <group id=\"splitcanvas\" x=\"0.5\" y=\"0\" inverse=\"0\" />\n" +" <group id=\"splitcanvas\" value=\"0.5\" vertical=\"1\" inverse=\"0\" />\n" " </group>\n" " <group id=\"fullscreen\">\n" " <group id=\"task\" />\n" |
