fix: disable custom window resizer on Linux platform if Window.WindowState != WindowState.Normal

This commit is contained in:
leo 2024-03-29 12:15:52 +08:00
parent e59bacb75c
commit 3c38f681bd
4 changed files with 6 additions and 3 deletions

View file

@ -51,5 +51,8 @@ namespace SourceGit.Converters
return Application.Current?.FindResource("Icons.Window.Maximize") as StreamGeometry; return Application.Current?.FindResource("Icons.Window.Maximize") as StreamGeometry;
} }
}); });
public static FuncValueConverter<WindowState, bool> IsNormal =
new FuncValueConverter<WindowState, bool>(state => state == WindowState.Normal);
} }
} }

View file

@ -91,7 +91,7 @@
</Grid> </Grid>
<!-- Custom window sizer for Linux --> <!-- Custom window sizer for Linux -->
<Grid Grid.Row="0" Grid.RowSpan="3" IsVisible="{OnPlatform False, Linux=True}"> <Grid Grid.Row="0" Grid.RowSpan="3" IsVisible="{OnPlatform False, Linux=True}" IsHitTestVisible="{Binding #me.WindowState, Converter={x:Static c:WindowStateConverters.IsNormal}}">
<Border Width="4" Height="4" <Border Width="4" Height="4"
Background="Transparent" Background="Transparent"
HorizontalAlignment="Left" VerticalAlignment="Top" HorizontalAlignment="Left" VerticalAlignment="Top"

View file

@ -147,7 +147,7 @@
</Grid> </Grid>
<!-- Custom window sizer for Linux --> <!-- Custom window sizer for Linux -->
<Grid Grid.Row="0" Grid.RowSpan="2" IsVisible="{OnPlatform False, Linux=True}"> <Grid Grid.Row="0" Grid.RowSpan="2" IsVisible="{OnPlatform False, Linux=True}" IsHitTestVisible="{Binding #me.WindowState, Converter={x:Static c:WindowStateConverters.IsNormal}}">
<Border Width="4" Height="4" <Border Width="4" Height="4"
Background="Transparent" Background="Transparent"
HorizontalAlignment="Left" VerticalAlignment="Top" HorizontalAlignment="Left" VerticalAlignment="Top"

View file

@ -365,7 +365,7 @@
</Grid> </Grid>
<!-- Custom window sizer for Linux --> <!-- Custom window sizer for Linux -->
<Grid Grid.Row="0" Grid.RowSpan="2" IsVisible="{OnPlatform False, Linux=True}"> <Grid Grid.Row="0" Grid.RowSpan="2" IsVisible="{OnPlatform False, Linux=True}" IsHitTestVisible="{Binding #me.WindowState, Converter={x:Static c:WindowStateConverters.IsNormal}}">
<Border Width="4" Height="4" <Border Width="4" Height="4"
Background="Transparent" Background="Transparent"
HorizontalAlignment="Left" VerticalAlignment="Top" HorizontalAlignment="Left" VerticalAlignment="Top"