summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2013-06-12 15:14:48 +0000
committerMartin Owens <doctormo@gmail.com>2013-06-12 15:14:48 +0000
commit384c21c3bccef3a2f8f50236f87b87df29aa9e95 (patch)
tree4a470913e5ded0f04dcbbce99bf593cf100eec49 /src/widgets
parentFix Apache2 license conflict with GPL with re-license from SOIX upstream (diff)
downloadinkscape-384c21c3bccef3a2f8f50236f87b87df29aa9e95.tar.gz
inkscape-384c21c3bccef3a2f8f50236f87b87df29aa9e95.zip
Use fixed inkscape icon for 'no-marker' instead of gtk theme icon
(bzr r12371)
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/icon.cpp7
-rw-r--r--src/widgets/icon.h2
-rw-r--r--src/widgets/stroke-marker-selector.cpp8
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();