diff options
| author | Martin Owens <doctormo@gmail.com> | 2013-06-12 15:14:48 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2013-06-12 15:14:48 +0000 |
| commit | 384c21c3bccef3a2f8f50236f87b87df29aa9e95 (patch) | |
| tree | 4a470913e5ded0f04dcbbce99bf593cf100eec49 /src | |
| parent | Fix Apache2 license conflict with GPL with re-license from SOIX upstream (diff) | |
| download | inkscape-384c21c3bccef3a2f8f50236f87b87df29aa9e95.tar.gz inkscape-384c21c3bccef3a2f8f50236f87b87df29aa9e95.zip | |
Use fixed inkscape icon for 'no-marker' instead of gtk theme icon
(bzr r12371)
Diffstat (limited to 'src')
| -rw-r--r-- | src/widgets/icon.cpp | 7 | ||||
| -rw-r--r-- | src/widgets/icon.h | 2 | ||||
| -rw-r--r-- | src/widgets/stroke-marker-selector.cpp | 8 |
3 files changed, 10 insertions, 7 deletions
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<Gtk::IconTheme> 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(); |
