quick commit
This commit is contained in:
@@ -12,7 +12,7 @@ class Popover : public Button {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void on_toggle_window();
|
void on_toggle_window();
|
||||||
Gtk::Popover *popover = nullptr;
|
std::unique_ptr<Gtk::Popover> popover;
|
||||||
void set_popover_child(Gtk::Widget &child) {
|
void set_popover_child(Gtk::Widget &child) {
|
||||||
gtk_popover_set_child(popover->gobj(), child.gobj());
|
gtk_popover_set_child(popover->gobj(), child.gobj());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ window {
|
|||||||
popover {
|
popover {
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
font-family: var(--text-font);
|
font-family: var(--text-font);
|
||||||
padding: 6px;
|
/* padding: 6px; TODO: create better padding*/
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
|
||||||
background: rgba(25, 25, 25, 0.8);
|
background: rgba(25, 25, 25, 0.8);
|
||||||
@@ -39,7 +39,7 @@ popover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.control-center-popover {
|
.control-center-popover {
|
||||||
padding: 12px;
|
margin: 0;
|
||||||
background-color: rgba(25, 25, 25, 0.95);
|
background-color: rgba(25, 25, 25, 0.95);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,14 +7,12 @@ Popover::Popover(const std::string icon, std::string name): Button(icon) {
|
|||||||
|
|
||||||
this->add_css_class("material-icons");
|
this->add_css_class("material-icons");
|
||||||
|
|
||||||
popover = new Gtk::Popover();
|
popover = std::make_unique<Gtk::Popover>();
|
||||||
popover->set_parent(*this);
|
popover->set_parent(*this);
|
||||||
popover->set_autohide(true);
|
popover->set_autohide(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Popover::~Popover() {
|
Popover::~Popover() = default;
|
||||||
delete popover;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Popover::on_toggle_window() {
|
void Popover::on_toggle_window() {
|
||||||
if (popover->get_visible()) {
|
if (popover->get_visible()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user