From 384c21c3bccef3a2f8f50236f87b87df29aa9e95 Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Wed, 12 Jun 2013 11:14:48 -0400 Subject: Use fixed inkscape icon for 'no-marker' instead of gtk theme icon (bzr r12371) --- src/widgets/icon.cpp | 7 +++++++ src/widgets/icon.h | 2 +- src/widgets/stroke-marker-selector.cpp | 8 ++------ 3 files changed, 10 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp index d613ca55d..dda453bc4 100644 --- a/src/widgets/icon.cpp +++ b/src/widgets/icon.cpp @@ -867,6 +867,13 @@ GtkWidget *sp_icon_new( Inkscape::IconSize lsize, gchar const *name ) return IconImpl::newFull( lsize, name ); } +// PUBLIC CALL for when you REALLY need a pixbuf +GdkPixbuf *sp_pixbuf_new( Inkscape::IconSize lsize, gchar const *name ) +{ + int psize = IconImpl::getPhysSize(lsize); + return IconImpl::renderup(name, lsize, psize); +} + // PUBLIC CALL: Gtk::Widget *sp_icon_get_icon( Glib::ustring const &oid, Inkscape::IconSize size ) { diff --git a/src/widgets/icon.h b/src/widgets/icon.h index 87dd943c4..e1dae0d6a 100644 --- a/src/widgets/icon.h +++ b/src/widgets/icon.h @@ -53,7 +53,7 @@ struct SPIcon { GtkWidget *sp_icon_new( Inkscape::IconSize size, const gchar *name ); - +GdkPixbuf *sp_pixbuf_new( Inkscape::IconSize size, const gchar *name ); // Might return a wrapped SPIcon, or Gtk::Image Gtk::Widget *sp_icon_get_icon( const Glib::ustring &oid, Inkscape::IconSize size = Inkscape::ICON_SIZE_BUTTON ); diff --git a/src/widgets/stroke-marker-selector.cpp b/src/widgets/stroke-marker-selector.cpp index 8e252f5e1..2d1c932d3 100644 --- a/src/widgets/stroke-marker-selector.cpp +++ b/src/widgets/stroke-marker-selector.cpp @@ -60,12 +60,8 @@ MarkerComboBox::MarkerComboBox(gchar const *id, int l) : set_cell_data_func(image_renderer, sigc::mem_fun(*this, &MarkerComboBox::prepareImageRenderer)); gtk_combo_box_set_row_separator_func(GTK_COMBO_BOX(gobj()), MarkerComboBox::separator_cb, NULL, NULL); - Glib::RefPtr iconTheme = Gtk::IconTheme::get_default(); - if(iconTheme->has_icon("remove")) { - empty_image = new Gtk::Image( iconTheme->load_icon("remove", 22) ); - } else { - empty_image = new Gtk::Image(); - } + empty_image = new Gtk::Image( Glib::wrap( + sp_pixbuf_new( Inkscape::ICON_SIZE_SMALL_TOOLBAR, INKSCAPE_ICON("no-marker") ) ) ); sandbox = ink_markers_preview_doc (); desktop = inkscape_active_desktop(); -- cgit v1.2.3