Skip to content

Commit a1154b4

Browse files
authored
Removed extra resources to improve performance (#7969)
1 parent 8d2a097 commit a1154b4

File tree

11 files changed

+2
-157
lines changed

11 files changed

+2
-157
lines changed

src/Files/App.xaml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
<ResourceDictionary x:Key="Light">
3333
<Color x:Key="SolidBackgroundAcrylic">#FFFFFF</Color>
3434
<!-- Corner Radius -->
35-
<CornerRadius x:Key="ControlCornerRadius">4</CornerRadius>
36-
<CornerRadius x:Key="OverlayCornerRadius">8</CornerRadius>
3735
<CornerRadius x:Key="NavToolbarCornerRadius">0,0,0,8</CornerRadius>
3836
<!-- Tabs -->
3937
<SolidColorBrush x:Key="TabViewItemHeaderBackground" Color="{StaticResource SubtleFillColorTransparent}" />
@@ -48,15 +46,8 @@
4846
<SolidColorBrush x:Key="NavigationToolbarBreadcrumbBackgroundBrush" Color="Transparent" />
4947
<!-- Horizontal Tab Control -->
5048
<SolidColorBrush x:Key="HorizontalTabControlBackgroundBrush" Color="Transparent" />
51-
<!-- PaneHolderPage -->
52-
<SolidColorBrush x:Key="PaneHolderPageBackgroundBrush" Color="Transparent" />
53-
<!-- Status Bar Control -->
54-
<SolidColorBrush x:Key="StatusBarBackgroundBrush" Color="Transparent" />
5549
<!-- File Browser Control -->
56-
<SolidColorBrush x:Key="FileBrowserBackgroundBrush" Color="Transparent" />
5750
<SolidColorBrush x:Key="FileBrowserHeaderBackgroundBrush" Color="Transparent" />
58-
<!-- Preview pane -->
59-
<SolidColorBrush x:Key="PreviewPaneBackgroundBrush" Color="Transparent" />
6051

6152
<SolidColorBrush x:Key="RootBackgroundBrush" Color="Transparent" />
6253

@@ -69,8 +60,6 @@
6960
<ResourceDictionary x:Key="Dark">
7061
<Color x:Key="SolidBackgroundAcrylic">#2C2C2C</Color>
7162
<!-- Corner Radius -->
72-
<CornerRadius x:Key="ControlCornerRadius">4</CornerRadius>
73-
<CornerRadius x:Key="OverlayCornerRadius">8</CornerRadius>
7463
<CornerRadius x:Key="NavToolbarCornerRadius">0,0,0,8</CornerRadius>
7564

7665
<!-- Tabs -->
@@ -86,17 +75,9 @@
8675
<SolidColorBrush x:Key="NavigationToolbarBreadcrumbBackgroundBrush" Color="Transparent" />
8776
<!-- Horizontal Tab Control -->
8877
<SolidColorBrush x:Key="HorizontalTabControlBackgroundBrush" Color="Transparent" />
89-
<!-- PaneHolderPage -->
90-
<SolidColorBrush x:Key="PaneHolderPageBackgroundBrush" Color="Transparent" />
91-
<!-- Status Bar Control -->
92-
<SolidColorBrush x:Key="StatusBarBackgroundBrush" Color="Transparent" />
9378
<!-- File Browser Control -->
94-
<SolidColorBrush x:Key="FileBrowserBackgroundBrush" Color="Transparent" />
9579
<SolidColorBrush x:Key="FileBrowserHeaderBackgroundBrush" Color="Transparent" />
9680

97-
<!-- Preview pane -->
98-
<SolidColorBrush x:Key="PreviewPaneBackgroundBrush" Color="Transparent" />
99-
10081
<SolidColorBrush x:Key="RootBackgroundBrush" Color="Transparent" />
10182

10283
<StaticResource x:Key="PropertiesDialogRootBackgroundBrush" ResourceKey="RootBackgroundBrush" />
@@ -119,8 +100,6 @@
119100
<SolidColorBrush x:Key="SolidBackgroundFillColorQuarternaryBrush" Color="{StaticResource SystemColorWindowColor}" />
120101
<Color x:Key="SolidBackgroundAcrylic">#2C2C2C</Color>
121102
<!-- Corner Radius -->
122-
<CornerRadius x:Key="ControlCornerRadius">4</CornerRadius>
123-
<CornerRadius x:Key="OverlayCornerRadius">8</CornerRadius>
124103
<CornerRadius x:Key="NavToolbarCornerRadius">0,0,0,8</CornerRadius>
125104
<!-- Tabs -->
126105
<SolidColorBrush x:Key="TabViewItemHeaderBackground" Color="{StaticResource SystemColorWindowColor}" />
@@ -135,15 +114,8 @@
135114
<SolidColorBrush x:Key="NavigationToolbarBreadcrumbBackgroundBrush" Color="Transparent" />
136115
<!-- Horizontal Tab Control -->
137116
<SolidColorBrush x:Key="HorizontalTabControlBackgroundBrush" Color="Transparent" />
138-
<!-- PaneHolderPage -->
139-
<SolidColorBrush x:Key="PaneHolderPageBackgroundBrush" Color="Transparent" />
140-
<!-- Status Bar Control -->
141-
<SolidColorBrush x:Key="StatusBarBackgroundBrush" Color="Transparent" />
142117
<!-- File Browser Control -->
143-
<SolidColorBrush x:Key="FileBrowserBackgroundBrush" Color="Transparent" />
144118
<StaticResource x:Key="FileBrowserHeaderBackgroundBrush" ResourceKey="SolidBackgroundFillColorBaseBrush" />
145-
<!-- Preview pane -->
146-
<SolidColorBrush x:Key="PreviewPaneBackgroundBrush" Color="Transparent" />
147119

148120
<SolidColorBrush x:Key="RootBackgroundBrush" Color="Transparent" />
149121

src/Files/Themes/Acrylic.xaml

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@
1313
<Color x:Key="SolidBackgroundFillColorTertiary">#2D2D2D</Color>
1414

1515
<!-- Acrylic Resources -->
16-
<AcrylicBrush
17-
x:Key="PaneHolderPageBackgroundBrush"
18-
BackgroundSource="HostBackdrop"
19-
FallbackColor="{ThemeResource SolidBackgroundFillColorSecondary}"
20-
TintColor="{ThemeResource SolidBackgroundFillColorSecondary}"
21-
TintOpacity="0.65" />
2216
<AcrylicBrush
2317
x:Key="HorizontalTabControlBackgroundBrush"
2418
BackgroundSource="HostBackdrop"
@@ -61,18 +55,6 @@
6155
FallbackColor="{ThemeResource SolidBackgroundFillColorSecondary}"
6256
TintColor="{ThemeResource SolidBackgroundFillColorSecondary}"
6357
TintOpacity="0.65" />
64-
<AcrylicBrush
65-
x:Key="StatusBarBackgroundBrush"
66-
BackgroundSource="HostBackdrop"
67-
FallbackColor="{ThemeResource SolidBackgroundFillColorSecondary}"
68-
TintColor="{ThemeResource SolidBackgroundFillColorSecondary}"
69-
TintOpacity="0.65" />
70-
<AcrylicBrush
71-
x:Key="FileBrowserBackgroundBrush"
72-
BackgroundSource="HostBackdrop"
73-
FallbackColor="{ThemeResource SolidBackgroundFillColorBase}"
74-
TintColor="{ThemeResource SolidBackgroundFillColorBase}"
75-
TintOpacity="0.65" />
7658
<AcrylicBrush
7759
x:Key="ApplicationPageBackgroundThemeBrush"
7860
BackgroundSource="HostBackdrop"
@@ -109,12 +91,6 @@
10991
FallbackColor="{ThemeResource SolidBackgroundFillColorTertiary}"
11092
TintColor="{ThemeResource SolidBackgroundFillColorTertiary}"
11193
TintOpacity="0.65" />
112-
<AcrylicBrush
113-
x:Key="PreviewPaneBackgroundBrush"
114-
BackgroundSource="HostBackdrop"
115-
FallbackColor="{ThemeResource SolidBackgroundFillColorTertiary}"
116-
TintColor="{ThemeResource SolidBackgroundFillColorTertiary}"
117-
TintOpacity="0.75" />
11894
</ResourceDictionary>
11995
<ResourceDictionary x:Key="Light">
12096

@@ -123,12 +99,6 @@
12399
<x:Double x:Key="SidebarTintLuminosityOpacity">0.5</x:Double>
124100

125101
<!-- Acrylic Resources -->
126-
<AcrylicBrush
127-
x:Key="PaneHolderPageBackgroundBrush"
128-
BackgroundSource="HostBackdrop"
129-
FallbackColor="{ThemeResource SolidBackgroundFillColorSecondary}"
130-
TintColor="{ThemeResource SolidBackgroundFillColorSecondary}"
131-
TintOpacity="0.65" />
132102
<AcrylicBrush
133103
x:Key="HorizontalTabControlBackgroundBrush"
134104
BackgroundSource="HostBackdrop"
@@ -171,18 +141,6 @@
171141
FallbackColor="{ThemeResource SolidBackgroundFillColorSecondary}"
172142
TintColor="{ThemeResource SolidBackgroundFillColorSecondary}"
173143
TintOpacity="0.65" />
174-
<AcrylicBrush
175-
x:Key="StatusBarBackgroundBrush"
176-
BackgroundSource="HostBackdrop"
177-
FallbackColor="{ThemeResource SolidBackgroundFillColorBase}"
178-
TintColor="{ThemeResource SolidBackgroundFillColorBase}"
179-
TintOpacity="0.65" />
180-
<AcrylicBrush
181-
x:Key="FileBrowserBackgroundBrush"
182-
BackgroundSource="HostBackdrop"
183-
FallbackColor="{ThemeResource SolidBackgroundFillColorBase}"
184-
TintColor="{ThemeResource SolidBackgroundFillColorBase}"
185-
TintOpacity="0.65" />
186144
<AcrylicBrush
187145
x:Key="ApplicationPageBackgroundThemeBrush"
188146
BackgroundSource="HostBackdrop"
@@ -219,12 +177,6 @@
219177
FallbackColor="{ThemeResource SolidBackgroundFillColorTertiary}"
220178
TintColor="{ThemeResource SolidBackgroundFillColorTertiary}"
221179
TintOpacity="0.8" />
222-
<AcrylicBrush
223-
x:Key="PreviewPaneBackgroundBrush"
224-
BackgroundSource="HostBackdrop"
225-
FallbackColor="{ThemeResource SolidBackgroundFillColorTertiary}"
226-
TintColor="{ThemeResource SolidBackgroundFillColorTertiary}"
227-
TintOpacity="0.8" />
228180
</ResourceDictionary>
229181

230182
<ResourceDictionary x:Key="HighContrast">

src/Files/Themes/Black Pixel.xaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@
2929
<SolidColorBrush x:Key="ContentDialogBorderBrush" Color="#00000000" />
3030
<!-- Dual Panes -->
3131
<SolidColorBrush x:Key="PaneBorderBrush" Color="#00000000" />
32-
<SolidColorBrush x:Key="PaneHolderPageBackgroundBrush" Color="#000000" />
3332
<!-- File Browser Control Background -->
34-
<SolidColorBrush x:Key="FileBrowserBackgroundBrush" Color="#000000" />
3533
<SolidColorBrush x:Key="FileBrowserHeaderBackgroundBrush" Color="#000000" />
3634
<!-- Hover effects -->
3735
<SolidColorBrush x:Key="ButtonBackgroundPointerOver" Color="#21FFFFFF" />
@@ -67,8 +65,6 @@
6765
<SolidColorBrush x:Key="TextControlBackgroundDisabled" Color="#00000000" />
6866
<SolidColorBrush x:Key="TextControlBorderBrush" Color="#00000000" />
6967
<SolidColorBrush x:Key="TextControlButtonBackground" Color="#00000000" />
70-
<!-- Preview pane -->
71-
<SolidColorBrush x:Key="PreviewPaneBackgroundBrush" Color="#000000" />
7268
<!-- Settings -->
7369
<SolidColorBrush x:Key="ExpanderHeaderBackground" Color="#191919" />
7470
<!-- ScrollBars -->
@@ -80,8 +76,6 @@
8076
<SolidColorBrush x:Key="NavigationViewExpandedPaneBackground" Color="#000000" />
8177
<SolidColorBrush x:Key="SidebarBorderBrush" Color="#00000000" />
8278
<SolidColorBrush x:Key="SidebarContentBackgroundBrush" Color="#000000" />
83-
<!-- Status Bar Background -->
84-
<SolidColorBrush x:Key="StatusBarBackgroundBrush" Color="#000000" />
8579
<!-- Text input -->
8680
<SolidColorBrush x:Key="TextControlSelectionHighlightColor" Color="#1A73E8" />
8781
<!-- Titlebar -->
@@ -115,9 +109,7 @@
115109
<SolidColorBrush x:Key="ContentDialogBorderBrush" Color="#00000000" />
116110
<!-- Dual Panes -->
117111
<SolidColorBrush x:Key="PaneBorderBrush" Color="#00000000" />
118-
<SolidColorBrush x:Key="PaneHolderPageBackgroundBrush" Color="#000000" />
119112
<!-- File Browser Control Background -->
120-
<SolidColorBrush x:Key="FileBrowserBackgroundBrush" Color="#000000" />
121113
<SolidColorBrush x:Key="FileBrowserHeaderBackgroundBrush" Color="#000000" />
122114
<!-- Hover effects -->
123115
<SolidColorBrush x:Key="ButtonBackgroundPointerOver" Color="#21FFFFFF" />
@@ -153,8 +145,6 @@
153145
<SolidColorBrush x:Key="TextControlBackgroundDisabled" Color="#00000000" />
154146
<SolidColorBrush x:Key="TextControlBorderBrush" Color="#00000000" />
155147
<SolidColorBrush x:Key="TextControlButtonBackground" Color="#00000000" />
156-
<!-- Preview pane -->
157-
<SolidColorBrush x:Key="PreviewPaneBackgroundBrush" Color="#000000" />
158148
<!-- Settings -->
159149
<SolidColorBrush x:Key="ExpanderHeaderBackground" Color="#191919" />
160150
<!-- ScrollBars -->
@@ -166,8 +156,6 @@
166156
<SolidColorBrush x:Key="NavigationViewExpandedPaneBackground" Color="#000000" />
167157
<SolidColorBrush x:Key="SidebarBorderBrush" Color="#00000000" />
168158
<SolidColorBrush x:Key="SidebarContentBackgroundBrush" Color="#000000" />
169-
<!-- Status Bar Background -->
170-
<SolidColorBrush x:Key="StatusBarBackgroundBrush" Color="#000000" />
171159
<!-- Text input -->
172160
<SolidColorBrush x:Key="TextControlSelectionHighlightColor" Color="#1A73E8" />
173161
<!-- Titlebar -->

src/Files/Themes/Glass.xaml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,6 @@
7777
TintColor="{ThemeResource SolidBackgroundFillColorBase}"
7878
TintOpacity="0.65" />
7979

80-
<!-- PreviewPane -->
81-
<AcrylicBrush
82-
x:Key="PreviewPaneBackgroundBrush"
83-
BackgroundSource="HostBackdrop"
84-
FallbackColor="{ThemeResource SolidBackgroundFillColorBase}"
85-
TintColor="{ThemeResource SolidBackgroundFillColorBase}"
86-
TintOpacity="0.65" />
87-
8880
<!-- Sidebar -->
8981
<AcrylicBrush
9082
x:Key="SidebarContentBackgroundBrush"
@@ -167,14 +159,6 @@
167159
TintColor="{ThemeResource SolidBackgroundFillColorTertiary}"
168160
TintOpacity="0.5" />
169161

170-
<!-- PreviewPane -->
171-
<AcrylicBrush
172-
x:Key="PreviewPaneBackgroundBrush"
173-
BackgroundSource="HostBackdrop"
174-
FallbackColor="{ThemeResource SolidBackgroundFillColorBase}"
175-
TintColor="{ThemeResource SolidBackgroundFillColorBase}"
176-
TintOpacity="0.5" />
177-
178162
<!-- Sidebar -->
179163
<AcrylicBrush
180164
x:Key="SidebarContentBackgroundBrush"

src/Files/Themes/Mica Imitation.xaml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,6 @@
7272
TintColor="{ThemeResource SolidBackgroundFillColorQuarternary}"
7373
TintOpacity="0.95" />
7474

75-
<!-- PreviewPane -->
76-
<AcrylicBrush
77-
x:Key="PreviewPaneBackgroundBrush"
78-
BackgroundSource="HostBackdrop"
79-
FallbackColor="{ThemeResource SolidBackgroundFillColorQuarternary}"
80-
TintColor="{ThemeResource SolidBackgroundFillColorQuarternary}"
81-
TintOpacity="0.95" />
82-
8375
<!-- Sidebar -->
8476
<AcrylicBrush
8577
x:Key="SidebarContentBackgroundBrush"
@@ -159,14 +151,6 @@
159151
TintColor="{ThemeResource SolidBackgroundFillColorTertiary}"
160152
TintOpacity="1" />
161153

162-
<!-- PreviewPane -->
163-
<AcrylicBrush
164-
x:Key="PreviewPaneBackgroundBrush"
165-
BackgroundSource="HostBackdrop"
166-
FallbackColor="{ThemeResource SolidBackgroundFillColorSecondary}"
167-
TintColor="{ThemeResource SolidBackgroundFillColorSecondary}"
168-
TintOpacity="0.95" />
169-
170154
<!-- Sidebar -->
171155
<AcrylicBrush
172156
x:Key="SidebarContentBackgroundBrush"

src/Files/UserControls/PreviewPane.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
<Grid
2929
x:Name="RootGrid"
3030
HorizontalAlignment="Stretch"
31-
Background="{ThemeResource PreviewPaneBackgroundBrush}"
3231
BorderBrush="{ThemeResource ControlStrokeColorDefault}"
3332
BorderThickness="0,0,0,1">
3433
<Grid.RowDefinitions>

src/Files/UserControls/StatusBarControl.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
Padding="8,0"
3131
HorizontalAlignment="Stretch"
3232
VerticalAlignment="Stretch"
33-
Background="{ThemeResource StatusBarBackgroundBrush}"
3433
ColumnSpacing="12">
3534
<Grid.ColumnDefinitions>
3635
<ColumnDefinition Width="Auto" />

src/Files/UserControls/Widgets/RecentFilesWidget.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
<StackPanel
1212
x:Name="RecentsListGrid"
13+
MinHeight="200"
1314
Orientation="Vertical"
1415
Spacing="4">
1516
<TextBlock

src/Files/Views/ModernShellPage.xaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
77
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
88
x:Name="RootPage"
9-
Background="{ThemeResource FileBrowserBackgroundBrush}"
109
KeyboardAcceleratorPlacementMode="Hidden"
1110
Loaded="Page_Loaded"
1211
mc:Ignorable="d">
@@ -168,7 +167,6 @@
168167
x:Name="ItemDisplayFrame"
169168
HorizontalAlignment="Stretch"
170169
x:FieldModifier="public"
171-
Background="{ThemeResource FileBrowserBackgroundBrush}"
172170
BorderBrush="{x:Bind CurrentInstanceBorderBrush, Mode=OneWay}"
173171
BorderThickness="{x:Bind CurrentInstanceBorderThickness, Mode=OneWay}"
174172
Navigated="ItemDisplayFrame_Navigated" />

src/Files/Views/PaneHolderPage.xaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
xmlns:local="using:Files.Views"
1212
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
1313
xmlns:mconv="using:Microsoft.Toolkit.Uwp.UI.Converters"
14-
Background="{ThemeResource PaneHolderPageBackgroundBrush}"
1514
mc:Ignorable="d">
1615

1716
<Page.Resources>
@@ -38,10 +37,7 @@
3837
</ResourceDictionary>
3938
</Page.Resources>
4039

41-
<Grid
42-
HorizontalAlignment="Stretch"
43-
VerticalAlignment="Stretch"
44-
Background="{ThemeResource PaneHolderPageBackgroundBrush}">
40+
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
4541
<Grid.ColumnDefinitions>
4642
<ColumnDefinition
4743
x:Name="LeftColumn"

0 commit comments

Comments
 (0)