diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-06-29 13:28:54 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-06-29 13:28:54 +0000 |
| commit | 88e5cefd2b64d56aa00009f91d9c481c9b8c3c74 (patch) | |
| tree | 901357ee4a10db7a130c7c591e2fe85ee32bc931 /src/widgets/button.cpp | |
| parent | glade WIP (diff) | |
| parent | Hackfest icon work: restore selected menu icons and make theming easier (diff) | |
| download | inkscape-88e5cefd2b64d56aa00009f91d9c481c9b8c3c74.tar.gz inkscape-88e5cefd2b64d56aa00009f91d9c481c9b8c3c74.zip | |
Merge branch 'master' of gitlab.com:inkscape/inkscape
Diffstat (limited to 'src/widgets/button.cpp')
| -rw-r--r-- | src/widgets/button.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/widgets/button.cpp b/src/widgets/button.cpp index 485300a25..7dcfc9771 100644 --- a/src/widgets/button.cpp +++ b/src/widgets/button.cpp @@ -12,7 +12,6 @@ */ #include <glibmm.h> -#include "icon.h" #include "button.h" #include "helper/action-context.h" @@ -155,12 +154,12 @@ static void sp_button_perform_action(SPButton *button, gpointer /*data*/) } } -GtkWidget *sp_button_new(Inkscape::IconSize size, SPButtonType type, SPAction *action, SPAction *doubleclick_action) +GtkWidget *sp_button_new(GtkIconSize size, SPButtonType type, SPAction *action, SPAction *doubleclick_action) { SPButton *button = SP_BUTTON(g_object_new(SP_TYPE_BUTTON, NULL)); button->type = type; - button->lsize = CLAMP(size, Inkscape::ICON_SIZE_MENU, Inkscape::ICON_SIZE_DECORATION); + button->lsize = CLAMP(size, GTK_ICON_SIZE_MENU, GTK_ICON_SIZE_DIALOG); sp_button_set_action(button, action); if (doubleclick_action) @@ -212,7 +211,7 @@ static void sp_button_set_action(SPButton *button, SPAction *action) button->c_set_sensitive = action->signal_set_sensitive.connect( sigc::bind<0>(sigc::ptr_fun(>k_widget_set_sensitive), GTK_WIDGET(button))); if (action->image) { - child = sp_icon_new(button->lsize, action->image); + child = gtk_image_new_from_icon_name(action->image, button->lsize); gtk_widget_show(child); gtk_container_add(GTK_CONTAINER(button), child); } @@ -256,12 +255,11 @@ static void sp_button_set_composed_tooltip(GtkWidget *widget, SPAction *action) } } -GtkWidget *sp_button_new_from_data(Inkscape::IconSize size, SPButtonType type, Inkscape::UI::View::View *view, +GtkWidget *sp_button_new_from_data(GtkIconSize size, SPButtonType type, Inkscape::UI::View::View *view, const gchar *name, const gchar *tip) { - GtkWidget *button; SPAction *action = sp_action_new(Inkscape::ActionContext(view), name, name, tip, name, 0); - button = sp_button_new(size, type, action, NULL); + GtkWidget *button = sp_button_new(size, type, action, NULL); g_object_unref(action); return button; } |
