Skip to content

Commit 3539612

Browse files
authored
Merge pull request #20 from qian-o/feature/dock-brush-colors
Dock brush colors
2 parents 592617d + e66239e commit 3539612

File tree

9 files changed

+86
-72
lines changed

9 files changed

+86
-72
lines changed

src/Examples/UnoApp/App.xaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@
88
<dock:WinUIDockResources xmlns:dock="using:WinUI.Dock" />
99
</ResourceDictionary.MergedDictionaries>
1010

11-
<!--<SolidColorBrush x:Key="DefaultDockBrush"
12-
Color="Blue" />
11+
<!--<SolidColorBrush x:Key="DockStrokeDefaultBrush"
12+
Color="Red" />
1313
14-
<SolidColorBrush x:Key="ActiveDockBrush"
15-
Color="Red" />-->
14+
<SolidColorBrush x:Key="ControlFillColorDefaultBrush"
15+
Color="Green" />
16+
17+
<SolidColorBrush x:Key="DockStrokeActiveBrush"
18+
Color="Blue" />-->
1619
</ResourceDictionary>
1720
</Application.Resources>
1821
</Application>

src/Examples/WinUIApp/App.xaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@
88
<dock:WinUIDockResources xmlns:dock="using:WinUI.Dock" />
99
</ResourceDictionary.MergedDictionaries>
1010

11-
<!--<SolidColorBrush x:Key="DefaultDockBrush"
12-
Color="Blue" />
11+
<!--<SolidColorBrush x:Key="DockStrokeDefaultBrush"
12+
Color="Red" />
1313
14-
<SolidColorBrush x:Key="ActiveDockBrush"
15-
Color="Red" />-->
14+
<SolidColorBrush x:Key="ControlFillColorDefaultBrush"
15+
Color="Green" />
16+
17+
<SolidColorBrush x:Key="DockStrokeActiveBrush"
18+
Color="Blue" />-->
1619
</ResourceDictionary>
1720
</Application.Resources>
1821
</Application>

src/WinUI.Dock/Controls/DockTargetButton.xaml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
<Border x:Name="Root"
1010
Padding="4"
11-
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
12-
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
11+
Background="{ThemeResource DockFillDefaultBrush}"
12+
BorderBrush="{ThemeResource DockStrokeDefaultBrush}"
1313
BorderThickness="1"
1414
CornerRadius="{StaticResource ControlCornerRadius}">
1515
<VisualStateManager.VisualStateGroups>
@@ -18,8 +18,8 @@
1818
<VisualState.Setters>
1919
<Setter Target="Root.Child">
2020
<Setter.Value>
21-
<Border Background="{ThemeResource ControlFillColorDefaultBrush}"
22-
BorderBrush="{ThemeResource ActiveDockBrush}"
21+
<Border Background="{ThemeResource DockFillDefaultBrush}"
22+
BorderBrush="{ThemeResource DockStrokeActiveBrush}"
2323
BorderThickness="1,3,1,1"
2424
CornerRadius="2" />
2525
</Setter.Value>
@@ -32,13 +32,13 @@
3232
<Setter Target="Root.Child">
3333
<Setter.Value>
3434
<Grid>
35-
<Border Background="{ThemeResource ControlFillColorDefaultBrush}"
36-
BorderBrush="{ThemeResource ActiveDockBrush}"
35+
<Border Background="{ThemeResource DockFillDefaultBrush}"
36+
BorderBrush="{ThemeResource DockStrokeActiveBrush}"
3737
BorderThickness="1,3,1,1"
3838
CornerRadius="2" />
3939
<Line HorizontalAlignment="Center"
4040
Stretch="Fill"
41-
Stroke="{ThemeResource ActiveDockBrush}"
41+
Stroke="{ThemeResource DockStrokeActiveBrush}"
4242
StrokeDashArray="3,1"
4343
StrokeThickness="1"
4444
Y2="1" />
@@ -53,13 +53,13 @@
5353
<Setter Target="Root.Child">
5454
<Setter.Value>
5555
<Grid>
56-
<Border Background="{ThemeResource ControlFillColorDefaultBrush}"
57-
BorderBrush="{ThemeResource ActiveDockBrush}"
56+
<Border Background="{ThemeResource DockFillDefaultBrush}"
57+
BorderBrush="{ThemeResource DockStrokeActiveBrush}"
5858
BorderThickness="1,3,1,1"
5959
CornerRadius="2" />
6060
<Line VerticalAlignment="Center"
6161
Stretch="Fill"
62-
Stroke="{ThemeResource ActiveDockBrush}"
62+
Stroke="{ThemeResource DockStrokeActiveBrush}"
6363
StrokeDashArray="3,1"
6464
StrokeThickness="1"
6565
X2="1" />
@@ -74,13 +74,13 @@
7474
<Setter Target="Root.Child">
7575
<Setter.Value>
7676
<Grid>
77-
<Border Background="{ThemeResource ControlFillColorDefaultBrush}"
78-
BorderBrush="{ThemeResource ActiveDockBrush}"
77+
<Border Background="{ThemeResource DockFillDefaultBrush}"
78+
BorderBrush="{ThemeResource DockStrokeActiveBrush}"
7979
BorderThickness="1,3,1,1"
8080
CornerRadius="2" />
8181
<Line HorizontalAlignment="Center"
8282
Stretch="Fill"
83-
Stroke="{ThemeResource ActiveDockBrush}"
83+
Stroke="{ThemeResource DockStrokeActiveBrush}"
8484
StrokeDashArray="3,1"
8585
StrokeThickness="1"
8686
Y2="1" />
@@ -95,13 +95,13 @@
9595
<Setter Target="Root.Child">
9696
<Setter.Value>
9797
<Grid>
98-
<Border Background="{ThemeResource ControlFillColorDefaultBrush}"
99-
BorderBrush="{ThemeResource ActiveDockBrush}"
98+
<Border Background="{ThemeResource DockFillDefaultBrush}"
99+
BorderBrush="{ThemeResource DockStrokeActiveBrush}"
100100
BorderThickness="1,3,1,1"
101101
CornerRadius="2" />
102102
<Line VerticalAlignment="Center"
103103
Stretch="Fill"
104-
Stroke="{ThemeResource ActiveDockBrush}"
104+
Stroke="{ThemeResource DockStrokeActiveBrush}"
105105
StrokeDashArray="3,1"
106106
StrokeThickness="1"
107107
X2="1" />
@@ -122,8 +122,8 @@
122122
</Grid.ColumnDefinitions>
123123

124124
<Border Grid.Column="0"
125-
Background="{ThemeResource ControlFillColorDefaultBrush}"
126-
BorderBrush="{ThemeResource ActiveDockBrush}"
125+
Background="{ThemeResource DockFillDefaultBrush}"
126+
BorderBrush="{ThemeResource DockStrokeActiveBrush}"
127127
BorderThickness="1,3,1,1"
128128
CornerRadius="2" />
129129

@@ -149,8 +149,8 @@
149149
</Grid.RowDefinitions>
150150

151151
<Border Grid.Row="0"
152-
Background="{ThemeResource ControlFillColorDefaultBrush}"
153-
BorderBrush="{ThemeResource ActiveDockBrush}"
152+
Background="{ThemeResource DockFillDefaultBrush}"
153+
BorderBrush="{ThemeResource DockStrokeActiveBrush}"
154154
BorderThickness="1,3,1,1"
155155
CornerRadius="2" />
156156

@@ -182,8 +182,8 @@
182182
Glyph="&#xF08F;" />
183183

184184
<Border Grid.Column="1"
185-
Background="{ThemeResource ControlFillColorDefaultBrush}"
186-
BorderBrush="{ThemeResource ActiveDockBrush}"
185+
Background="{ThemeResource DockFillDefaultBrush}"
186+
BorderBrush="{ThemeResource DockStrokeActiveBrush}"
187187
BorderThickness="1,3,1,1"
188188
CornerRadius="2" />
189189
</Grid>
@@ -209,8 +209,8 @@
209209
Glyph="&#xF08E;" />
210210

211211
<Border Grid.Row="1"
212-
Background="{ThemeResource ControlFillColorDefaultBrush}"
213-
BorderBrush="{ThemeResource ActiveDockBrush}"
212+
Background="{ThemeResource DockFillDefaultBrush}"
213+
BorderBrush="{ThemeResource DockStrokeActiveBrush}"
214214
BorderThickness="1,3,1,1"
215215
CornerRadius="2" />
216216
</Grid>

src/WinUI.Dock/Controls/DocumentTabItem.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
Width="4"
2727
Height="16"
2828
Margin="0,0,6,0"
29-
Background="{ThemeResource ActiveDockBrush}"
29+
Background="{ThemeResource DockStrokeActiveBrush}"
3030
CornerRadius="2" />
3131

3232
<TextBlock VerticalAlignment="Center"
@@ -70,8 +70,8 @@
7070

7171
<Border x:Name="ContentOptions"
7272
Grid.Row="0"
73-
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
74-
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
73+
Background="{ThemeResource DockFillDefaultBrush}"
74+
BorderBrush="{ThemeResource DockStrokeDefaultBrush}"
7575
BorderThickness="0,0,0,1"
7676
CanDrag="True"
7777
DragStarting="OnDragStarting"

src/WinUI.Dock/Controls/PopupDocument.xaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77

88
<Grid x:Name="Layout">
99
<Border x:Name="Root"
10-
Background="{ThemeResource SolidBackgroundFillColorQuarternaryBrush}"
11-
BorderBrush="{ThemeResource ActiveDockBrush}"
10+
Background="{ThemeResource SolidBackgroundFillColorBaseBrush}"
11+
BorderBrush="{ThemeResource DockStrokeActiveBrush}"
1212
BorderThickness="1"
1313
CornerRadius="{StaticResource ControlCornerRadius}">
14-
<Grid>
14+
15+
<Grid Background="{ThemeResource DockFillDefaultBrush}">
1516
<Grid.RowDefinitions>
1617
<RowDefinition Height="Auto" />
1718
<RowDefinition Height="*" />
@@ -20,8 +21,8 @@
2021
<Border Grid.Row="0"
2122
Height="40"
2223
Padding="4"
23-
Background="Transparent"
24-
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
24+
Background="{ThemeResource DockFillDefaultBrush}"
25+
BorderBrush="{ThemeResource DockStrokeDefaultBrush}"
2526
BorderThickness="0,0,0,1"
2627
CanDrag="True"
2728
DragStarting="Header_DragStarting"
@@ -61,6 +62,7 @@
6162
VerticalContentAlignment="Stretch"
6263
Content="{x:Bind Document}" />
6364
</Grid>
65+
6466
</Border>
6567

6668
<controls:ContentSizer x:Name="Sizer"

src/WinUI.Dock/DocumentGroup.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<VisualStateGroup x:Name="IsActive">
1414
<VisualState x:Name="Active">
1515
<VisualState.Setters>
16-
<Setter Target="PART_Root.BorderBrush" Value="{ThemeResource ActiveDockBrush}" />
16+
<Setter Target="PART_Root.BorderBrush" Value="{ThemeResource DockStrokeActiveBrush}" />
1717
</VisualState.Setters>
1818
</VisualState>
1919

src/WinUI.Dock/Themes/Generic.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ LayoutPanel.xaml
104104
<VisualStateGroup x:Name="IsActive">
105105
<VisualState x:Name="Active">
106106
<VisualState.Setters>
107-
<Setter Target="PART_Root.BorderBrush" Value="{ThemeResource ActiveDockBrush}" />
107+
<Setter Target="PART_Root.BorderBrush" Value="{ThemeResource DockStrokeActiveBrush}" />
108108
</VisualState.Setters>
109109
</VisualState>
110110
<VisualState x:Name="Inactive" />

0 commit comments

Comments
 (0)