fix six seven
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
#include "components/workspaceIndicator.hpp"
|
#include "components/workspaceIndicator.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include "services/hyprland.hpp"
|
||||||
|
|
||||||
#include "gtkmm/gestureclick.h"
|
#include "gtkmm/gestureclick.h"
|
||||||
#include "gtkmm/label.h"
|
#include "gtkmm/label.h"
|
||||||
@@ -14,7 +15,7 @@ WorkspaceIndicator::WorkspaceIndicator(int id, std::string label, sigc::slot<voi
|
|||||||
|
|
||||||
auto gesture = Gtk::GestureClick::create();
|
auto gesture = Gtk::GestureClick::create();
|
||||||
gesture->set_button(GDK_BUTTON_PRIMARY);
|
gesture->set_button(GDK_BUTTON_PRIMARY);
|
||||||
gesture->signal_released().connect([this, id, onClick](int, double, double) {
|
gesture->signal_released().connect([id, onClick](int, double, double) {
|
||||||
onClick(
|
onClick(
|
||||||
id);
|
id);
|
||||||
});
|
});
|
||||||
@@ -22,9 +23,11 @@ WorkspaceIndicator::WorkspaceIndicator(int id, std::string label, sigc::slot<voi
|
|||||||
overlay->add_controller(gesture);
|
overlay->add_controller(gesture);
|
||||||
overlay->add_css_class("workspace-pill");
|
overlay->add_css_class("workspace-pill");
|
||||||
|
|
||||||
if (id == 6 || id == 7) {
|
int sixSevenCheck = std::stoi(label);
|
||||||
auto indicator = Gtk::make_managed<Gtk::Label>(id == 6 ? "🫱🏻" : "🫲🏻");
|
|
||||||
indicator->add_css_class(id == 6 ? "workspace-pill-six" : "workspace-pill-seven");
|
if (sixSevenCheck == 6 || sixSevenCheck == 7) {
|
||||||
|
auto indicator = Gtk::make_managed<Gtk::Label>(sixSevenCheck == 6 ? "🫱🏻" : "🫲🏻");
|
||||||
|
indicator->add_css_class(sixSevenCheck == 6 ? "workspace-pill-six" : "workspace-pill-seven");
|
||||||
indicator->set_valign(Gtk::Align::END);
|
indicator->set_valign(Gtk::Align::END);
|
||||||
overlay->set_child(*indicator);
|
overlay->set_child(*indicator);
|
||||||
overlay->add_overlay(*numLabel);
|
overlay->add_overlay(*numLabel);
|
||||||
|
|||||||
Reference in New Issue
Block a user