From 992a532e20e460a42c0c1e3687042abddf7c8fbd Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sun, 18 Nov 2007 14:26:08 +0000 Subject: Fix bug [ 1685684 ] Document Properties: Grid number fields round too broadly (bzr r4108) --- src/ui/widget/registered-widget.cpp | 1 + src/ui/widget/scalar.cpp | 3 +++ 2 files changed, 4 insertions(+) (limited to 'src/ui/widget') diff --git a/src/ui/widget/registered-widget.cpp b/src/ui/widget/registered-widget.cpp index 55f81cfaf..804a403f6 100644 --- a/src/ui/widget/registered-widget.cpp +++ b/src/ui/widget/registered-widget.cpp @@ -410,6 +410,7 @@ RegisteredSuffixedInteger::init (const Glib::ustring& label, const Glib::ustring _label->set_alignment (1.0, 0.5); _label->set_use_underline(); _sb = new Gtk::SpinButton (_adj, 1.0, 0); + _sb->set_numeric(); _label->set_mnemonic_widget (*_sb); _suffix = new Gtk::Label (suffix); _hbox.pack_start (*_sb, true, true, 0); diff --git a/src/ui/widget/scalar.cpp b/src/ui/widget/scalar.cpp index ae90e4a0f..743c879f0 100644 --- a/src/ui/widget/scalar.cpp +++ b/src/ui/widget/scalar.cpp @@ -40,6 +40,7 @@ Scalar::Scalar(Glib::ustring const &label, Glib::ustring const &tooltip, : Labelled(label, tooltip, new Gtk::SpinButton(), suffix, icon, mnemonic), setProgrammatically(false) { + static_cast(_widget)->set_numeric(); } /** @@ -61,6 +62,7 @@ Scalar::Scalar(Glib::ustring const &label, Glib::ustring const &tooltip, : Labelled(label, tooltip, new Gtk::SpinButton(0.0, digits), suffix, icon, mnemonic), setProgrammatically(false) { + static_cast(_widget)->set_numeric(); } /** @@ -84,6 +86,7 @@ Scalar::Scalar(Glib::ustring const &label, Glib::ustring const &tooltip, : Labelled(label, tooltip, new Gtk::SpinButton(adjust, 0.0, digits), suffix, icon, mnemonic), setProgrammatically(false) { + static_cast(_widget)->set_numeric(); } /** Fetches the precision of the spin buton */ -- cgit v1.2.3