Skip to content

Commit 05b3046

Browse files
committed
CQ: Fix MainPropertiesPage drag area for RTL
1 parent 0bd2cd5 commit 05b3046

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Files.App/Views/Properties/MainPropertiesPage.xaml.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,12 @@ private void Page_Loaded(object sender, RoutedEventArgs e)
6767

6868
private int SetTitleBarDragRegion(InputNonClientPointerSource source, SizeInt32 size, double scaleFactor, Func<UIElement, RectInt32?, RectInt32> getScaledRect)
6969
{
70-
source.SetRegionRects(NonClientRegionKind.Passthrough, [getScaledRect(BackwardNavigationButton, null)]);
71-
return (int)TitlebarArea.ActualHeight;
70+
var height = (int)TitlebarArea.ActualHeight;
71+
var x = RealTimeLayoutService.FlowDirection == FlowDirection.LeftToRight ? 0 : (int)((TitleDragArea.ActualWidth + 50) * scaleFactor);
72+
var width = (int)((BackwardNavigationButton.ActualWidth + 2) * scaleFactor);
73+
74+
source.SetRegionRects(NonClientRegionKind.Passthrough, [getScaledRect(BackwardNavigationButton, new RectInt32(x, 0, width, height))]);
75+
return height;
7276
}
7377

7478
private void Page_SizeChanged(object sender, SizeChangedEventArgs e)

0 commit comments

Comments
 (0)