Fix regressions caused by immediate dispatch

This commit is contained in:
scorpion-26 2023-01-29 12:36:29 +01:00
parent 3473da36f4
commit 3c6850b530
2 changed files with 3 additions and 2 deletions

View file

@ -87,7 +87,6 @@ namespace AudioFlyin
mainWidget->SetSpacing({8, false});
mainWidget->SetVerticalTransform({16, true, Alignment::Fill});
mainWidget->SetClass("bar");
mainWidget->AddTimer<Box>(DynCtx::Main, 1);
auto padding = Widget::Create<Box>();
padding->SetHorizontalTransform({8, true, Alignment::Fill});
@ -98,6 +97,8 @@ namespace AudioFlyin
padding = Widget::Create<Box>();
mainWidget->AddChild(std::move(padding));
mainWidget->AddTimer<Box>(DynCtx::Main, 1);
window = Window(std::move(mainWidget), monitor);
window.SetExclusive(false);
window.SetAnchor(Anchor::Bottom);

View file

@ -277,10 +277,10 @@ namespace BluetoothDevices
void WidgetBody(Widget& parentWidget)
{
auto bodyBox = Widget::Create<Box>();
DynCtx::deviceListBox = bodyBox.get();
bodyBox->SetOrientation(Orientation::Vertical);
bodyBox->SetClass("bt-body-box");
bodyBox->AddTimer<Widget>(DynCtx::OnUpdate, 100);
DynCtx::deviceListBox = bodyBox.get();
parentWidget.AddChild(std::move(bodyBox));
}