diff --git a/src/AudioFlyin.cpp b/src/AudioFlyin.cpp index 5a8c523..8743110 100644 --- a/src/AudioFlyin.cpp +++ b/src/AudioFlyin.cpp @@ -87,6 +87,8 @@ namespace AudioFlyin mainWidget->SetSpacing({8, false}); mainWidget->SetVerticalTransform({16, true, Alignment::Fill}); mainWidget->SetClass("bar"); + // We update the margin in the timer, so we need late dispatch. + mainWidget->AddTimer(DynCtx::Main, 1, TimerDispatchBehaviour::LateDispatch); auto padding = Widget::Create(); padding->SetHorizontalTransform({8, true, Alignment::Fill}); @@ -97,8 +99,6 @@ 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);