summaryrefslogtreecommitdiffstats
path: root/src/extension/param/bool.cpp
diff options
context:
space:
mode:
authorGeoff Lankow <geoff@darktrojan.net>2018-01-01 08:29:29 +0000
committerGeoff Lankow <geoff@darktrojan.net>2018-01-01 08:30:44 +0000
commit79888ca02932fde2e7f93a0e0f5bd37989406397 (patch)
tree009a6c36a6b346923588c9e42ad89821c95bf45c /src/extension/param/bool.cpp
parentCleanup comments and unused functions (diff)
downloadinkscape-79888ca02932fde2e7f93a0e0f5bd37989406397.tar.gz
inkscape-79888ca02932fde2e7f93a0e0f5bd37989406397.zip
Use Gtk::CheckButton label instead of a separate Gtk::Label
Diffstat (limited to 'src/extension/param/bool.cpp')
-rw-r--r--src/extension/param/bool.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/extension/param/bool.cpp b/src/extension/param/bool.cpp
index 2c7e32480..80bc89138 100644
--- a/src/extension/param/bool.cpp
+++ b/src/extension/param/bool.cpp
@@ -83,8 +83,8 @@ public:
*
* @param param Which parameter to adjust on changing the check button
*/
- ParamBoolCheckButton (ParamBool * param, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) :
- Gtk::CheckButton(), _pref(param), _doc(doc), _node(node), _changeSignal(changeSignal) {
+ ParamBoolCheckButton (ParamBool * param, gchar * label, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) :
+ Gtk::CheckButton(label), _pref(param), _doc(doc), _node(node), _changeSignal(changeSignal) {
this->set_active(_pref->get(NULL, NULL) /**\todo fix */);
this->signal_toggled().connect(sigc::mem_fun(this, &ParamBoolCheckButton::on_toggle));
return;
@@ -133,11 +133,7 @@ Gtk::Widget *ParamBool::get_widget(SPDocument * doc, Inkscape::XML::Node * node,
auto hbox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL, Parameter::GUI_PARAM_WIDGETS_SPACING));
hbox->set_homogeneous(false);
- Gtk::Label * label = Gtk::manage(new Gtk::Label(_text, Gtk::ALIGN_START));
- label->show();
- hbox->pack_end(*label, true, true);
-
- ParamBoolCheckButton * checkbox = Gtk::manage(new ParamBoolCheckButton(this, doc, node, changeSignal));
+ ParamBoolCheckButton * checkbox = Gtk::manage(new ParamBoolCheckButton(this, _text, doc, node, changeSignal));
checkbox->show();
hbox->pack_start(*checkbox, false, false);