style<*>: add borders for all windows

This commit is contained in:
leo 2021-03-30 10:11:09 +08:00
parent e677a6a6a4
commit 50f51e4210
6 changed files with 316 additions and 306 deletions

View file

@ -14,6 +14,7 @@
</WindowChrome.WindowChrome> </WindowChrome.WindowChrome>
<!-- Window Layout --> <!-- Window Layout -->
<Border BorderBrush="{StaticResource Brush.Border3}" BorderThickness="1">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="32"/> <RowDefinition Height="32"/>
@ -76,4 +77,5 @@
<Label Grid.Row="4" Content="Copyright © sourcegit 2021. All rights reserved." HorizontalContentAlignment="Center" FontSize="11"/> <Label Grid.Row="4" Content="Copyright © sourcegit 2021. All rights reserved." HorizontalContentAlignment="Center" FontSize="11"/>
</Grid> </Grid>
</Grid> </Grid>
</Border>
</Window> </Window>

View file

@ -14,16 +14,18 @@
</WindowChrome.WindowChrome> </WindowChrome.WindowChrome>
<!-- Window Content --> <!-- Window Content -->
<Border> <Border BorderBrush="{StaticResource Brush.Border3}">
<!-- Fix Maximize BUG --> <!-- Fix Maximize BUG -->
<Border.Style> <Border.Style>
<Style TargetType="{x:Type Border}"> <Style TargetType="{x:Type Border}">
<Style.Triggers> <Style.Triggers>
<DataTrigger Binding="{Binding WindowState, ElementName=me}" Value="Maximized"> <DataTrigger Binding="{Binding WindowState, ElementName=me}" Value="Maximized">
<Setter Property="Margin" Value="6"/> <Setter Property="Margin" Value="6"/>
<Setter Property="BorderThickness" Value="0"/>
</DataTrigger> </DataTrigger>
<DataTrigger Binding="{Binding WindowState, ElementName=me}" Value="Normal"> <DataTrigger Binding="{Binding WindowState, ElementName=me}" Value="Normal">
<Setter Property="Margin" Value="0"/> <Setter Property="Margin" Value="0"/>
<Setter Property="BorderThickness" Value="1"/>
</DataTrigger> </DataTrigger>
</Style.Triggers> </Style.Triggers>
</Style> </Style>

View file

@ -15,16 +15,18 @@
</WindowChrome.WindowChrome> </WindowChrome.WindowChrome>
<!-- Layout Window --> <!-- Layout Window -->
<Border Background="{StaticResource Brush.Window}"> <Border Background="{StaticResource Brush.Window}" BorderBrush="{StaticResource Brush.Border3}">
<!-- Fix Maximize BUG --> <!-- Fix Maximize BUG -->
<Border.Style> <Border.Style>
<Style TargetType="{x:Type Border}"> <Style TargetType="{x:Type Border}">
<Style.Triggers> <Style.Triggers>
<DataTrigger Binding="{Binding WindowState, ElementName=me}" Value="Maximized"> <DataTrigger Binding="{Binding WindowState, ElementName=me}" Value="Maximized">
<Setter Property="Margin" Value="6"/> <Setter Property="Margin" Value="6"/>
<Setter Property="BorderThickness" Value="0"/>
</DataTrigger> </DataTrigger>
<DataTrigger Binding="{Binding WindowState, ElementName=me}" Value="Normal"> <DataTrigger Binding="{Binding WindowState, ElementName=me}" Value="Normal">
<Setter Property="Margin" Value="0"/> <Setter Property="Margin" Value="0"/>
<Setter Property="BorderThickness" Value="1"/>
</DataTrigger> </DataTrigger>
</Style.Triggers> </Style.Triggers>
</Style> </Style>
@ -103,9 +105,9 @@
<DataGrid <DataGrid
x:Name="commitList" x:Name="commitList"
Margin="2,0,0,0" Margin="0,0,0,0"
Grid.Column="0" Grid.Column="0"
Background="{StaticResource Brush.Contents}" Background="{StaticResource Brush.Window}"
BorderThickness="0" BorderThickness="0"
SelectionMode="Single" SelectionMode="Single"
SelectionChanged="CommitSelectionChanged"> SelectionChanged="CommitSelectionChanged">
@ -114,7 +116,7 @@
<DataGridTemplateColumn Width="*"> <DataGridTemplateColumn Width="*">
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate>
<Border BorderBrush="{StaticResource Brush.Border3}" BorderThickness="0,0,0,1" Padding="4"> <Border BorderBrush="{StaticResource Brush.Border2}" BorderThickness="0,0,0,1" Padding="4">
<StackPanel Orientation="Vertical" Margin="2" MaxWidth="290"> <StackPanel Orientation="Vertical" Margin="2" MaxWidth="290">
<Grid TextBlock.FontSize="11" TextBlock.Foreground="{StaticResource Brush.FG2}"> <Grid TextBlock.FontSize="11" TextBlock.Foreground="{StaticResource Brush.FG2}">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>

View file

@ -14,7 +14,7 @@
</WindowChrome.WindowChrome> </WindowChrome.WindowChrome>
<!-- Window Layout --> <!-- Window Layout -->
<Border Background="{StaticResource Brush.Window}"> <Border Background="{StaticResource Brush.Window}" BorderThickness="1" BorderBrush="{StaticResource Brush.Border3}">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="32"/> <RowDefinition Height="32"/>

View file

@ -18,6 +18,7 @@
</WindowChrome.WindowChrome> </WindowChrome.WindowChrome>
<!-- Window Layout --> <!-- Window Layout -->
<Border BorderBrush="{StaticResource Brush.Border3}" BorderThickness="1">
<Grid Background="{StaticResource Brush.Window}"> <Grid Background="{StaticResource Brush.Window}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="32"/> <RowDefinition Height="32"/>
@ -204,4 +205,5 @@
Foreground="{StaticResource Brush.FG2}"/> Foreground="{StaticResource Brush.FG2}"/>
</Grid> </Grid>
</Grid> </Grid>
</Border>
</Window> </Window>

View file

@ -14,6 +14,7 @@
</WindowChrome.WindowChrome> </WindowChrome.WindowChrome>
<!-- Window Layout --> <!-- Window Layout -->
<Border BorderBrush="{StaticResource}" BorderThickness="1">
<Grid Background="{StaticResource Brush.Window}"> <Grid Background="{StaticResource Brush.Window}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="32"/> <RowDefinition Height="32"/>
@ -103,4 +104,5 @@
</StackPanel> </StackPanel>
</Grid> </Grid>
</Grid> </Grid>
</Border>
</Window> </Window>