summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/transformation.cpp
diff options
context:
space:
mode:
authorThomas Holder <thomas@thomas-holder.de>2018-09-18 14:29:23 +0000
committerThomas Holder <thomas@thomas-holder.de>2018-09-20 13:17:31 +0000
commitc37ae911dde4dffe81173c39d6da7d9163b143f7 (patch)
treeff7a6dd9ba890a207d9ba51b3547dfaaa083f7e8 /src/ui/dialog/transformation.cpp
parentFix build (diff)
downloadinkscape-c37ae911dde4dffe81173c39d6da7d9163b143f7.tar.gz
inkscape-c37ae911dde4dffe81173c39d6da7d9163b143f7.zip
fix transform dialog icons with inverted y-axis
Diffstat (limited to 'src/ui/dialog/transformation.cpp')
-rw-r--r--src/ui/dialog/transformation.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/ui/dialog/transformation.cpp b/src/ui/dialog/transformation.cpp
index 14ddc9044..2bf13608f 100644
--- a/src/ui/dialog/transformation.cpp
+++ b/src/ui/dialog/transformation.cpp
@@ -125,6 +125,13 @@ Transformation::Transformation()
_check_apply_separately.set_active(prefs->getBool("/dialogs/transformation/applyseparately"));
_check_apply_separately.signal_toggled().connect(sigc::mem_fun(*this, &Transformation::onApplySeparatelyToggled));
+ // make icons match desktop rotation direction
+ if (getDesktop()->is_yaxisdown()) {
+ _scalar_move_vertical.flipIconVertically();
+ _scalar_rotate.flipIconVertically();
+ _scalar_skew_vertical.flipIconVertically();
+ }
+
// make sure all spinbuttons activate Apply on pressing Enter
((Gtk::Entry *) (_scalar_move_horizontal.getWidget()))->set_activates_default(true);
((Gtk::Entry *) (_scalar_move_vertical.getWidget()))->set_activates_default(true);
@@ -304,7 +311,7 @@ void Transformation::layoutPageRotate()
_page_rotate.table().attach(_clockwise_rotate, 4, 0, 1, 1);
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
- if (prefs->getBool("/dialogs/transformation/rotateCounterClockwise", TRUE)) {
+ if (prefs->getBool("/dialogs/transformation/rotateCounterClockwise", TRUE) != getDesktop()->is_yaxisdown()) {
_counterclockwise_rotate.set_active();
onRotateCounterclockwiseClicked();
} else {
@@ -1003,14 +1010,14 @@ void Transformation::onRotateCounterclockwiseClicked()
{
_scalar_rotate.setTooltipText(_("Rotation angle (positive = counterclockwise)"));
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
- prefs->setBool("/dialogs/transformation/rotateCounterClockwise", TRUE);
+ prefs->setBool("/dialogs/transformation/rotateCounterClockwise", !getDesktop()->is_yaxisdown());
}
void Transformation::onRotateClockwiseClicked()
{
_scalar_rotate.setTooltipText(_("Rotation angle (positive = clockwise)"));
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
- prefs->setBool("/dialogs/transformation/rotateCounterClockwise", FALSE);
+ prefs->setBool("/dialogs/transformation/rotateCounterClockwise", getDesktop()->is_yaxisdown());
}
void Transformation::onSkewValueChanged()