1. diff --git a/share/ui/style.css b/share/ui/style.css
  2. index 9593cfcea1..f345cf730b 100644
  3. --- a/share/ui/style.css
  4. +++ b/share/ui/style.css
  5. @@ -25,7 +25,7 @@
  6. * @theme_tooltip_fg_color
  7. *
  8. */
  9. -
  10. +gtk-theme-name:"Symbolic";
  11. /* Our own custom shades... better not to use.
  12. * Lightest to darkest based on linear rgb.
  13. @@ -170,4 +170,4 @@ combobox window.popup scrolledwindow treeview separator {
  14. spinbutton undershoot {
  15. outline-style : none;
  16. -}
  17. \ No newline at end of file
  18. +}
  19. diff --git a/src/ui/dialog/align-and-distribute.cpp b/src/ui/dialog/align-and-distribute.cpp
  20. index 3d9a53951b..69c5901274 100644
  21. --- a/src/ui/dialog/align-and-distribute.cpp
  22. +++ b/src/ui/dialog/align-and-distribute.cpp
  23. @@ -28,7 +28,7 @@
  24. #include <utility>
  25. #include "align-and-distribute.h"
  26. -
  27. +#include <gtkmm/icontheme.h>
  28. #include "desktop.h"
  29. #include "document-undo.h"
  30. #include "document.h"
  31. @@ -67,18 +67,24 @@ Action::Action(Glib::ustring id,
  32. _id(std::move(id)),
  33. _parent(parent)
  34. {
  35. - Gtk::Image* pIcon = Gtk::manage(new Gtk::Image());
  36. - pIcon->set_from_icon_name( _id, Gtk::ICON_SIZE_LARGE_TOOLBAR);
  37. - Gtk::Button * pButton = Gtk::manage(new Gtk::Button());
  38. - pButton->set_relief(Gtk::RELIEF_NONE);
  39. - pIcon->show();
  40. - pButton->add(*pIcon);
  41. - pButton->show();
  42. -
  43. - pButton->signal_clicked()
  44. - .connect(sigc::mem_fun(*this, &Action::on_button_click));
  45. - pButton->set_tooltip_text(tiptext);
  46. - parent.attach(*pButton, column, row, 1, 1);
  47. + Glib::RefPtr<Gtk::IconTheme> icon_theme = Gtk::IconTheme::get_default();
  48. + gint width, height;
  49. + gtk_icon_size_lookup(GTK_ICON_SIZE_LARGE_TOOLBAR, &width, &height);
  50. + int phys = width;
  51. + Glib::RefPtr<Gdk::Pixbuf> pixbuf = icon_theme->load_icon (_id.c_str(), phys, Gtk::ICON_LOOKUP_FORCE_SYMBOLIC);
  52. + if (pixbuf) {
  53. + Gtk::Image* pIcon = Gtk::manage(new Gtk::Image(pixbuf));
  54. + Gtk::Button * pButton = Gtk::manage(new Gtk::Button());
  55. + pButton->set_relief(Gtk::RELIEF_NONE);
  56. + pIcon->show();
  57. + pButton->add(*pIcon);
  58. + pButton->show();
  59. +
  60. + pButton->signal_clicked()
  61. + .connect(sigc::mem_fun(*this, &Action::on_button_click));
  62. + pButton->set_tooltip_text(tiptext);
  63. + parent.attach(*pButton, column, row, 1, 1);
  64. + }
  65. }
 
 

888

Simbolic

-

PasteBin

Zeilen
70
Wörter
207
Größe
2,3 KB
Erstellt
Unterversionen
2
Typ
text/plain
General Public License v2 (GPLv2)
Bitte melde Dich an, um einen Kommentar zu verfassen!