summaryrefslogtreecommitdiffstats
path: root/src/ui/widget
diff options
context:
space:
mode:
authorGeoff Lankow <geoff@darktrojan.net>2018-02-09 08:06:51 +0000
committerGeoff Lankow <geoff@darktrojan.net>2018-07-02 23:09:56 +0000
commitb06d2c86a864fcf25fdf8963b59134a9827d2df6 (patch)
tree34c3e4583926ebc99b7fe705de1274a4a6bea76a /src/ui/widget
parentCI/AppVeyor: Remove --ask switch (diff)
downloadinkscape-b06d2c86a864fcf25fdf8963b59134a9827d2df6.tar.gz
inkscape-b06d2c86a864fcf25fdf8963b59134a9827d2df6.zip
Reduce width of Transform dialog by making spinbuttons narrower
Diffstat (limited to 'src/ui/widget')
-rw-r--r--src/ui/widget/scalar.cpp6
-rw-r--r--src/ui/widget/scalar.h5
2 files changed, 11 insertions, 0 deletions
diff --git a/src/ui/widget/scalar.cpp b/src/ui/widget/scalar.cpp
index a3fff0c8c..58afa9726 100644
--- a/src/ui/widget/scalar.cpp
+++ b/src/ui/widget/scalar.cpp
@@ -130,6 +130,12 @@ void Scalar::setValue(double value, bool setProg)
static_cast<SpinButton*>(_widget)->set_value(value);
}
+void Scalar::setWidthChars(uint chars)
+{
+ g_assert(_widget != NULL);
+ static_cast<SpinButton*>(_widget)->set_width_chars(chars);
+}
+
void Scalar::update()
{
g_assert(_widget != nullptr);
diff --git a/src/ui/widget/scalar.h b/src/ui/widget/scalar.h
index 2632dd5a7..0d9ed9c4b 100644
--- a/src/ui/widget/scalar.h
+++ b/src/ui/widget/scalar.h
@@ -138,6 +138,11 @@ public:
void setValue(double value, bool setProg = true);
/**
+ * Sets the width of the spin button by number of characters.
+ */
+ void setWidthChars(unsigned chars);
+
+ /**
* Manually forces an update of the spin button.
*/
void update();