From 8e1316f791ac31edcb9f011b8840daa35083a285 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Wed, 10 Jan 2018 15:18:03 +0100 Subject: Add option for label with ComboBox in InkSelectOneAction. --- src/ui/widget/ink-select-one-action.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/ui/widget') diff --git a/src/ui/widget/ink-select-one-action.cpp b/src/ui/widget/ink-select-one-action.cpp index ecd0e8e3d..42a63adf0 100644 --- a/src/ui/widget/ink-select-one-action.cpp +++ b/src/ui/widget/ink-select-one-action.cpp @@ -137,16 +137,16 @@ Gtk::Widget* InkSelectOneAction::create_tool_item_vfunc() { Gtk::ToolItem *tool_item = new Gtk::ToolItem; - if (_use_radio) { - // Create radio actions (note: these are not radio buttons). + Gtk::Box* box = Gtk::manage(new Gtk::Box()); + tool_item->add (*box); - Gtk::Box* box = Gtk::manage(new Gtk::Box()); - tool_item->add (*box); + if (_use_group_label) { + Gtk::Label *group_label = Gtk::manage (new Gtk::Label( _group_label + ": " )); + box->add( *group_label ); + } - if (_use_group_label) { - Gtk::Label *group_label = Gtk::manage (new Gtk::Label( _group_label + ": " )); - box->add( *group_label ); - } + if (_use_radio) { + // Create radio actions (note: these are not radio buttons). Gtk::RadioAction::Group group; int index = 0; @@ -213,7 +213,7 @@ Gtk::Widget* InkSelectOneAction::create_tool_item_vfunc() { _combobox->signal_changed().connect( sigc::mem_fun(*this, &InkSelectOneAction::on_changed_combobox)); - tool_item->add (*_combobox); + box->add (*_combobox); } tool_item->show_all(); -- cgit v1.2.3