summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/zoom-status.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/widget/zoom-status.cpp')
-rw-r--r--src/ui/widget/zoom-status.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ui/widget/zoom-status.cpp b/src/ui/widget/zoom-status.cpp
index 579449744..aea1beb17 100644
--- a/src/ui/widget/zoom-status.cpp
+++ b/src/ui/widget/zoom-status.cpp
@@ -23,7 +23,11 @@ namespace UI {
namespace Widget {
ZoomStatus::ZoomStatus()
+#if WITH_GTKMM_3_0
+ : _adj(Gtk::Adjustment::create(0.0, -1.0, 1.0, 0.1, 0.1))
+#else
: _adj(0.0, -1.0, 1.0, 0.1, 0.1)
+#endif
{
_dt = 0;
_upd_f = false;
@@ -43,11 +47,19 @@ ZoomStatus::init(SPDesktop *dt)
{
_dt = dt;
property_digits() = 4;
+#if WITH_GTKMM_3_0
+ _adj->set_value(0.0);
+ _adj->set_lower(log(SP_DESKTOP_ZOOM_MIN)/log(2.0));
+ _adj->set_upper(log(SP_DESKTOP_ZOOM_MAX)/log(2.0));
+ _adj->set_step_increment(0.1);
+ _adj->set_page_increment(0.1);
+#else
_adj.set_value(0.0);
_adj.set_lower(log(SP_DESKTOP_ZOOM_MIN)/log(2.0));
_adj.set_upper(log(SP_DESKTOP_ZOOM_MAX)/log(2.0));
_adj.set_step_increment(0.1);
_adj.set_page_increment(0.1);
+#endif
set_adjustment(_adj);
}