mirror of
https://github.com/rad4day/Waybar.git
synced 2025-07-13 22:52:30 +02:00
Added tooltips
This commit is contained in:
@ -12,12 +12,15 @@
|
||||
#include "gtkmm/revealer.h"
|
||||
#include "util/pipewire/privacy_node_info.hpp"
|
||||
|
||||
using waybar::util::PipewireBackend::PrivacyNodeInfo;
|
||||
using waybar::util::PipewireBackend::PrivacyNodeType;
|
||||
|
||||
namespace waybar::modules::privacy {
|
||||
|
||||
class PrivacyItem : public Gtk::Revealer {
|
||||
public:
|
||||
PrivacyItem(const Json::Value&, enum util::PipewireBackend::PrivacyNodeType privacy_type_,
|
||||
const std::string& pos);
|
||||
PrivacyItem(const Json::Value &config_, enum PrivacyNodeType privacy_type_,
|
||||
std::list<PrivacyNodeInfo *> *nodes, const std::string &pos);
|
||||
|
||||
bool is_enabled();
|
||||
|
||||
@ -26,9 +29,10 @@ class PrivacyItem : public Gtk::Revealer {
|
||||
void set_icon_size(uint size);
|
||||
|
||||
private:
|
||||
enum util::PipewireBackend::PrivacyNodeType privacy_type;
|
||||
enum PrivacyNodeType privacy_type;
|
||||
std::list<PrivacyNodeInfo *> *nodes;
|
||||
|
||||
std::mutex mutex_;
|
||||
Gtk::Box tooltip_window;
|
||||
|
||||
bool init = false;
|
||||
bool in_use = false;
|
||||
@ -37,12 +41,15 @@ class PrivacyItem : public Gtk::Revealer {
|
||||
// Config
|
||||
bool enabled = true;
|
||||
std::string iconName = "image-missing-symbolic";
|
||||
bool tooltip = true;
|
||||
uint tooltipIconSize = 24;
|
||||
|
||||
Gtk::Box box_;
|
||||
Gtk::Image icon_;
|
||||
|
||||
void on_child_revealed_changed();
|
||||
void on_map_changed();
|
||||
void update_tooltip();
|
||||
};
|
||||
|
||||
} // namespace waybar::modules::privacy
|
||||
|
Reference in New Issue
Block a user