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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user