diff --git a/Import/GacUI.cpp b/Import/GacUI.cpp index 0c24b170..1ac4ca2c 100644 --- a/Import/GacUI.cpp +++ b/Import/GacUI.cpp @@ -23990,7 +23990,6 @@ GuiToolstripGroupContainer } stackComposition->SetDirection(direction); - splitterThemeName = splitterThemeName; groupCollection->RebuildSplitters(); UpdateLayout(); } diff --git a/Import/GacUIWindows.cpp b/Import/GacUIWindows.cpp index 97ec9f75..5eae62df 100644 --- a/Import/GacUIWindows.cpp +++ b/Import/GacUIWindows.cpp @@ -12549,6 +12549,7 @@ namespace vl protected: Ptr buffer; INativeWindow* window; + bool needPaintAfterResize = false; vint DetermineBufferLength(vint minSize, vint minBound, vint maxBound, vint currentSize) { @@ -12583,6 +12584,7 @@ namespace vl if (buffer->GetWidth() != size.x.value || buffer->GetHeight() != size.y.value) { buffer = 0; + needPaintAfterResize = true; } } if (!buffer) @@ -12604,6 +12606,16 @@ namespace vl void Paint() { + // for the first Paint() call after Moved() + // trigger the global timer so that all GuiGraphicsHost with needToRender=true will call Render(false) + // so that to fill the buffer to prevent from seeing a black frame + // but it still leave some black color since the layout may needs more than 1 frame to finish + if (needPaintAfterResize) + { + needPaintAfterResize = false; + auto callbackService = GetCurrentController()->CallbackService(); + dynamic_cast(callbackService)->InvokeGlobalTimer(); + } IWindowsForm* form=GetWindowsForm(window); WinControlDC controlDC(form->GetWindowHandle()); controlDC.Draw(0, 0, buffer);