diff --git a/share/ui/style.css b/share/ui/style.css
index 9593cfcea1..f345cf730b 100644
--- a/share/ui/style.css
+++ b/share/ui/style.css
@@ -25,7 +25,7 @@
* @theme_tooltip_fg_color
*
*/
-
+gtk-theme-name:"Symbolic";
/* Our own custom shades... better not to use.
* Lightest to darkest based on linear rgb.
@@ -170,4 +170,4 @@ combobox window.popup scrolledwindow treeview separator {
spinbutton undershoot {
outline-style : none;
-}
\ No newline at end of file
+}
diff --git a/src/ui/dialog/align-and-distribute.cpp b/src/ui/dialog/align-and-distribute.cpp
index 3d9a53951b..69c5901274 100644
--- a/src/ui/dialog/align-and-distribute.cpp
+++ b/src/ui/dialog/align-and-distribute.cpp
@@ -28,7 +28,7 @@
#include <utility>
#include "align-and-distribute.h"
-
+#include <gtkmm/icontheme.h>
#include "desktop.h"
#include "document-undo.h"
#include "document.h"
@@ -67,18 +67,24 @@ Action::Action(Glib::ustring id,
_id(std::move(id)),
_parent(parent)
{
- Gtk::Image* pIcon = Gtk::manage(new Gtk::Image());
- pIcon->set_from_icon_name( _id, Gtk::ICON_SIZE_LARGE_TOOLBAR);
- Gtk::Button * pButton = Gtk::manage(new Gtk::Button());
- pButton->set_relief(Gtk::RELIEF_NONE);
- pIcon->show();
- pButton->add(*pIcon);
- pButton->show();
-
- pButton->signal_clicked()
- .connect(sigc::mem_fun(*this, &Action::on_button_click));
- pButton->set_tooltip_text(tiptext);
- parent.attach(*pButton, column, row, 1, 1);
+ Glib::RefPtr<Gtk::IconTheme> icon_theme = Gtk::IconTheme::get_default();
+ gint width, height;
+ gtk_icon_size_lookup(GTK_ICON_SIZE_LARGE_TOOLBAR, &width, &height);
+ int phys = width;
+ Glib::RefPtr<Gdk::Pixbuf> pixbuf = icon_theme->load_icon (_id.c_str(), phys, Gtk::ICON_LOOKUP_FORCE_SYMBOLIC);
+ if (pixbuf) {
+ Gtk::Image* pIcon = Gtk::manage(new Gtk::Image(pixbuf));
+ Gtk::Button * pButton = Gtk::manage(new Gtk::Button());
+ pButton->set_relief(Gtk::RELIEF_NONE);
+ pIcon->show();
+ pButton->add(*pIcon);
+ pButton->show();
+
+ pButton->signal_clicked()
+ .connect(sigc::mem_fun(*this, &Action::on_button_click));
+ pButton->set_tooltip_text(tiptext);
+ parent.attach(*pButton, column, row, 1, 1);
+ }
}
-
Bitte melde Dich an, um einen Kommentar zu verfassen!