summaryrefslogtreecommitdiffstats
path: root/src/ui/widget
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2017-07-01 02:03:38 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2017-07-01 02:03:38 +0000
commit0d5bb885dee83f041830dc950d3be6f21a37f08b (patch)
tree88a0ae7a15ed496ddad1f83f43547783b88843ac /src/ui/widget
parentBug fixes (diff)
parentAdd Mac CI build config (diff)
downloadinkscape-0d5bb885dee83f041830dc950d3be6f21a37f08b.tar.gz
inkscape-0d5bb885dee83f041830dc950d3be6f21a37f08b.zip
update to trunk
Diffstat (limited to 'src/ui/widget')
-rw-r--r--src/ui/widget/addtoicon.cpp14
-rw-r--r--src/ui/widget/addtoicon.h2
-rw-r--r--src/ui/widget/anchor-selector.cpp6
-rw-r--r--src/ui/widget/clipmaskicon.cpp17
-rw-r--r--src/ui/widget/color-notebook.cpp1
-rw-r--r--src/ui/widget/dock-item.cpp16
-rw-r--r--src/ui/widget/dock-item.h14
-rw-r--r--src/ui/widget/dock.cpp5
-rw-r--r--src/ui/widget/dock.h2
-rw-r--r--src/ui/widget/highlight-picker.cpp1
-rw-r--r--src/ui/widget/imagetoggler.cpp14
-rw-r--r--src/ui/widget/insertordericon.cpp14
-rw-r--r--src/ui/widget/labelled.cpp8
-rw-r--r--src/ui/widget/labelled.h3
-rw-r--r--src/ui/widget/layer-selector.cpp21
-rw-r--r--src/ui/widget/layertypeicon.cpp15
-rw-r--r--src/ui/widget/object-composite-settings.cpp1
-rw-r--r--src/ui/widget/panel.cpp4
-rw-r--r--src/ui/widget/random.cpp5
19 files changed, 65 insertions, 98 deletions
diff --git a/src/ui/widget/addtoicon.cpp b/src/ui/widget/addtoicon.cpp
index 70516ed00..e5119fc60 100644
--- a/src/ui/widget/addtoicon.cpp
+++ b/src/ui/widget/addtoicon.cpp
@@ -16,7 +16,6 @@
#include <gtkmm/icontheme.h>
-#include "widgets/icon.h"
#include "widgets/toolbox.h"
#include "ui/icon-names.h"
#include "layertypeicon.h"
@@ -33,7 +32,10 @@ AddToIcon::AddToIcon() :
// _property_pixbuf_add(*this, "pixbuf_on", Glib::RefPtr<Gdk::Pixbuf>(0))
{
property_mode() = Gtk::CELL_RENDERER_MODE_ACTIVATABLE;
- phys = sp_icon_get_phys_size((int)Inkscape::ICON_SIZE_BUTTON);
+
+ gint width, height;
+ gtk_icon_size_lookup(GTK_ICON_SIZE_BUTTON, &width, &height);
+ phys = width; // Assumes that we have a square icon?
// Glib::RefPtr<Gtk::IconTheme> icon_theme = Gtk::IconTheme::get_default();
//
@@ -43,8 +45,6 @@ AddToIcon::AddToIcon() :
// if (icon_theme->has_icon(_pixAddName)) {
// _property_pixbuf_add = icon_theme->load_icon(_pixAddName, phys, (Gtk::IconLookupFlags)0);
// }
-//
-// _property_pixbuf_add = Gtk::Widget::
set_pixbuf();
}
@@ -104,8 +104,10 @@ void AddToIcon::set_pixbuf()
{
bool active = property_active().get_value();
- GdkPixbuf *pixbuf = sp_pixbuf_new(Inkscape::ICON_SIZE_BUTTON, active ? INKSCAPE_ICON("list-add") : INKSCAPE_ICON("edit-delete"));
- property_pixbuf() = Glib::wrap(pixbuf);
+ auto icon_theme = Gtk::IconTheme::get_default();
+
+ property_pixbuf() = icon_theme->load_icon(active ? "list-add" : "edit-delete",
+ phys);
}
diff --git a/src/ui/widget/addtoicon.h b/src/ui/widget/addtoicon.h
index 3b2228754..93d66c8d5 100644
--- a/src/ui/widget/addtoicon.h
+++ b/src/ui/widget/addtoicon.h
@@ -54,7 +54,7 @@ protected:
private:
- int phys;
+ int phys; ///< Physical size of the icon (px)
// Glib::ustring _pixAddName;
diff --git a/src/ui/widget/anchor-selector.cpp b/src/ui/widget/anchor-selector.cpp
index 087e7375e..ddc25775d 100644
--- a/src/ui/widget/anchor-selector.cpp
+++ b/src/ui/widget/anchor-selector.cpp
@@ -8,15 +8,17 @@
*/
#include "ui/widget/anchor-selector.h"
-#include "widgets/icon.h"
#include "ui/icon-names.h"
+#include <gtkmm/image.h>
+
namespace Inkscape {
namespace UI {
namespace Widget {
void AnchorSelector::setupButton(const Glib::ustring& icon, Gtk::ToggleButton& button) {
- Gtk::Widget* buttonIcon = Gtk::manage(sp_icon_get_icon(icon, Inkscape::ICON_SIZE_SMALL_TOOLBAR));
+ Gtk::Image* buttonIcon = Gtk::manage(new Gtk::Image());
+ buttonIcon->set_from_icon_name(icon, Gtk::ICON_SIZE_SMALL_TOOLBAR);
buttonIcon->show();
button.set_relief(Gtk::RELIEF_NONE);
diff --git a/src/ui/widget/clipmaskicon.cpp b/src/ui/widget/clipmaskicon.cpp
index a1e3eaf82..c284c035c 100644
--- a/src/ui/widget/clipmaskicon.cpp
+++ b/src/ui/widget/clipmaskicon.cpp
@@ -15,7 +15,6 @@
#include <gtkmm/icontheme.h>
-#include "widgets/icon.h"
#include "widgets/toolbox.h"
#include "ui/icon-names.h"
#include "layertypeicon.h"
@@ -37,18 +36,12 @@ ClipMaskIcon::ClipMaskIcon() :
{
property_mode() = Gtk::CELL_RENDERER_MODE_ACTIVATABLE;
- phys = sp_icon_get_phys_size((int)Inkscape::ICON_SIZE_DECORATION);
- Glib::RefPtr<Gtk::IconTheme> icon_theme = Gtk::IconTheme::get_default();
- if (!icon_theme->has_icon(_pixClipName)) {
- Inkscape::queueIconPrerender( INKSCAPE_ICON(_pixClipName.data()), Inkscape::ICON_SIZE_DECORATION );
- }
- if (!icon_theme->has_icon(_pixMaskName)) {
- Inkscape::queueIconPrerender( INKSCAPE_ICON(_pixMaskName.data()), Inkscape::ICON_SIZE_DECORATION );
- }
- if (!icon_theme->has_icon(_pixBothName)) {
- Inkscape::queueIconPrerender( INKSCAPE_ICON(_pixBothName.data()), Inkscape::ICON_SIZE_DECORATION );
- }
+ gint width, height;
+ gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &width, &height);
+ phys = width;
+
+ Glib::RefPtr<Gtk::IconTheme> icon_theme = Gtk::IconTheme::get_default();
if (icon_theme->has_icon(_pixClipName)) {
_property_pixbuf_clip = icon_theme->load_icon(_pixClipName, phys, (Gtk::IconLookupFlags)0);
diff --git a/src/ui/widget/color-notebook.cpp b/src/ui/widget/color-notebook.cpp
index 33e22b59d..0c9402c99 100644
--- a/src/ui/widget/color-notebook.cpp
+++ b/src/ui/widget/color-notebook.cpp
@@ -19,7 +19,6 @@
#include "config.h"
#endif
-#include "widgets/icon.h"
#include <glibmm/i18n.h>
#include <gtkmm/label.h>
#include <gtkmm/notebook.h>
diff --git a/src/ui/widget/dock-item.cpp b/src/ui/widget/dock-item.cpp
index d124854ae..60ea03fb7 100644
--- a/src/ui/widget/dock-item.cpp
+++ b/src/ui/widget/dock-item.cpp
@@ -12,7 +12,6 @@
#include "desktop.h"
#include "inkscape.h"
#include "ui/icon-names.h"
-#include "widgets/icon.h"
#include <gtkmm/icontheme.h>
#include <glibmm/exceptionhandler.h>
@@ -22,7 +21,7 @@ namespace UI {
namespace Widget {
DockItem::DockItem(Dock& dock, const Glib::ustring& name, const Glib::ustring& long_name,
- const Glib::ustring& icon_name, State state, Placement placement) :
+ const Glib::ustring& icon_name, State state, GdlDockPlacement placement) :
_dock(dock),
_prev_state(state),
_prev_position(0),
@@ -43,9 +42,6 @@ DockItem::DockItem(Dock& dock, const Glib::ustring& name, const Glib::ustring& l
if (!icon_name.empty()) {
Glib::RefPtr<Gtk::IconTheme> iconTheme = Gtk::IconTheme::get_default();
- if (!iconTheme->has_icon(icon_name)) {
- Inkscape::queueIconPrerender( INKSCAPE_ICON(icon_name.data()), Inkscape::ICON_SIZE_MENU );
- }
if ( iconTheme->has_icon(icon_name) ) {
int width = 0;
int height = 0;
@@ -74,7 +70,7 @@ DockItem::DockItem(Dock& dock, const Glib::ustring& name, const Glib::ustring& l
signal_delete_event().connect(sigc::mem_fun(*this, &Inkscape::UI::Widget::DockItem::_onDeleteEvent));
signal_realize().connect(sigc::mem_fun(*this, &Inkscape::UI::Widget::DockItem::_onRealize));
- _dock.addItem(*this, ( _prev_state == FLOATING_STATE || _prev_state == ICONIFIED_FLOATING_STATE ) ? FLOATING : placement);
+ _dock.addItem(*this, ( _prev_state == FLOATING_STATE || _prev_state == ICONIFIED_FLOATING_STATE ) ? GDL_DOCK_FLOATING : placement);
if (_prev_state == ICONIFIED_FLOATING_STATE || _prev_state == ICONIFIED_DOCKED_STATE) {
iconify();
@@ -218,16 +214,16 @@ DockItem::getPrevState() const
return _prev_state;
}
-DockItem::Placement
+GdlDockPlacement
DockItem::getPlacement() const
{
- GdlDockPlacement placement = (GdlDockPlacement)TOP;
+ GdlDockPlacement placement = GDL_DOCK_TOP;
GdlDockObject *parent = gdl_dock_object_get_parent_object (GDL_DOCK_OBJECT(_gdl_dock_item));
if (parent) {
gdl_dock_object_child_placement(parent, GDL_DOCK_OBJECT(_gdl_dock_item), &placement);
}
- return (Placement)placement;
+ return placement;
}
void
@@ -262,7 +258,7 @@ DockItem::present()
show();
}
// tabbed
- else if (getPlacement() == CENTER) {
+ else if (getPlacement() == GDL_DOCK_CENTER) {
int i = gtk_notebook_page_num(GTK_NOTEBOOK(gtk_widget_get_parent(_gdl_dock_item)),
GTK_WIDGET (_gdl_dock_item));
if (i >= 0)
diff --git a/src/ui/widget/dock-item.h b/src/ui/widget/dock-item.h
index 2df45b207..b5f6c13af 100644
--- a/src/ui/widget/dock-item.h
+++ b/src/ui/widget/dock-item.h
@@ -45,18 +45,8 @@ public:
ICONIFIED_DOCKED_STATE, // item iconified in its assigned dock from dock
ICONIFIED_FLOATING_STATE}; // item iconified in its assigned dock from float
- enum Placement {
- NONE = GDL_DOCK_NONE,
- TOP = GDL_DOCK_TOP,
- BOTTOM = GDL_DOCK_BOTTOM,
- RIGHT = GDL_DOCK_RIGHT,
- LEFT = GDL_DOCK_LEFT,
- CENTER = GDL_DOCK_CENTER,
- FLOATING = GDL_DOCK_FLOATING
- };
-
DockItem(Dock& dock, const Glib::ustring& name, const Glib::ustring& long_name,
- const Glib::ustring& icon_name, State state, Placement placement);
+ const Glib::ustring& icon_name, State state, GdlDockPlacement placement);
~DockItem();
@@ -80,7 +70,7 @@ public:
bool isIconified() const;
State getState() const;
State getPrevState() const;
- Placement getPlacement() const;
+ GdlDockPlacement getPlacement() const;
Gtk::Window *getWindow(); //< gives the parent window, if the dock item has one (i.e. it's floating)
diff --git a/src/ui/widget/dock.cpp b/src/ui/widget/dock.cpp
index b2dec401f..7dfad9582 100644
--- a/src/ui/widget/dock.cpp
+++ b/src/ui/widget/dock.cpp
@@ -124,12 +124,13 @@ Dock::~Dock()
g_free(_gdl_dock_bar);
}
-void Dock::addItem(DockItem& item, DockItem::Placement placement)
+void Dock::addItem(DockItem& item, GdlDockPlacement placement)
{
_dock_items.push_back(&item);
+
gdl_dock_add_item(GDL_DOCK(_gdl_dock),
GDL_DOCK_ITEM(item.gobj()),
- (GdlDockPlacement)placement);
+ placement);
// FIXME: This is a hack to prevent the dock from expanding the main window, this can't be done
// initially as the paned doesn't exist.
diff --git a/src/ui/widget/dock.h b/src/ui/widget/dock.h
index 74b072d22..6258a06e3 100644
--- a/src/ui/widget/dock.h
+++ b/src/ui/widget/dock.h
@@ -37,7 +37,7 @@ public:
Dock(Gtk::Orientation orientation=Gtk::ORIENTATION_VERTICAL);
~Dock();
- void addItem(DockItem& item, DockItem::Placement placement);
+ void addItem(DockItem& item, GdlDockPlacement placement);
Gtk::Widget& getWidget(); //< return the top widget
Gtk::Paned *getParentPaned();
diff --git a/src/ui/widget/highlight-picker.cpp b/src/ui/widget/highlight-picker.cpp
index 561c1332a..3d8ab50ea 100644
--- a/src/ui/widget/highlight-picker.cpp
+++ b/src/ui/widget/highlight-picker.cpp
@@ -13,7 +13,6 @@
#include "display/cairo-utils.h"
#include "highlight-picker.h"
-#include "widgets/icon.h"
namespace Inkscape {
namespace UI {
diff --git a/src/ui/widget/imagetoggler.cpp b/src/ui/widget/imagetoggler.cpp
index 987cc67bb..81d0edd47 100644
--- a/src/ui/widget/imagetoggler.cpp
+++ b/src/ui/widget/imagetoggler.cpp
@@ -13,7 +13,6 @@
#include <gtkmm/icontheme.h>
-#include "widgets/icon.h"
#include "widgets/toolbox.h"
#include "ui/icon-names.h"
@@ -32,15 +31,12 @@ ImageToggler::ImageToggler( char const* on, char const* off) :
_property_pixbuf_off(*this, "pixbuf_off", Glib::RefPtr<Gdk::Pixbuf>(0))
{
property_mode() = Gtk::CELL_RENDERER_MODE_ACTIVATABLE;
- int phys = sp_icon_get_phys_size((int)Inkscape::ICON_SIZE_DECORATION);
- Glib::RefPtr<Gtk::IconTheme> icon_theme = Gtk::IconTheme::get_default();
- if (!icon_theme->has_icon(_pixOnName)) {
- Inkscape::queueIconPrerender( INKSCAPE_ICON(_pixOnName.data()), Inkscape::ICON_SIZE_DECORATION );
- }
- if (!icon_theme->has_icon(_pixOffName)) {
- Inkscape::queueIconPrerender( INKSCAPE_ICON(_pixOffName.data()), Inkscape::ICON_SIZE_DECORATION );
- }
+ gint width, height;
+ gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &width, &height);
+ int phys = width;
+
+ Glib::RefPtr<Gtk::IconTheme> icon_theme = Gtk::IconTheme::get_default();
if (icon_theme->has_icon(_pixOnName)) {
diff --git a/src/ui/widget/insertordericon.cpp b/src/ui/widget/insertordericon.cpp
index 7ed1ed2e2..26913ff98 100644
--- a/src/ui/widget/insertordericon.cpp
+++ b/src/ui/widget/insertordericon.cpp
@@ -11,7 +11,6 @@
#include <gtkmm/icontheme.h>
-#include "widgets/icon.h"
#include "widgets/toolbox.h"
#include "ui/icon-names.h"
#include "layertypeicon.h"
@@ -31,15 +30,12 @@ InsertOrderIcon::InsertOrderIcon() :
{
property_mode() = Gtk::CELL_RENDERER_MODE_ACTIVATABLE;
- phys = sp_icon_get_phys_size((int)Inkscape::ICON_SIZE_DECORATION);
- Glib::RefPtr<Gtk::IconTheme> icon_theme = Gtk::IconTheme::get_default();
- if (!icon_theme->has_icon(_pixTopName)) {
- Inkscape::queueIconPrerender( INKSCAPE_ICON(_pixTopName.data()), Inkscape::ICON_SIZE_DECORATION );
- }
- if (!icon_theme->has_icon(_pixBottomName)) {
- Inkscape::queueIconPrerender( INKSCAPE_ICON(_pixBottomName.data()), Inkscape::ICON_SIZE_DECORATION );
- }
+ gint width, height;
+ gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &width, &height);
+ phys=width;
+
+ Glib::RefPtr<Gtk::IconTheme> icon_theme = Gtk::IconTheme::get_default();
if (icon_theme->has_icon(_pixTopName)) {
_property_pixbuf_top = icon_theme->load_icon(_pixTopName, phys, (Gtk::IconLookupFlags)0);
diff --git a/src/ui/widget/labelled.cpp b/src/ui/widget/labelled.cpp
index 6e3652830..d3dc6210f 100644
--- a/src/ui/widget/labelled.cpp
+++ b/src/ui/widget/labelled.cpp
@@ -14,8 +14,7 @@
#include "labelled.h"
-/* For getting the Gtkmmified Icon manager */
-#include "widgets/icon.h"
+#include <gtkmm/image.h>
#include <gtkmm/label.h>
namespace Inkscape {
@@ -33,8 +32,9 @@ Labelled::Labelled(Glib::ustring const &label, Glib::ustring const &tooltip,
{
g_assert(g_utf8_validate(icon.c_str(), -1, NULL));
if (icon != "") {
- _icon = sp_icon_get_icon(icon.c_str(), Inkscape::ICON_SIZE_LARGE_TOOLBAR);
- pack_start(*Gtk::manage(_icon), Gtk::PACK_SHRINK);
+ _icon = Gtk::manage(new Gtk::Image());
+ _icon->set_from_icon_name(icon, Gtk::ICON_SIZE_LARGE_TOOLBAR);
+ pack_start(*_icon, Gtk::PACK_SHRINK);
}
pack_start(*Gtk::manage(_label), Gtk::PACK_EXPAND_WIDGET, 6);
pack_start(*Gtk::manage(_widget), Gtk::PACK_SHRINK, 6);
diff --git a/src/ui/widget/labelled.h b/src/ui/widget/labelled.h
index 88eb3ce19..824abf305 100644
--- a/src/ui/widget/labelled.h
+++ b/src/ui/widget/labelled.h
@@ -14,6 +14,7 @@
#include <gtkmm/box.h>
namespace Gtk {
+class Image;
class Label;
}
@@ -64,7 +65,7 @@ protected:
Gtk::Widget *_widget;
Gtk::Label *_label;
Gtk::Label *_suffix;
- Gtk::Widget *_icon;
+ Gtk::Image *_icon;
};
} // namespace Widget
diff --git a/src/ui/widget/layer-selector.cpp b/src/ui/widget/layer-selector.cpp
index 4432a6e09..0332143b5 100644
--- a/src/ui/widget/layer-selector.cpp
+++ b/src/ui/widget/layer-selector.cpp
@@ -31,7 +31,6 @@
#include "util/filter-list.h"
#include "util/reverse-list.h"
#include "verbs.h"
-#include "widgets/icon.h"
#include "xml/node-event-vector.h"
#include "widgets/gradient-vector.h"
@@ -42,17 +41,19 @@ namespace {
class AlternateIcons : public Gtk::HBox {
public:
- AlternateIcons(Inkscape::IconSize size, gchar const *a, gchar const *b)
+ AlternateIcons(Gtk::IconSize size, Glib::ustring const &a, Glib::ustring const &b)
: _a(NULL), _b(NULL)
{
set_name("AlternateIcons");
- if (a) {
- _a = Gtk::manage(sp_icon_get_icon(a, size));
+ if (!a.empty()) {
+ _a = Gtk::manage(new Gtk::Image());
+ _a->set_from_icon_name(a, size);
_a->set_no_show_all(true);
add(*_a);
}
- if (b) {
- _b = Gtk::manage(sp_icon_get_icon(b, size));
+ if (!b.empty()) {
+ _b = Gtk::manage(new Gtk::Image());
+ _b->set_from_icon_name(b, size);
_b->set_no_show_all(true);
add(*_b);
}
@@ -80,8 +81,8 @@ public:
}
private:
- Gtk::Widget *_a;
- Gtk::Widget *_b;
+ Gtk::Image *_a;
+ Gtk::Image *_b;
bool _state;
};
@@ -98,7 +99,7 @@ LayerSelector::LayerSelector(SPDesktop *desktop)
set_name("LayerSelector");
AlternateIcons *label;
- label = Gtk::manage(new AlternateIcons(Inkscape::ICON_SIZE_DECORATION,
+ label = Gtk::manage(new AlternateIcons(Gtk::ICON_SIZE_MENU,
INKSCAPE_ICON("object-visible"), INKSCAPE_ICON("object-hidden")));
_visibility_toggle.add(*label);
_visibility_toggle.signal_toggled().connect(
@@ -118,7 +119,7 @@ LayerSelector::LayerSelector(SPDesktop *desktop)
_visibility_toggle.set_tooltip_text(_("Toggle current layer visibility"));
pack_start(_visibility_toggle, Gtk::PACK_EXPAND_PADDING);
- label = Gtk::manage(new AlternateIcons(Inkscape::ICON_SIZE_DECORATION,
+ label = Gtk::manage(new AlternateIcons(Gtk::ICON_SIZE_MENU,
INKSCAPE_ICON("object-unlocked"), INKSCAPE_ICON("object-locked")));
_lock_toggle.add(*label);
_lock_toggle.signal_toggled().connect(
diff --git a/src/ui/widget/layertypeicon.cpp b/src/ui/widget/layertypeicon.cpp
index df85f271a..679a95cd2 100644
--- a/src/ui/widget/layertypeicon.cpp
+++ b/src/ui/widget/layertypeicon.cpp
@@ -15,7 +15,6 @@
#include <gtkmm/icontheme.h>
-#include "widgets/icon.h"
#include "widgets/toolbox.h"
#include "ui/icon-names.h"
@@ -37,19 +36,11 @@ LayerTypeIcon::LayerTypeIcon() :
{
property_mode() = Gtk::CELL_RENDERER_MODE_ACTIVATABLE;
- int phys = sp_icon_get_phys_size((int)Inkscape::ICON_SIZE_DECORATION);
+ gint width, height;
+ gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &width, &height);
+ int phys = width;
Glib::RefPtr<Gtk::IconTheme> icon_theme = Gtk::IconTheme::get_default();
- if (!icon_theme->has_icon(_pixLayerName)) {
- Inkscape::queueIconPrerender( INKSCAPE_ICON(_pixLayerName.data()), Inkscape::ICON_SIZE_DECORATION );
- }
- if (!icon_theme->has_icon(_pixGroupName)) {
- Inkscape::queueIconPrerender( INKSCAPE_ICON(_pixGroupName.data()), Inkscape::ICON_SIZE_DECORATION );
- }
- if (!icon_theme->has_icon(_pixPathName)) {
- Inkscape::queueIconPrerender( INKSCAPE_ICON(_pixPathName.data()), Inkscape::ICON_SIZE_DECORATION );
- }
-
if (icon_theme->has_icon(_pixLayerName)) {
_property_pixbuf_layer = icon_theme->load_icon(_pixLayerName, phys, (Gtk::IconLookupFlags)0);
}
diff --git a/src/ui/widget/object-composite-settings.cpp b/src/ui/widget/object-composite-settings.cpp
index 1727660c8..ca33a845c 100644
--- a/src/ui/widget/object-composite-settings.cpp
+++ b/src/ui/widget/object-composite-settings.cpp
@@ -24,7 +24,6 @@
#include "style.h"
#include "svg/css-ostringstream.h"
#include "verbs.h"
-#include "widgets/icon.h"
#include "display/sp-canvas.h"
#include "ui/widget/style-subject.h"
diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp
index dff92594b..9332fe0f9 100644
--- a/src/ui/widget/panel.cpp
+++ b/src/ui/widget/panel.cpp
@@ -46,7 +46,7 @@ static const int PANEL_SETTING_NEXTFREE = 5;
void Panel::prep() {
GtkIconSize sizes[] = {
- Inkscape::getRegisteredIconSize(Inkscape::ICON_SIZE_DECORATION),
+ GTK_ICON_SIZE_MENU,
GTK_ICON_SIZE_MENU,
GTK_ICON_SIZE_SMALL_TOOLBAR,
GTK_ICON_SIZE_BUTTON,
@@ -270,7 +270,7 @@ void Panel::_init()
gint height = 0;
gtk_image_set_from_icon_name(_temp_arrow.gobj(),
"pan-start-symbolic",
- Inkscape::getRegisteredIconSize(Inkscape::ICON_SIZE_SMALL_TOOLBAR));
+ GTK_ICON_SIZE_SMALL_TOOLBAR);
_menu_popper.add(_temp_arrow);
_menu_popper.signal_button_press_event().connect_notify(sigc::mem_fun(*this, &Panel::_popper));
}
diff --git a/src/ui/widget/random.cpp b/src/ui/widget/random.cpp
index ba3b025ba..237144c7c 100644
--- a/src/ui/widget/random.cpp
+++ b/src/ui/widget/random.cpp
@@ -15,11 +15,11 @@
#include "random.h"
-#include "widgets/icon.h"
#include <glibmm/i18n.h>
#include <gtkmm/button.h>
+#include <gtkmm/image.h>
namespace Inkscape {
namespace UI {
@@ -70,7 +70,8 @@ void Random::setStartSeed(long newseed)
void Random::addReseedButton()
{
- Gtk::Widget* pIcon = Gtk::manage( sp_icon_get_icon( "randomize", Inkscape::ICON_SIZE_BUTTON) );
+ Gtk::Image* pIcon = Gtk::manage(new Gtk::Image());
+ pIcon->set_from_icon_name( "randomize", Gtk::ICON_SIZE_BUTTON);
Gtk::Button * pButton = Gtk::manage(new Gtk::Button());
pButton->set_relief(Gtk::RELIEF_NONE);
pIcon->show();