Don't destroy unused Widget for SensorTooltips

We would create the Revealer and then destroy it when SensorTooltips is
true
This commit is contained in:
scorpion-26 2023-11-01 17:08:13 +01:00
parent 6c8f57238a
commit 1f6ad2aab7

View file

@ -423,9 +423,10 @@ namespace Bar
box->SetSpacing({0, false});
box->SetOrientation(Utils::GetOrientation());
{
auto revealer = Widget::Create<Revealer>();
std::unique_ptr<Revealer> revealer = nullptr;
if (!Config::Get().sensorTooltips)
{
revealer = Widget::Create<Revealer>();
revealer->SetTransition({Utils::GetTransitionType(SideToDefaultTransition(side)), 500});
// Add event to eventbox for the revealer to open
eventBox->SetHoverFn(