mirror of
https://github.com/rad4day/Waybar.git
synced 2025-07-14 15:12:31 +02:00
modules/upower: use smart pointer to avoid memory leak
This commit is contained in:
@ -9,11 +9,10 @@
|
||||
namespace waybar::modules::upower {
|
||||
UPowerTooltip::UPowerTooltip(uint iconSize_, uint tooltipSpacing_, uint tooltipPadding_)
|
||||
: Gtk::Window(),
|
||||
contentBox(std::make_unique<Gtk::Box>(Gtk::ORIENTATION_VERTICAL)),
|
||||
iconSize(iconSize_),
|
||||
tooltipSpacing(tooltipSpacing_),
|
||||
tooltipPadding(tooltipPadding_) {
|
||||
contentBox = new Gtk::Box(Gtk::ORIENTATION_VERTICAL);
|
||||
|
||||
// Sets the Tooltip Padding
|
||||
contentBox->set_margin_top(tooltipPadding);
|
||||
contentBox->set_margin_bottom(tooltipPadding);
|
||||
|
Reference in New Issue
Block a user