Browse Source

Fixed some RTL flipping issues

CPKreuz 2 years ago
parent
commit
f7e77e14e0

+ 2 - 1
src/PixiEditor/Views/UserControls/DiscordRPPreview.xaml

@@ -9,7 +9,8 @@
              xmlns:views="clr-namespace:PixiEditor.Views"
              mc:Ignorable="d" 
              d:DesignWidth="300"
-             x:Name="uc">
+             x:Name="uc"
+             FlowDirection="LeftToRight">
     <Grid>
         <Border CornerRadius="5" Background="#292b2f" x:Name="OutsideBorder">
             <Grid>

+ 12 - 6
src/PixiEditor/Views/UserControls/Layers/LayersManager.xaml

@@ -29,7 +29,8 @@
                     DockPanel.Dock="Left"
                     Height="24" Width="24" Cursor="Hand" vws:Translator.TooltipKey="NEW_LAYER"
                     HorizontalAlignment="Stretch" Margin="0,0,5,0"
-                    Style="{StaticResource ToolButtonStyle}">
+                    Style="{StaticResource ToolButtonStyle}"
+                    FlowDirection="LeftToRight">
                     <Button.Background>
                         <ImageBrush ImageSource="/Images/Layer-add.png"/>
                     </Button.Background>
@@ -39,7 +40,8 @@
                     Height="24" Width="24" vws:Translator.TooltipKey="NEW_FOLDER" Cursor="Hand"
                     DockPanel.Dock="Left"
                     HorizontalAlignment="Stretch"  Margin="0,0,5,0"
-                    Style="{StaticResource ToolButtonStyle}">
+                    Style="{StaticResource ToolButtonStyle}"
+                    FlowDirection="LeftToRight">
                     <Button.Background>
                         <ImageBrush ImageSource="/Images/Folder-add.png"/>
                     </Button.Background>
@@ -49,7 +51,8 @@
                     Cursor="Hand"
                     HorizontalAlignment="Stretch" Margin="0,0,5,0"
                     DockPanel.Dock="Left"
-                    Style="{StaticResource ToolButtonStyle}">
+                    Style="{StaticResource ToolButtonStyle}"
+                    FlowDirection="LeftToRight">
                     <Button.Background>
                         <ImageBrush ImageSource="/Images/Trash.png"/>
                     </Button.Background>
@@ -58,7 +61,8 @@
                     Command="{commands:Command PixiEditor.Layer.MergeWithBelow}" Height="24" Width="24" vws:Translator.TooltipKey="MERGE_WITH_BELOW" Cursor="Hand"
                     DockPanel.Dock="Right"
                     HorizontalAlignment="Stretch" Margin="5,0,0,0"
-                    Style="{StaticResource ToolButtonStyle}">
+                    Style="{StaticResource ToolButtonStyle}"
+                    FlowDirection="LeftToRight">
                     <Button.Background>
                         <ImageBrush ImageSource="/Images/Merge-downwards.png"/>
                     </Button.Background>
@@ -68,7 +72,8 @@
                     DockPanel.Dock="Right"
                     HorizontalAlignment="Stretch" Margin="5,0,0,0"
                     Style="{StaticResource ToolButtonStyle}"
-                    Command="{commands:Command PixiEditor.Layer.CreateMask}">
+                    Command="{commands:Command PixiEditor.Layer.CreateMask}"
+                    FlowDirection="LeftToRight">
                     <Button.Background>
                         <ImageBrush ImageSource="/Images/Create-mask.png"/>
                     </Button.Background>
@@ -78,7 +83,8 @@
                     DockPanel.Dock="Right"
                     HorizontalAlignment="Stretch" Margin="5,0,0,0"
                     Style="{StaticResource ToolButtonStyle}"
-                    Command="{commands:Command PixiEditor.Layer.ToggleLockTransparency}">
+                    Command="{commands:Command PixiEditor.Layer.ToggleLockTransparency}"
+                    FlowDirection="LeftToRight">
                     <Button.Background>
                         <ImageBrush ImageSource="/Images/Lock-alpha.png"/>
                     </Button.Background>

+ 2 - 1
src/PixiEditor/Views/UserControls/Palettes/ColorReplacer.xaml

@@ -11,6 +11,7 @@
              xmlns:behaviours="clr-namespace:PixiEditor.Helpers.Behaviours"
              xmlns:colorPicker="clr-namespace:ColorPicker;assembly=ColorPicker"
              xmlns:views="clr-namespace:PixiEditor.Views"
+             xmlns:helpers="clr-namespace:PixiEditor.Helpers"
              mc:Ignorable="d" Name="uc"
              d:DesignHeight="50" d:DesignWidth="300">
     <Border BorderBrush="{StaticResource DarkerAccentColor}" 
@@ -33,7 +34,7 @@
                             Width="35" 
                             views:Translator.TooltipKey="REPLACER_TOOLTIP"
                             AllowDrop="True" Drop="UIElement_OnDrop"/>
-                    <Image Source="/Images/Arrow-right.png" Height="20" Width="20" Margin="10 0"/>
+                    <Image Source="/Images/Arrow-right.png" Height="20" Width="20" Margin="10 0" FlowDirection="{helpers:Localization FlowDirection}"/>
                     <colorPicker:PortableColorPicker 
                         UseHintColor="True"
                         SelectedColor="{Binding ElementName=uc, Path=NewColor, Mode=TwoWay}"

+ 6 - 3
src/PixiEditor/Views/UserControls/Viewport.xaml

@@ -192,7 +192,8 @@
                             Focusable="False"
                             ShowFill="{Binding ToolsSubViewModel.ActiveTool, Source={vm:MainVM}, Converter={converters:IsSelectionToolConverter}}"
                             Path="{Binding Document.SelectionPathBindable}"
-                            ZoomboxScale="{Binding Zoombox.Scale}" />
+                            ZoomboxScale="{Binding Zoombox.Scale}"
+                            FlowDirection="LeftToRight" />
                         <brushOverlay:BrushShapeOverlay
                             Focusable="False"
                             IsHitTestVisible="False"
@@ -201,7 +202,8 @@
                             MouseEventSource="{Binding Zoombox.Tag.BackgroundGrid, Mode=OneTime}"
                             MouseReference="{Binding Zoombox.Tag.MainImage, Mode=OneTime}"
                             BrushSize="{Binding ToolsSubViewModel.ActiveBasicToolbar.ToolSize, Source={vm:MainVM}}"
-                            BrushShape="{Binding ToolsSubViewModel.ActiveTool.BrushShape, Source={vm:MainVM}, FallbackValue={x:Static brushOverlay:BrushShape.Hidden}}" />
+                            BrushShape="{Binding ToolsSubViewModel.ActiveTool.BrushShape, Source={vm:MainVM}, FallbackValue={x:Static brushOverlay:BrushShape.Hidden}}"
+                            FlowDirection="LeftToRight"/>
                         <transformOverlay:TransformOverlay
                             Focusable="False"
                             Cursor="Arrow"
@@ -226,7 +228,8 @@
                             ActionCompleted="{Binding Document.LineToolOverlayViewModel.ActionCompletedCommand}"
                             LineStart="{Binding Document.LineToolOverlayViewModel.LineStart, Mode=TwoWay}"
                             LineEnd="{Binding Document.LineToolOverlayViewModel.LineEnd, Mode=TwoWay}"
-                            ZoomboxScale="{Binding Zoombox.Scale}" />
+                            ZoomboxScale="{Binding Zoombox.Scale}"
+                            FlowDirection="LeftToRight"/>
                     </Grid>
                     <Grid IsHitTestVisible="False" 
                         ShowGridLines="True" Width="{Binding Document.Width}" Height="{Binding Document.Height}" Panel.ZIndex="10"