From a048d7ae7af578398dee8dfcdb013af48e092eca Mon Sep 17 00:00:00 2001 From: Arif Hasanic Date: Tue, 3 Feb 2026 18:47:54 +0100 Subject: [PATCH] quick commit --- include/components/popover.hpp | 2 +- resources/bar.css | 4 ++-- src/components/popover.cpp | 6 ++---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/include/components/popover.hpp b/include/components/popover.hpp index ed79d58..5ed2769 100644 --- a/include/components/popover.hpp +++ b/include/components/popover.hpp @@ -12,7 +12,7 @@ class Popover : public Button { protected: void on_toggle_window(); - Gtk::Popover *popover = nullptr; + std::unique_ptr popover; void set_popover_child(Gtk::Widget &child) { gtk_popover_set_child(popover->gobj(), child.gobj()); } diff --git a/resources/bar.css b/resources/bar.css index 9605f98..d212d73 100644 --- a/resources/bar.css +++ b/resources/bar.css @@ -29,7 +29,7 @@ window { popover { margin-top: 4px; font-family: var(--text-font); - padding: 6px; + /* padding: 6px; TODO: create better padding*/ border-radius: 8px; background: rgba(25, 25, 25, 0.8); @@ -39,7 +39,7 @@ popover { } .control-center-popover { - padding: 12px; + margin: 0; background-color: rgba(25, 25, 25, 0.95); } diff --git a/src/components/popover.cpp b/src/components/popover.cpp index e007334..f21ae3a 100644 --- a/src/components/popover.cpp +++ b/src/components/popover.cpp @@ -7,14 +7,12 @@ Popover::Popover(const std::string icon, std::string name): Button(icon) { this->add_css_class("material-icons"); - popover = new Gtk::Popover(); + popover = std::make_unique(); popover->set_parent(*this); popover->set_autohide(true); } -Popover::~Popover() { - delete popover; -} +Popover::~Popover() = default; void Popover::on_toggle_window() { if (popover->get_visible()) {