mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-21 13:20:30 +08:00
fix: disable custom window resizer on Linux platform if Window.WindowState != WindowState.Normal
This commit is contained in:
@@ -51,5 +51,8 @@ namespace SourceGit.Converters
|
||||
return Application.Current?.FindResource("Icons.Window.Maximize") as StreamGeometry;
|
||||
}
|
||||
});
|
||||
|
||||
public static FuncValueConverter<WindowState, bool> IsNormal =
|
||||
new FuncValueConverter<WindowState, bool>(state => state == WindowState.Normal);
|
||||
}
|
||||
}
|
||||
@@ -91,7 +91,7 @@
|
||||
</Grid>
|
||||
|
||||
<!-- 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"
|
||||
Background="Transparent"
|
||||
HorizontalAlignment="Left" VerticalAlignment="Top"
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
</Grid>
|
||||
|
||||
<!-- 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"
|
||||
Background="Transparent"
|
||||
HorizontalAlignment="Left" VerticalAlignment="Top"
|
||||
|
||||
@@ -365,7 +365,7 @@
|
||||
</Grid>
|
||||
|
||||
<!-- 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"
|
||||
Background="Transparent"
|
||||
HorizontalAlignment="Left" VerticalAlignment="Top"
|
||||
|
||||
Reference in New Issue
Block a user