From 57c99dc52650374ac6d1b4f22ad00efb5bd64be7 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 11 Apr 2019 15:28:38 +0200 Subject: [PATCH] refactor(Tray): also search in default theme --- include/modules/sni/item.hpp | 1 + src/modules/sni/item.cpp | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/modules/sni/item.hpp b/include/modules/sni/item.hpp index 71b1a711..7451d508 100644 --- a/include/modules/sni/item.hpp +++ b/include/modules/sni/item.hpp @@ -65,6 +65,7 @@ private: Glib::RefPtr cancellable_; Glib::RefPtr proxy_; + std::vector default_icon_path_; bool update_pending_; }; diff --git a/src/modules/sni/item.cpp b/src/modules/sni/item.cpp index 2a80b9b5..6c750d27 100644 --- a/src/modules/sni/item.cpp +++ b/src/modules/sni/item.cpp @@ -14,6 +14,7 @@ waybar::modules::SNI::Item::Item(std::string bn, std::string op, const Json::Val if (config["icon-size"].isUInt()) { icon_size = config["icon-size"].asUInt(); } + default_icon_path_ = Gtk::IconTheme::get_default()->get_search_path(); event_box.add(image); event_box.add_events(Gdk::BUTTON_PRESS_MASK); event_box.signal_button_press_event().connect( @@ -94,7 +95,9 @@ waybar::modules::SNI::Item::setProperty(const ustring& name, } else if (name == "IconThemePath") { icon_theme_path = get_variant(value); if (!icon_theme_path.empty()) { - icon_theme->set_search_path({icon_theme_path}); + std::vector paths(default_icon_path_); + paths.push_back(icon_theme_path); + icon_theme->set_search_path(paths); } } else if (name == "Menu") { menu = get_variant(value);