diff --git a/src/AudioFlyin.cpp b/src/AudioFlyin.cpp index 65758a8..5a8c523 100644 --- a/src/AudioFlyin.cpp +++ b/src/AudioFlyin.cpp @@ -87,7 +87,6 @@ namespace AudioFlyin mainWidget->SetSpacing({8, false}); mainWidget->SetVerticalTransform({16, true, Alignment::Fill}); mainWidget->SetClass("bar"); - mainWidget->AddTimer(DynCtx::Main, 1); auto padding = Widget::Create(); padding->SetHorizontalTransform({8, true, Alignment::Fill}); @@ -98,6 +97,8 @@ namespace AudioFlyin padding = Widget::Create(); mainWidget->AddChild(std::move(padding)); + mainWidget->AddTimer(DynCtx::Main, 1); + window = Window(std::move(mainWidget), monitor); window.SetExclusive(false); window.SetAnchor(Anchor::Bottom); diff --git a/src/BluetoothDevices.cpp b/src/BluetoothDevices.cpp index 8778f92..449ff8e 100644 --- a/src/BluetoothDevices.cpp +++ b/src/BluetoothDevices.cpp @@ -277,10 +277,10 @@ namespace BluetoothDevices void WidgetBody(Widget& parentWidget) { auto bodyBox = Widget::Create(); + DynCtx::deviceListBox = bodyBox.get(); bodyBox->SetOrientation(Orientation::Vertical); bodyBox->SetClass("bt-body-box"); bodyBox->AddTimer(DynCtx::OnUpdate, 100); - DynCtx::deviceListBox = bodyBox.get(); parentWidget.AddChild(std::move(bodyBox)); }