diff options
| author | Martin Owens <doctormo@gmail.com> | 2018-09-14 16:58:18 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2018-09-14 16:58:18 +0000 |
| commit | b92e577ea62c2a94ba38390fa67d9dcea3db88af (patch) | |
| tree | 3b48af7caf1e7fd14fd0015f6113a6545f11e9b7 /src/ui/dialog/cssdialog.cpp | |
| parent | Merge branch 'master' of gitlab.com:jordim/inkscape (diff) | |
| download | inkscape-b92e577ea62c2a94ba38390fa67d9dcea3db88af.tar.gz inkscape-b92e577ea62c2a94ba38390fa67d9dcea3db88af.zip | |
Remove sp-xmlview-attr with attrdialog (C++) and improve interface
Diffstat (limited to 'src/ui/dialog/cssdialog.cpp')
| -rw-r--r-- | src/ui/dialog/cssdialog.cpp | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/src/ui/dialog/cssdialog.cpp b/src/ui/dialog/cssdialog.cpp index 901bcf36c..47922fc64 100644 --- a/src/ui/dialog/cssdialog.cpp +++ b/src/ui/dialog/cssdialog.cpp @@ -80,7 +80,11 @@ CssDialog::CssDialog(): _attrCol->add_attribute(_attrRenderer->property_text(), _cssColumns._styleAttrVal); } - _styleButton(_buttonAddProperty, "list-add", "Add a new property"); + GtkWidget *child = GTK_WIDGET(sp_get_icon_image("list-add", GTK_ICON_SIZE_SMALL_TOOLBAR)->gobj()); + gtk_widget_show(child); + _buttonAddProperty.add(*manage(Glib::wrap(child))); + _buttonAddProperty.set_relief(Gtk::RELIEF_NONE); + _buttonAddProperty.set_tooltip_text("Add a new property"); _mainBox.pack_end(_buttonBox, Gtk::PACK_SHRINK); _buttonBox.pack_start(_buttonAddProperty, Gtk::PACK_SHRINK); @@ -113,25 +117,6 @@ void CssDialog::setDesktop(SPDesktop* desktop) _desktop = desktop; } - -/** - * @brief CssDialog::_styleButton - * @param btn - * @param iconName - * @param tooltip - * This function sets the style of '+'button at the bottom of dialog. - */ -void CssDialog::_styleButton(Gtk::Button& btn, char const* iconName, - char const* tooltip) -{ - GtkWidget *child = GTK_WIDGET(sp_get_icon_image(iconName, GTK_ICON_SIZE_SMALL_TOOLBAR)->gobj()); - gtk_widget_show(child); - btn.add(*manage(Glib::wrap(child))); - btn.set_relief(Gtk::RELIEF_NONE); - btn.set_tooltip_text(tooltip); -} - - /** * @brief CssDialog::_addProperty * This function is a slot to signal_clicked for '+' button at the bottom of CSS |
