deine mum
This commit is contained in:
@@ -2,8 +2,43 @@
|
|||||||
|
|
||||||
#include <gtkmm/box.h>
|
#include <gtkmm/box.h>
|
||||||
#include <gtkmm/button.h>
|
#include <gtkmm/button.h>
|
||||||
|
#include <gtkmm/label.h>
|
||||||
|
|
||||||
#include "components/base/button.hpp"
|
#include "components/base/button.hpp"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class BluetoothEntry : Gtk::Box {
|
||||||
|
public:
|
||||||
|
BluetoothEntry(std::string name, std::string address) {
|
||||||
|
this->set_orientation(Gtk::Orientation::VERTICAL);
|
||||||
|
this->add_css_class("bluetooth-entry-box");
|
||||||
|
|
||||||
|
auto nameLabel = Gtk::make_managed<Gtk::Label>(name);
|
||||||
|
nameLabel->set_halign(Gtk::Align::START);
|
||||||
|
nameLabel->add_css_class("bluetooth-entry-name");
|
||||||
|
this->append(*nameLabel);
|
||||||
|
|
||||||
|
auto addressLabel = Gtk::make_managed<Gtk::Label>(address);
|
||||||
|
addressLabel->set_halign(Gtk::Align::START);
|
||||||
|
addressLabel->add_css_class("bluetooth-entry-address");
|
||||||
|
this->append(*addressLabel);
|
||||||
|
|
||||||
|
this->add_css_class("bluetooth-entry");
|
||||||
|
|
||||||
|
auto connectButton = Gtk::make_managed<Button>("Connect");
|
||||||
|
connectButton->set_halign(Gtk::Align::END);
|
||||||
|
connectButton->set_tooltip_text("Connect to Device");
|
||||||
|
connectButton->onClickedSignal.connect([this, address]() {
|
||||||
|
this->connect_clicked.emit(address);
|
||||||
|
});
|
||||||
|
this->append(*connectButton);
|
||||||
|
}
|
||||||
|
|
||||||
|
sigc::signal<void(std::string)> connect_clicked;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
class BluetoothWidget : public Gtk::Box {
|
class BluetoothWidget : public Gtk::Box {
|
||||||
public:
|
public:
|
||||||
BluetoothWidget();
|
BluetoothWidget();
|
||||||
@@ -21,7 +56,8 @@ class BluetoothWidget : public Gtk::Box {
|
|||||||
bool isDiscovering = false;
|
bool isDiscovering = false;
|
||||||
|
|
||||||
Gtk::Box statusArea;
|
Gtk::Box statusArea;
|
||||||
Gtk::Box *deviceList = nullptr;
|
std::map<std::string, BluetoothEntry *> deviceEntries;
|
||||||
|
Gtk::Box devicesArea;
|
||||||
Button *scanButton = nullptr;
|
Button *scanButton = nullptr;
|
||||||
Button *powerButton = nullptr;
|
Button *powerButton = nullptr;
|
||||||
|
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ button {
|
|||||||
animation: workspace-updown 1.2s ease-in-out infinite;
|
animation: workspace-updown 1.2s ease-in-out infinite;
|
||||||
margin-left: -4px;
|
margin-left: -4px;
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
font-size: 10px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.workspace-pill-seven {
|
.workspace-pill-seven {
|
||||||
@@ -106,7 +106,7 @@ button {
|
|||||||
animation-delay: 0.6s;
|
animation-delay: 0.6s;
|
||||||
margin-right: -4px;
|
margin-right: -4px;
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
font-size: 10px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes workspace-updown {
|
@keyframes workspace-updown {
|
||||||
|
|||||||
@@ -29,8 +29,6 @@ App::App() {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
auto bar = new Bar(monitor->gobj(), hyprlandMonitor->id);
|
auto bar = new Bar(monitor->gobj(), hyprlandMonitor->id);
|
||||||
|
|
||||||
bar->set_application(app);
|
bar->set_application(app);
|
||||||
@@ -40,6 +38,7 @@ App::App() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
app->signal_shutdown().connect([&]() {
|
app->signal_shutdown().connect([&]() {
|
||||||
for (auto bar : bars) {
|
for (auto bar : bars) {
|
||||||
delete bar;
|
delete bar;
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "glib.h"
|
#include "glib.h"
|
||||||
#include "sigc++/signal.h"
|
|
||||||
|
|
||||||
BluetoothService::BluetoothService() {
|
BluetoothService::BluetoothService() {
|
||||||
GError *error = nullptr;
|
GError *error = nullptr;
|
||||||
|
|||||||
@@ -258,10 +258,10 @@ void HyprlandService::onUrgentEvent(std::string windowAddress) {
|
|||||||
auto it = this->workspaces.find(workspaceId);
|
auto it = this->workspaces.find(workspaceId);
|
||||||
if (it != this->workspaces.end() && it->second) {
|
if (it != this->workspaces.end() && it->second) {
|
||||||
|
|
||||||
if (std::find(it->second->urgentWindows.begin(),
|
WorkspaceState *ws = it->second;
|
||||||
it->second->urgentWindows.end(), windowAddress) ==
|
auto uit = std::find(ws->urgentWindows.begin(), ws->urgentWindows.end(), windowAddress);
|
||||||
it->second->urgentWindows.end()) {
|
if (uit == ws->urgentWindows.end()) {
|
||||||
it->second->urgentWindows.push_back(windowAddress);
|
ws->urgentWindows.push_back(windowAddress);
|
||||||
workspaceStateChanged.emit();
|
workspaceStateChanged.emit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
#include "widgets/bluetooth.hpp"
|
#include "widgets/bluetooth.hpp"
|
||||||
|
#include "gtkmm/label.h"
|
||||||
|
|
||||||
|
|
||||||
BluetoothWidget::BluetoothWidget() : Gtk::Box() {
|
BluetoothWidget::BluetoothWidget() : Gtk::Box() {
|
||||||
this->set_orientation(Gtk::Orientation::VERTICAL);
|
this->set_orientation(Gtk::Orientation::VERTICAL);
|
||||||
|
|||||||
@@ -41,18 +41,17 @@ WorkspaceIndicator::WorkspaceIndicator(int monitorId)
|
|||||||
overlay->add_controller(gesture);
|
overlay->add_controller(gesture);
|
||||||
overlay->add_css_class("workspace-pill");
|
overlay->add_css_class("workspace-pill");
|
||||||
|
|
||||||
// if (i == 6 || i == 7) {
|
if (i == 6 || i == 7) {
|
||||||
// auto indicator = Gtk::make_managed<Gtk::Label>(i == 6 ? "🫱🏻" : "🫲🏻");
|
auto indicator = Gtk::make_managed<Gtk::Label>(i == 6 ? "🫱🏻" : "🫲🏻");
|
||||||
// indicator->add_css_class(i == 6 ? "workspace-pill-six" : "workspace-pill-seven");
|
indicator->add_css_class(i == 6 ? "workspace-pill-six" : "workspace-pill-seven");
|
||||||
// indicator->set_valign(Gtk::Align::END);
|
indicator->set_valign(Gtk::Align::END);
|
||||||
// indicator->set_halign(i == 6 ? Gtk::Align::START : Gtk::Align::END);
|
overlay->set_child(*indicator);
|
||||||
// overlay->set_child(*indicator);
|
overlay->add_overlay(*numLabel);
|
||||||
// overlay->add_overlay(*numLabel);
|
pillContainer->append(*overlay);
|
||||||
// pillContainer->append(*overlay);
|
} else {
|
||||||
// } else {
|
|
||||||
overlay->set_child(*numLabel);
|
overlay->set_child(*numLabel);
|
||||||
pillContainer->append(*overlay);
|
pillContainer->append(*overlay);
|
||||||
// }
|
}
|
||||||
|
|
||||||
append(*pillContainer);
|
append(*pillContainer);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user