mirror of
				https://github.com/rad4day/Waybar.git
				synced 2025-10-31 16:02:43 +01:00 
			
		
		
		
	fix(tray): icons size
This commit is contained in:
		| @@ -1,7 +1,7 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include <gtkmm.h> | ||||
|  | ||||
| #include <json/json.h> | ||||
| #include <tuple> | ||||
| #include <dbus-status-notifier-watcher.h> | ||||
| #include "modules/sni/sni.hpp" | ||||
| @@ -10,7 +10,7 @@ namespace waybar::modules::SNI { | ||||
|  | ||||
| class Host { | ||||
|   public: | ||||
|     Host(Glib::Dispatcher*); | ||||
|     Host(Glib::Dispatcher*, const Json::Value&); | ||||
|     std::vector<Item> items; | ||||
|   private: | ||||
|     static void busAcquired(GDBusConnection*, const gchar*, gpointer); | ||||
| @@ -32,6 +32,7 @@ class Host { | ||||
|     Glib::Dispatcher* dp_; | ||||
|     GCancellable* cancellable_ = nullptr; | ||||
|     SnWatcher* watcher_ = nullptr; | ||||
|     const Json::Value &config_; | ||||
| }; | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -2,13 +2,14 @@ | ||||
|  | ||||
| #include <dbus-status-notifier-item.h> | ||||
| #include <gtkmm.h> | ||||
| #include <json/json.h> | ||||
| #include <filesystem> | ||||
|  | ||||
| namespace waybar::modules::SNI { | ||||
|  | ||||
| class Item { | ||||
| public: | ||||
|   Item(std::string, std::string, Glib::Dispatcher *); | ||||
|   Item(std::string, std::string, Glib::Dispatcher*, Json::Value); | ||||
|  | ||||
|   std::string bus_name; | ||||
|   std::string object_path; | ||||
| @@ -40,6 +41,7 @@ private: | ||||
|   static void handleSecondaryActivate(GObject *, GAsyncResult *, gpointer); | ||||
|  | ||||
|   void updateImage(); | ||||
|   void updateMenu(); | ||||
|   Glib::RefPtr<Gdk::Pixbuf> extractPixBuf(GVariant *variant); | ||||
|   Glib::RefPtr<Gdk::Pixbuf> getIconByName(std::string name, int size); | ||||
|   bool handleClick(GdkEventButton *const & /*ev*/); | ||||
| @@ -47,6 +49,7 @@ private: | ||||
|   Glib::Dispatcher *dp_; | ||||
|   GCancellable *cancellable_ = nullptr; | ||||
|   SnItem *proxy_ = nullptr; | ||||
|   Json::Value config_; | ||||
| }; | ||||
|  | ||||
| } // namespace waybar::modules::SNI | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Alexis
					Alexis