mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
style: views supports Linux
This commit is contained in:
parent
a89760c7a5
commit
267c955c88
12 changed files with 94 additions and 88 deletions
|
@ -382,7 +382,6 @@
|
|||
<sys:String x:Key="Text.Preference.General.MaxHistoryCommits">History Commits</sys:String>
|
||||
<sys:String x:Key="Text.Preference.General.RestoreTabs">Restore windows</sys:String>
|
||||
<sys:String x:Key="Text.Preference.General.UseFixedTabWidth">Use fixed tab width in titlebar</sys:String>
|
||||
<sys:String x:Key="Text.Preference.General.UseMacOSStyle">Use macOS style titlebar</sys:String>
|
||||
<sys:String x:Key="Text.Preference.Git">GIT</sys:String>
|
||||
<sys:String x:Key="Text.Preference.Git.Path">Install Path</sys:String>
|
||||
<sys:String x:Key="Text.Preference.Git.Version">Git version</sys:String>
|
||||
|
|
|
@ -381,7 +381,6 @@
|
|||
<sys:String x:Key="Text.Preference.General.MaxHistoryCommits">最大历史提交数</sys:String>
|
||||
<sys:String x:Key="Text.Preference.General.RestoreTabs">启动时恢复上次打开的仓库</sys:String>
|
||||
<sys:String x:Key="Text.Preference.General.UseFixedTabWidth">使用固定宽度的标题栏标签</sys:String>
|
||||
<sys:String x:Key="Text.Preference.General.UseMacOSStyle">使用macOS风格的标题栏</sys:String>
|
||||
<sys:String x:Key="Text.Preference.Git">GIT配置</sys:String>
|
||||
<sys:String x:Key="Text.Preference.Git.Path">安装路径</sys:String>
|
||||
<sys:String x:Key="Text.Preference.Git.Version">Git 版本</sys:String>
|
||||
|
|
|
@ -76,11 +76,6 @@ namespace SourceGit.ViewModels {
|
|||
set => SetProperty(ref _useFixedTabWidth, value);
|
||||
}
|
||||
|
||||
public bool UseMacOSStyle {
|
||||
get => _useMacOSStyle;
|
||||
set => SetProperty(ref _useMacOSStyle, value);
|
||||
}
|
||||
|
||||
public bool UseTwoColumnsLayoutInHistories {
|
||||
get => _useTwoColumnsLayoutInHistories;
|
||||
set => SetProperty(ref _useTwoColumnsLayoutInHistories, value);
|
||||
|
@ -285,7 +280,6 @@ namespace SourceGit.ViewModels {
|
|||
private int _maxHistoryCommits = 20000;
|
||||
private bool _restoreTabs = false;
|
||||
private bool _useFixedTabWidth = true;
|
||||
private bool _useMacOSStyle = OperatingSystem.IsMacOS();
|
||||
private bool _useTwoColumnsLayoutInHistories = false;
|
||||
private bool _useCombinedTextDiff = true;
|
||||
|
||||
|
|
|
@ -13,17 +13,22 @@
|
|||
SizeToContent="WidthAndHeight"
|
||||
CanResize="False"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
ExtendClientAreaToDecorationsHint="True"
|
||||
ExtendClientAreaChromeHints="NoChrome">
|
||||
<Grid RowDefinitions="30,*">
|
||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto">
|
||||
ExtendClientAreaToDecorationsHint="{OnPlatform True, Linux=False}"
|
||||
ExtendClientAreaChromeHints="{OnPlatform NoChrome, Linux=Default}">
|
||||
<Grid RowDefinitions="Auto,*">
|
||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto" Height="30" IsVisible="{OnPlatform True, Linux=False}">
|
||||
<Border Grid.Column="0" Grid.ColumnSpan="3"
|
||||
Background="{DynamicResource Brush.TitleBar}"
|
||||
BorderThickness="0,0,0,1" BorderBrush="{DynamicResource Brush.Border0}"
|
||||
IsHitTestVisible="False"/>
|
||||
|
||||
<Path Grid.Column="0"
|
||||
Width="14" Height="14"
|
||||
Margin="10,0,0,0"
|
||||
Data="{StaticResource Icons.Info}"
|
||||
IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=UseMacOSStyle, Converter={x:Static BoolConverters.Not}}"/>
|
||||
IsVisible="{OnPlatform False, Windows=True}"/>
|
||||
|
||||
<Grid Grid.Column="0" Classes="caption_button_box" Margin="2,4,0,0" IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=UseMacOSStyle}">
|
||||
<Grid Grid.Column="0" Classes="caption_button_box" Margin="2,4,0,0" IsVisible="{OnPlatform False, macOS=True}">
|
||||
<Button Classes="caption_button_macos" Click="CloseWindow">
|
||||
<Grid>
|
||||
<Ellipse Fill="{DynamicResource Brush.MacOS.Close}"/>
|
||||
|
@ -41,7 +46,7 @@
|
|||
<Button Grid.Column="2"
|
||||
Classes="caption_button"
|
||||
Click="CloseWindow"
|
||||
IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=UseMacOSStyle, Converter={x:Static BoolConverters.Not}}">
|
||||
IsVisible="{OnPlatform False, Windows=True}">
|
||||
<Path Data="{StaticResource Icons.Window.Close}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
|
|
@ -14,18 +14,23 @@
|
|||
Width="600" Height="400"
|
||||
CanResize="False"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
ExtendClientAreaToDecorationsHint="True"
|
||||
ExtendClientAreaChromeHints="NoChrome">
|
||||
<Grid RowDefinitions="30,1,*">
|
||||
ExtendClientAreaToDecorationsHint="{OnPlatform True, Linux=False}"
|
||||
ExtendClientAreaChromeHints="{OnPlatform NoChrome, Linux=Default}">
|
||||
<Grid RowDefinitions="Auto,*">
|
||||
<!-- TitleBar -->
|
||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto" Background="{DynamicResource Brush.TitleBar}">
|
||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto" Height="30" IsVisible="{OnPlatform True, Linux=False}">
|
||||
<Border Grid.Column="0" Grid.ColumnSpan="3"
|
||||
Background="{DynamicResource Brush.TitleBar}"
|
||||
BorderThickness="0,0,0,1" BorderBrush="{DynamicResource Brush.Border0}"
|
||||
IsHitTestVisible="False"/>
|
||||
|
||||
<Path Grid.Column="0"
|
||||
Width="14" Height="14"
|
||||
Margin="10,0,0,0"
|
||||
Data="{StaticResource Icons.File.Ignore}"
|
||||
IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=UseMacOSStyle, Converter={x:Static BoolConverters.Not}}"/>
|
||||
IsVisible="{OnPlatform False, Windows=True}"/>
|
||||
|
||||
<Grid Grid.Column="0" Classes="caption_button_box" Margin="2,4,0,0" IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=UseMacOSStyle}">
|
||||
<Grid Grid.Column="0" Classes="caption_button_box" Margin="2,4,0,0" IsVisible="{OnPlatform False, macOS=True}">
|
||||
<Button Classes="caption_button_macos" Click="CloseWindow">
|
||||
<Grid>
|
||||
<Ellipse Fill="{DynamicResource Brush.MacOS.Close}"/>
|
||||
|
@ -43,16 +48,13 @@
|
|||
<Button Grid.Column="2"
|
||||
Classes="caption_button"
|
||||
Click="CloseWindow"
|
||||
IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=UseMacOSStyle, Converter={x:Static BoolConverters.Not}}">
|
||||
IsVisible="{OnPlatform False, Windows=True}">
|
||||
<Path Data="{StaticResource Icons.Window.Close}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<!-- Line -->
|
||||
<Rectangle Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Top" Height="1" Fill="{DynamicResource Brush.Border0}"/>
|
||||
|
||||
|
||||
<!-- Unchanged Files -->
|
||||
<DataGrid Grid.Row="2"
|
||||
<DataGrid Grid.Row="1"
|
||||
Margin="8"
|
||||
Background="{DynamicResource Brush.Contents}"
|
||||
ItemsSource="{Binding Files}"
|
||||
|
|
|
@ -15,41 +15,44 @@
|
|||
WindowStartupLocation="CenterOwner"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{DynamicResource Brush.Border0}"
|
||||
Background="{DynamicResource Brush.TitleBar}"
|
||||
Background="{DynamicResource Brush.Window}"
|
||||
MinWidth="1280" MinHeight="720"
|
||||
ExtendClientAreaToDecorationsHint="True"
|
||||
ExtendClientAreaChromeHints="NoChrome">
|
||||
ExtendClientAreaToDecorationsHint="{OnPlatform True, Linux=False}"
|
||||
ExtendClientAreaChromeHints="{OnPlatform NoChrome, Linux=Default}">
|
||||
<Grid Margin="{Binding #me.WindowState, Converter={x:Static c:WindowStateConverters.ToContentMargin}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="{Binding #me.WindowState, Converter={x:Static c:WindowStateConverters.ToTitleBarHeight}}"/>
|
||||
<RowDefinition Height="30"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,Auto,Auto,*,Auto">
|
||||
<!-- Bottom border -->
|
||||
<Rectangle Grid.Column="0" Grid.ColumnSpan="5" Fill="{DynamicResource Brush.Border2}" Height="1" VerticalAlignment="Bottom"/>
|
||||
<Border Grid.Column="0" Grid.ColumnSpan="5"
|
||||
Background="{DynamicResource Brush.TitleBar}"
|
||||
BorderThickness="0,0,0,1" BorderBrush="{DynamicResource Brush.Border2}"
|
||||
IsHitTestVisible="False"/>
|
||||
|
||||
<!-- Caption Buttons (macOS) -->
|
||||
<Border Grid.Column="0" IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=UseMacOSStyle}">
|
||||
<Border Grid.Column="0" IsVisible="{OnPlatform False, macOS=True}">
|
||||
<v:CaptionButtonsMacOS/>
|
||||
</Border>
|
||||
|
||||
<!-- Icon -->
|
||||
<Path Grid.Column="1" Margin="8,0,0,0" Width="12" Height="12" Data="{StaticResource Icons.Blame}"/>
|
||||
|
||||
<!-- Title -->
|
||||
<TextBlock Grid.Column="2" Margin="8,0" Text="{DynamicResource Text.Blame}" FontWeight="Bold" IsHitTestVisible="False" VerticalAlignment="Center"/>
|
||||
<!-- Title (Hide on Linux) -->
|
||||
<TextBlock Grid.Column="2" Margin="8,0" Text="{DynamicResource Text.Blame}" FontWeight="Bold" IsHitTestVisible="False" VerticalAlignment="Center" IsVisible="{OnPlatform True, Linux=False}"/>
|
||||
|
||||
<!-- Blame information -->
|
||||
<TextBlock Grid.Column="3" Text="{Binding Title}" FontSize="11" FontStyle="Italic" IsHitTestVisible="False" VerticalAlignment="Center"/>
|
||||
|
||||
<!-- Caption Buttons (Windows) -->
|
||||
<Border Grid.Column="4" IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=UseMacOSStyle, Converter={x:Static BoolConverters.Not}}">
|
||||
<Border Grid.Column="4" IsVisible="{OnPlatform False, Windows=True}">
|
||||
<v:CaptionButtons/>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="1" Background="{DynamicResource Brush.Window}">
|
||||
<Grid Grid.Row="1">
|
||||
<!-- Blame View -->
|
||||
<v:BlameTextEditor HorizontalScrollBarVisibility="Auto"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
|
@ -68,11 +71,12 @@
|
|||
<Path Width="64" Height="64" Fill="{DynamicResource Brush.FG2}" Data="{StaticResource Icons.Error}"/>
|
||||
<TextBlock Margin="0,16,0,0" FontSize="18" FontWeight="Bold" HorizontalAlignment="Center" Foreground="{DynamicResource Brush.FG2}" Text="{DynamicResource Text.BlameTypeNotSupported}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<!-- Loading -->
|
||||
<Grid Grid.Row="1" Background="{DynamicResource Brush.Window}" IsVisible="{Binding Data, Converter={x:Static ObjectConverters.IsNull}}">
|
||||
<Path Width="48" Height="48" Classes="rotating" Data="{StaticResource Icons.Loading}" IsVisible="{Binding Data, Converter={x:Static ObjectConverters.IsNull}}"/>
|
||||
<!-- Loading -->
|
||||
<Path Width="48" Height="48"
|
||||
Classes="rotating"
|
||||
Data="{StaticResource Icons.Loading}"
|
||||
IsVisible="{Binding Data, Converter={x:Static ObjectConverters.IsNull}}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
|
|
@ -15,35 +15,38 @@
|
|||
MinWidth="1280" MinHeight="720"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{DynamicResource Brush.Border0}"
|
||||
Background="{DynamicResource Brush.TitleBar}"
|
||||
ExtendClientAreaToDecorationsHint="True"
|
||||
ExtendClientAreaChromeHints="NoChrome">
|
||||
Background="{DynamicResource Brush.Window}"
|
||||
ExtendClientAreaToDecorationsHint="{OnPlatform True, Linux=False}"
|
||||
ExtendClientAreaChromeHints="{OnPlatform NoChrome, Linux=Default}">
|
||||
<Grid Margin="{Binding #me.WindowState, Converter={x:Static c:WindowStateConverters.ToContentMargin}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="{Binding #me.WindowState, Converter={x:Static c:WindowStateConverters.ToTitleBarHeight}}"/>
|
||||
<RowDefinition Height="30"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,Auto,Auto,*,Auto">
|
||||
<!-- Bottom border -->
|
||||
<Rectangle Grid.Column="0" Grid.ColumnSpan="5" Fill="{DynamicResource Brush.Border0}" Height="1" VerticalAlignment="Bottom"/>
|
||||
<Border Grid.Column="0" Grid.ColumnSpan="5"
|
||||
Background="{DynamicResource Brush.TitleBar}"
|
||||
BorderThickness="0,0,0,1" BorderBrush="{DynamicResource Brush.Border0}"
|
||||
IsHitTestVisible="False"/>
|
||||
|
||||
<!-- Caption Buttons (macOS) -->
|
||||
<Border Grid.Column="0" IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=UseMacOSStyle}">
|
||||
<Border Grid.Column="0" IsVisible="{OnPlatform False, macOS=True}">
|
||||
<v:CaptionButtonsMacOS/>
|
||||
</Border>
|
||||
|
||||
<!-- Icon -->
|
||||
<Path Grid.Column="1" Margin="8,0,0,0" Width="12" Height="12" Stretch="Uniform" Data="{StaticResource Icons.Histories}"/>
|
||||
|
||||
<!-- Title -->
|
||||
<TextBlock Grid.Column="2" Margin="4,0,8,0" Text="{DynamicResource Text.FileHistory}" FontWeight="Bold" IsHitTestVisible="False" VerticalAlignment="Center"/>
|
||||
<!-- Title (Hide on Linux) -->
|
||||
<TextBlock Grid.Column="2" Margin="4,0,8,0" Text="{DynamicResource Text.FileHistory}" FontWeight="Bold" IsHitTestVisible="False" VerticalAlignment="Center" IsVisible="{OnPlatform True, Linux=False}"/>
|
||||
|
||||
<!-- Target File -->
|
||||
<TextBlock Grid.Column="3" Text="{Binding File}" FontSize="11" FontStyle="Italic" IsHitTestVisible="False" VerticalAlignment="Center"/>
|
||||
|
||||
<!-- Caption Buttons (Windows) -->
|
||||
<Border Grid.Column="4" IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=UseMacOSStyle, Converter={x:Static BoolConverters.Not}}">
|
||||
<Border Grid.Column="4" IsVisible="{OnPlatform False, Windows=true}">
|
||||
<v:CaptionButtons/>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
|
|
@ -11,17 +11,22 @@
|
|||
SizeToContent="WidthAndHeight"
|
||||
CanResize="False"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
ExtendClientAreaToDecorationsHint="True"
|
||||
ExtendClientAreaChromeHints="NoChrome">
|
||||
<Grid RowDefinitions="30,*">
|
||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto">
|
||||
ExtendClientAreaToDecorationsHint="{OnPlatform True, Linux=False}"
|
||||
ExtendClientAreaChromeHints="{OnPlatform NoChrome, Linux=Default}">
|
||||
<Grid RowDefinitions="Auto,*">
|
||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto" Height="30" IsVisible="{OnPlatform True, Linux=False}">
|
||||
<Border Grid.Column="0" Grid.ColumnSpan="3"
|
||||
Background="{DynamicResource Brush.TitleBar}"
|
||||
BorderThickness="0,0,0,1" BorderBrush="{DynamicResource Brush.Border0}"
|
||||
IsHitTestVisible="False"/>
|
||||
|
||||
<Path Grid.Column="0"
|
||||
Width="14" Height="14"
|
||||
Margin="10,0,0,0"
|
||||
Data="{StaticResource Icons.Hotkeys}"
|
||||
IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=UseMacOSStyle, Converter={x:Static BoolConverters.Not}}"/>
|
||||
IsVisible="{OnPlatform False, Windows=True}"/>
|
||||
|
||||
<Grid Grid.Column="0" Classes="caption_button_box" Margin="2,4,0,0" IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=UseMacOSStyle}">
|
||||
<Grid Grid.Column="0" Classes="caption_button_box" Margin="2,4,0,0" IsVisible="{OnPlatform False, macOS=True}">
|
||||
<Button Classes="caption_button_macos" Click="CloseWindow">
|
||||
<Grid>
|
||||
<Ellipse Fill="{DynamicResource Brush.MacOS.Close}"/>
|
||||
|
@ -39,7 +44,7 @@
|
|||
<Button Grid.Column="2"
|
||||
Classes="caption_button"
|
||||
Click="CloseWindow"
|
||||
IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=UseMacOSStyle, Converter={x:Static BoolConverters.Not}}">
|
||||
IsVisible="{OnPlatform False, Windows=True}">
|
||||
<Path Data="{StaticResource Icons.Window.Close}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
Title="SourceGit"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{DynamicResource Brush.Border0}"
|
||||
Background="{DynamicResource Brush.TitleBar}"
|
||||
Background="{DynamicResource Brush.Window}"
|
||||
MinWidth="1280" MinHeight="720"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
ExtendClientAreaToDecorationsHint="True"
|
||||
ExtendClientAreaChromeHints="NoChrome">
|
||||
ExtendClientAreaToDecorationsHint="{OnPlatform True, Linux=False}"
|
||||
ExtendClientAreaChromeHints="{OnPlatform NoChrome, Linux=Default}">
|
||||
<Grid Margin="{Binding #me.WindowState, Converter={x:Static c:WindowStateConverters.ToContentMargin}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="{Binding #me.WindowState, Converter={x:Static c:WindowStateConverters.ToTitleBarHeight}}"/>
|
||||
|
@ -27,10 +27,13 @@
|
|||
|
||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto">
|
||||
<!-- Bottom border -->
|
||||
<Rectangle Grid.Column="0" Grid.ColumnSpan="3" Fill="{DynamicResource Brush.Border0}" Height="1" VerticalAlignment="Bottom"/>
|
||||
<Border Grid.Column="0" Grid.ColumnSpan="3"
|
||||
Background="{DynamicResource Brush.TitleBar}"
|
||||
BorderThickness="0,0,0,1" BorderBrush="{DynamicResource Brush.Border0}"
|
||||
IsHitTestVisible="False"/>
|
||||
|
||||
<!-- Caption Buttons (macOS) -->
|
||||
<Border Grid.Column="0" VerticalAlignment="Stretch" Margin="2,0,8,3" IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=UseMacOSStyle}">
|
||||
<Border Grid.Column="0" VerticalAlignment="Stretch" Margin="2,0,8,3" IsVisible="{OnPlatform False, macOS=True}">
|
||||
<v:CaptionButtonsMacOS VerticalAlignment="Bottom"/>
|
||||
</Border>
|
||||
|
||||
|
@ -39,7 +42,7 @@
|
|||
Classes="icon_button"
|
||||
Margin="4,0,2,3"
|
||||
VerticalAlignment="Bottom"
|
||||
IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=UseMacOSStyle, Converter={x:Static BoolConverters.Not}}">
|
||||
IsVisible="{OnPlatform True, macOS=False}">
|
||||
<Button.Flyout>
|
||||
<MenuFlyout Placement="BottomEdgeAlignedLeft" VerticalOffset="-8">
|
||||
<MenuItem Header="{DynamicResource Text.Preference}" Click="OpenPreference">
|
||||
|
@ -212,7 +215,7 @@
|
|||
</Grid>
|
||||
|
||||
<!-- Extra Buttons (macOS) -->
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal" Margin="32,0,8,0" Height="30" VerticalAlignment="Bottom" IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=UseMacOSStyle}">
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal" Margin="32,0,8,0" Height="30" VerticalAlignment="Bottom" IsVisible="{OnPlatform False, macOS=True}">
|
||||
<Button Classes="icon_button" Width="32" Height="28" Click="OpenPreference" ToolTip.Tip="{DynamicResource Text.Preference}">
|
||||
<Path Width="16" Height="16" Data="{StaticResource Icons.Settings2}"/>
|
||||
</Button>
|
||||
|
@ -227,7 +230,7 @@
|
|||
</StackPanel>
|
||||
|
||||
<!-- Caption Buttons (Windows)-->
|
||||
<Border Grid.Column="2" Margin="32,0,0,0" IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=UseMacOSStyle, Converter={x:Static BoolConverters.Not}}">
|
||||
<Border Grid.Column="2" Margin="32,0,0,0" IsVisible="{OnPlatform False, Windows=True}">
|
||||
<v:CaptionButtons Height="30" VerticalAlignment="Top"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
Width="600" SizeToContent="Height"
|
||||
CanResize="False"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
ExtendClientAreaToDecorationsHint="True"
|
||||
ExtendClientAreaChromeHints="NoChrome">
|
||||
<Grid RowDefinitions="30,Auto">
|
||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto">
|
||||
ExtendClientAreaToDecorationsHint="{OnPlatform True, Linux=False}"
|
||||
ExtendClientAreaChromeHints="{OnPlatform NoChrome, Linux=Default}">
|
||||
<Grid RowDefinitions="Auto,Auto">
|
||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto" Height="30" IsVisible="{OnPlatform True, Linux=False}">
|
||||
<Border Grid.Column="0" Grid.ColumnSpan="3"
|
||||
Background="{DynamicResource Brush.TitleBar}"
|
||||
BorderThickness="0,0,0,1" BorderBrush="{DynamicResource Brush.Border0}"
|
||||
|
@ -30,9 +30,9 @@
|
|||
Width="14" Height="14"
|
||||
Data="{StaticResource Icons.Settings2}"
|
||||
Margin="10,0,0,0"
|
||||
IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=UseMacOSStyle, Converter={x:Static BoolConverters.Not}}"/>
|
||||
IsVisible="{OnPlatform False, Windows=True}"/>
|
||||
|
||||
<Grid Grid.Column="0" Classes="caption_button_box" Margin="2,4,0,0" IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=UseMacOSStyle}">
|
||||
<Grid Grid.Column="0" Classes="caption_button_box" Margin="2,4,0,0" IsVisible="{OnPlatform False, macOS=True}">
|
||||
<Button Classes="caption_button_macos" Click="CloseWindow">
|
||||
<Grid>
|
||||
<Ellipse Fill="{DynamicResource Brush.MacOS.Close}"/>
|
||||
|
@ -47,7 +47,7 @@
|
|||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
IsHitTestVisible="False"/>
|
||||
|
||||
<Button Grid.Column="2" Classes="caption_button" Click="CloseWindow" IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=UseMacOSStyle, Converter={x:Static BoolConverters.Not}}">
|
||||
<Button Grid.Column="2" Classes="caption_button" Click="CloseWindow" IsVisible="{OnPlatform False, Windows=True}">
|
||||
<Path Data="{StaticResource Icons.Window.Close}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
@ -57,7 +57,7 @@
|
|||
<TabItem.Header>
|
||||
<TextBlock Classes="tab_header" Text="{DynamicResource Text.Preference.General}"/>
|
||||
</TabItem.Header>
|
||||
<Grid Margin="8" RowDefinitions="32,32,32,32,32,32,Auto" ColumnDefinitions="Auto,*">
|
||||
<Grid Margin="8" RowDefinitions="32,32,32,32,32,32" ColumnDefinitions="Auto,*">
|
||||
<TextBlock Grid.Row="0" Grid.Column="0"
|
||||
Text="{DynamicResource Text.Preference.General.Locale}"
|
||||
HorizontalAlignment="Right"
|
||||
|
@ -138,12 +138,6 @@
|
|||
Height="32"
|
||||
Content="{DynamicResource Text.Preference.General.UseFixedTabWidth}"
|
||||
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=UseFixedTabWidth, Mode=TwoWay}"/>
|
||||
|
||||
<CheckBox Grid.Row="6" Grid.Column="1"
|
||||
Height="32"
|
||||
Content="{DynamicResource Text.Preference.General.UseMacOSStyle}"
|
||||
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=UseMacOSStyle, Mode=TwoWay}"
|
||||
IsVisible="{Binding #me.CanChangeTitleBarStyle}"/>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
|
||||
|
|
|
@ -6,8 +6,6 @@ using System.IO;
|
|||
|
||||
namespace SourceGit.Views {
|
||||
public partial class Preference : Window {
|
||||
public bool CanChangeTitleBarStyle => !OperatingSystem.IsMacOS();
|
||||
|
||||
public string DefaultUser {
|
||||
get;
|
||||
set;
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
Width="800" Height="450"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
CanResize="False"
|
||||
ExtendClientAreaToDecorationsHint="True"
|
||||
ExtendClientAreaChromeHints="NoChrome">
|
||||
<Grid RowDefinitions="30,Auto,*">
|
||||
ExtendClientAreaToDecorationsHint="{OnPlatform True, Linux=False}"
|
||||
ExtendClientAreaChromeHints="{OnPlatform NoChrome, Linux=Default}">
|
||||
<Grid RowDefinitions="Auto,Auto,*">
|
||||
<!-- Title bar -->
|
||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto">
|
||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto" Height="30" IsVisible="{OnPlatform True, Linux=False}">
|
||||
<Border Grid.Column="0" Grid.ColumnSpan="3"
|
||||
Background="{DynamicResource Brush.TitleBar}"
|
||||
BorderThickness="0,0,0,1" BorderBrush="{DynamicResource Brush.Border0}"
|
||||
|
@ -27,9 +27,9 @@
|
|||
Width="14" Height="14"
|
||||
Margin="10,0,0,0"
|
||||
Data="{StaticResource Icons.Statistics}"
|
||||
IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=UseMacOSStyle, Converter={x:Static BoolConverters.Not}}"/>
|
||||
IsVisible="{OnPlatform False, Windows=True}"/>
|
||||
|
||||
<Grid Grid.Column="0" Classes="caption_button_box" Margin="2,4,0,0" IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=UseMacOSStyle}">
|
||||
<Grid Grid.Column="0" Classes="caption_button_box" Margin="2,4,0,0" IsVisible="{OnPlatform False, macOS=True}">
|
||||
<Button Classes="caption_button_macos" Click="CloseWindow">
|
||||
<Grid>
|
||||
<Ellipse Fill="{DynamicResource Brush.MacOS.Close}"/>
|
||||
|
@ -47,7 +47,7 @@
|
|||
<Button Grid.Column="2"
|
||||
Classes="caption_button"
|
||||
Click="CloseWindow"
|
||||
IsVisible="{Binding Source={x:Static vm:Preference.Instance}, Path=UseMacOSStyle, Converter={x:Static BoolConverters.Not}}">
|
||||
IsVisible="{OnPlatform False, Windows=True}">
|
||||
<Path Data="{StaticResource Icons.Window.Close}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
|
Loading…
Reference in a new issue