Fix wxStaticBox repainting in RTL layout under MSW

Calculate the clipping region correctly when repainting a wxStaticBox
containing windows that are its siblings (rather than children) when RTL
layout is used: the old AdjustRectForRtl() implementation didn't mirror
the child coordinates correctly.

See #19086.
This commit is contained in:
AliKet
2022-01-11 02:50:37 +01:00
committed by Vadim Zeitlin
parent 2cb37faa9a
commit e9bb4e80cb

View File

@@ -374,8 +374,8 @@ RECT AdjustRectForRtl(wxLayoutDirection dir, RECT const& childRect, RECT const&
// The clipping region too is mirrored in RTL layout.
// We need to mirror screen coordinates relative to static box window priot to
// intersecting with region.
ret.right = boxRect.right - childRect.left - boxRect.left;
ret.left = boxRect.right - childRect.right - boxRect.left;
ret.right = boxRect.right - (childRect.left - boxRect.left);
ret.left = boxRect.left + (boxRect.right - childRect.right);
}
return ret;