mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
feat(Bar): handle widget size changes
This commit is contained in:
@ -20,7 +20,7 @@ namespace waybar::modules::SNI {
|
||||
|
||||
class Item : public sigc::trackable {
|
||||
public:
|
||||
Item(std::string, std::string, const Json::Value&);
|
||||
Item(const std::string&, const std::string&, const Json::Value&);
|
||||
~Item() = default;
|
||||
|
||||
std::string bus_name;
|
||||
@ -58,7 +58,7 @@ class Item : public sigc::trackable {
|
||||
|
||||
void updateImage();
|
||||
Glib::RefPtr<Gdk::Pixbuf> extractPixBuf(GVariant* variant);
|
||||
Glib::RefPtr<Gdk::Pixbuf> getIconByName(std::string name, int size);
|
||||
Glib::RefPtr<Gdk::Pixbuf> getIconByName(const std::string& name, int size);
|
||||
static void onMenuDestroyed(Item* self);
|
||||
bool makeMenu(GdkEventButton* const& ev);
|
||||
bool handleClick(GdkEventButton* const& /*ev*/);
|
||||
|
@ -24,8 +24,8 @@ class Ipc {
|
||||
Json::Value payload;
|
||||
};
|
||||
|
||||
sigc::signal<void, const struct ipc_response> signal_event;
|
||||
sigc::signal<void, const struct ipc_response> signal_cmd;
|
||||
sigc::signal<void, const struct ipc_response&> signal_event;
|
||||
sigc::signal<void, const struct ipc_response&> signal_cmd;
|
||||
|
||||
void sendCmd(uint32_t type, const std::string &payload = "");
|
||||
void subscribe(const std::string &payload);
|
||||
|
@ -16,7 +16,7 @@ class Mode : public ALabel {
|
||||
auto update() -> void;
|
||||
|
||||
private:
|
||||
void onEvent(const struct Ipc::ipc_response);
|
||||
void onEvent(const struct Ipc::ipc_response&);
|
||||
void worker();
|
||||
|
||||
const Bar& bar_;
|
||||
|
@ -17,10 +17,10 @@ class Window : public ALabel {
|
||||
auto update() -> void;
|
||||
|
||||
private:
|
||||
void onEvent(const struct Ipc::ipc_response);
|
||||
void onCmd(const struct Ipc::ipc_response);
|
||||
void onEvent(const struct Ipc::ipc_response&);
|
||||
void onCmd(const struct Ipc::ipc_response&);
|
||||
void worker();
|
||||
std::tuple<int, std::string> getFocusedNode(Json::Value nodes);
|
||||
std::tuple<int, std::string> getFocusedNode(const Json::Value& nodes);
|
||||
void getFocusedWindow();
|
||||
|
||||
const Bar& bar_;
|
||||
|
@ -19,8 +19,8 @@ class Workspaces : public IModule {
|
||||
operator Gtk::Widget&();
|
||||
|
||||
private:
|
||||
void onCmd(const struct Ipc::ipc_response);
|
||||
void onEvent(const struct Ipc::ipc_response);
|
||||
void onCmd(const struct Ipc::ipc_response&);
|
||||
void onEvent(const struct Ipc::ipc_response&);
|
||||
void worker();
|
||||
bool filterButtons();
|
||||
Gtk::Button& addButton(const Json::Value&);
|
||||
|
Reference in New Issue
Block a user