From fa98857205dbaf2c15bb302e3eb28f4738fb6415 Mon Sep 17 00:00:00 2001 From: Alexander Valavanis Date: Sat, 2 Feb 2019 20:16:00 +0000 Subject: TweakToolbar: GtkAction migration --- src/ui/widget/spin-button-tool-item.cpp | 7 ++++++- src/ui/widget/spin-button-tool-item.h | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src/ui/widget') 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& 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& } } +Glib::RefPtr +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& 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& values, const std::vector& labels = std::vector()); + Glib::RefPtr get_adjustment(); }; } // namespace Widget } // namespace UI -- cgit v1.2.3