diff options
| author | Alexander Valavanis <valavanisalex@gmail.com> | 2019-02-02 20:16:00 +0000 |
|---|---|---|
| committer | Alexander Valavanis <valavanisalex@gmail.com> | 2019-02-02 20:16:00 +0000 |
| commit | fa98857205dbaf2c15bb302e3eb28f4738fb6415 (patch) | |
| tree | 5c91217ada74209becdf97006f271b749e51d032 /src/ui/widget | |
| parent | object properties dialog: label placeholder (diff) | |
| download | inkscape-fa98857205dbaf2c15bb302e3eb28f4738fb6415.tar.gz inkscape-fa98857205dbaf2c15bb302e3eb28f4738fb6415.zip | |
TweakToolbar: GtkAction migration
Diffstat (limited to 'src/ui/widget')
| -rw-r--r-- | src/ui/widget/spin-button-tool-item.cpp | 7 | ||||
| -rw-r--r-- | src/ui/widget/spin-button-tool-item.h | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/ui/widget/spin-button-tool-item.cpp b/src/ui/widget/spin-button-tool-item.cpp index 140df1586..b5eefdbb1 100644 --- a/src/ui/widget/spin-button-tool-item.cpp +++ b/src/ui/widget/spin-button-tool-item.cpp @@ -359,7 +359,7 @@ SpinButtonToolItem::SpinButtonToolItem(const Glib::ustring name, const Glib::ustring& label_text, Glib::RefPtr<Gtk::Adjustment>& adjustment, double climb_rate, - double digits) + int digits) : _btn(Gtk::manage(new SpinButton(adjustment, climb_rate, digits))), _name(std::move(name)), _label_text(label_text), @@ -505,6 +505,11 @@ SpinButtonToolItem::set_custom_numeric_menu_data(std::vector<double>& } } +Glib::RefPtr<Gtk::Adjustment> +SpinButtonToolItem::get_adjustment() +{ + return _btn->get_adjustment(); +} } // namespace Widget } // namespace UI } // namespace Inkscape diff --git a/src/ui/widget/spin-button-tool-item.h b/src/ui/widget/spin-button-tool-item.h index 2dd0b2172..4d3b75250 100644 --- a/src/ui/widget/spin-button-tool-item.h +++ b/src/ui/widget/spin-button-tool-item.h @@ -67,7 +67,7 @@ public: const Glib::ustring& label_text, Glib::RefPtr<Gtk::Adjustment>& adjustment, double climb_rate = 0.1, - double digits = 3); + int digits = 3); void set_all_tooltip_text(const Glib::ustring& text); void set_focus_widget(Gtk::Widget *widget); @@ -75,6 +75,7 @@ public: void set_custom_numeric_menu_data(std::vector<double>& values, const std::vector<Glib::ustring>& labels = std::vector<Glib::ustring>()); + Glib::RefPtr<Gtk::Adjustment> get_adjustment(); }; } // namespace Widget } // namespace UI |
