|
4 | 4 | x:Class="AI.Desktop.App" |
5 | 5 | RequestedThemeVariant="Dark"> |
6 | 6 | <!-- |
7 | | - The drawn titlebar is not a child of the window, so its brushes resolve here, not in |
8 | | - Window.Resources. Caption* and TitleBarBackgroundBrush are the names Fluent's |
9 | | - WindowDrawnDecorations theme looks up; the rest are the window's own. The values follow |
10 | | - the page's tokens (app.css): App.ApplyTheme switches between the sets when the page |
11 | | - changes its theme. |
| 7 | + The window's own brushes, for what shows before the page loads or when it cannot. The values |
| 8 | + follow the page's tokens (app.css): App.ApplyTheme switches between the sets when the page |
| 9 | + changes its theme, and the system titlebar follows the set's light or dark base. |
12 | 10 | --> |
13 | 11 | <Application.Resources> |
14 | 12 | <ResourceDictionary> |
15 | 13 | <ResourceDictionary.ThemeDictionaries> |
16 | 14 | <ResourceDictionary x:Key="Dark"> |
17 | | - <SolidColorBrush x:Key="TitleBarBackgroundBrush" Color="#202020" /> |
18 | | - <SolidColorBrush x:Key="TitleBarBorderBrush" Color="#2E2E2E" /> |
19 | | - <SolidColorBrush x:Key="CaptionButtonForeground" Color="#ECECEC" /> |
20 | | - <SolidColorBrush x:Key="CaptionButtonBackground" Color="#2B2B2B" /> |
21 | | - <SolidColorBrush x:Key="CaptionButtonBorderBrush" Color="#454545" /> |
22 | 15 | <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#171717" /> |
23 | | - <SolidColorBrush x:Key="WindowFrameBrush" Color="#3A3A3A" /> |
24 | 16 | <SolidColorBrush x:Key="StatusTitleBrush" Color="#E5E5E5" /> |
25 | 17 | <SolidColorBrush x:Key="StatusDetailBrush" Color="#A3A3A3" /> |
26 | 18 | </ResourceDictionary> |
27 | 19 | <!-- The page's dark blue palette (app.css), for the chrome it cannot paint. --> |
28 | 20 | <ResourceDictionary x:Key="{x:Static desktop:DesktopThemes.DarkBlue}"> |
29 | | - <SolidColorBrush x:Key="TitleBarBackgroundBrush" Color="#17212D" /> |
30 | | - <SolidColorBrush x:Key="TitleBarBorderBrush" Color="#24313F" /> |
31 | | - <SolidColorBrush x:Key="CaptionButtonForeground" Color="#E8EDF4" /> |
32 | | - <SolidColorBrush x:Key="CaptionButtonBackground" Color="#212C39" /> |
33 | | - <SolidColorBrush x:Key="CaptionButtonBorderBrush" Color="#3A4A5C" /> |
34 | 21 | <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#101720" /> |
35 | | - <SolidColorBrush x:Key="WindowFrameBrush" Color="#2D3A4A" /> |
36 | 22 | <SolidColorBrush x:Key="StatusTitleBrush" Color="#E8EDF4" /> |
37 | 23 | <SolidColorBrush x:Key="StatusDetailBrush" Color="#A3B0C0" /> |
38 | 24 | </ResourceDictionary> |
39 | | - <!-- The page's neutral grey palette (app.css), for the chrome it cannot paint. The |
40 | | - colours mirror the CSS tokens one-for-one so the drawn titlebar reads as the |
41 | | - same dark grey as the rest of the workspace. --> |
| 25 | + <!-- The page's neutral grey palette (app.css), for the chrome it cannot paint. --> |
42 | 26 | <ResourceDictionary x:Key="{x:Static desktop:DesktopThemes.Gray}"> |
43 | | - <SolidColorBrush x:Key="TitleBarBackgroundBrush" Color="#262626" /> |
44 | | - <SolidColorBrush x:Key="TitleBarBorderBrush" Color="#2E2E2E" /> |
45 | | - <SolidColorBrush x:Key="CaptionButtonForeground" Color="#ECECEC" /> |
46 | | - <SolidColorBrush x:Key="CaptionButtonBackground" Color="#2E2E2E" /> |
47 | | - <SolidColorBrush x:Key="CaptionButtonBorderBrush" Color="#3C3C3C" /> |
48 | 27 | <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#212121" /> |
49 | | - <SolidColorBrush x:Key="WindowFrameBrush" Color="#3C3C3C" /> |
50 | 28 | <SolidColorBrush x:Key="StatusTitleBrush" Color="#ECECEC" /> |
51 | 29 | <SolidColorBrush x:Key="StatusDetailBrush" Color="#AAAAAA" /> |
52 | 30 | </ResourceDictionary> |
53 | | - <!-- The page's light grey palette (app.css), for the chrome it cannot paint. The |
54 | | - colours mirror the CSS tokens one-for-one so the drawn titlebar reads as the |
55 | | - same soft grey as the rest of the workspace. --> |
| 31 | + <!-- The page's light grey palette (app.css), for the chrome it cannot paint. --> |
56 | 32 | <ResourceDictionary x:Key="{x:Static desktop:DesktopThemes.LightGray}"> |
57 | | - <SolidColorBrush x:Key="TitleBarBackgroundBrush" Color="#F5F5F5" /> |
58 | | - <SolidColorBrush x:Key="TitleBarBorderBrush" Color="#D6D6D6" /> |
59 | | - <SolidColorBrush x:Key="CaptionButtonForeground" Color="#1F1F1F" /> |
60 | | - <SolidColorBrush x:Key="CaptionButtonBackground" Color="#E2E2E2" /> |
61 | | - <SolidColorBrush x:Key="CaptionButtonBorderBrush" Color="#C5C5C5" /> |
62 | 33 | <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#F2F2F2" /> |
63 | | - <SolidColorBrush x:Key="WindowFrameBrush" Color="#C5C5C5" /> |
64 | 34 | <SolidColorBrush x:Key="StatusTitleBrush" Color="#1F1F1F" /> |
65 | 35 | <SolidColorBrush x:Key="StatusDetailBrush" Color="#5C5C5C" /> |
66 | 36 | </ResourceDictionary> |
67 | 37 | <ResourceDictionary x:Key="Light"> |
68 | | - <SolidColorBrush x:Key="TitleBarBackgroundBrush" Color="#F3F3F3" /> |
69 | | - <SolidColorBrush x:Key="TitleBarBorderBrush" Color="#E0E0E0" /> |
70 | | - <SolidColorBrush x:Key="CaptionButtonForeground" Color="#1F1F1F" /> |
71 | | - <SolidColorBrush x:Key="CaptionButtonBackground" Color="#E2E2E2" /> |
72 | | - <SolidColorBrush x:Key="CaptionButtonBorderBrush" Color="#CFCFCF" /> |
73 | 38 | <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FFFFFF" /> |
74 | | - <SolidColorBrush x:Key="WindowFrameBrush" Color="#CFCFCF" /> |
75 | 39 | <SolidColorBrush x:Key="StatusTitleBrush" Color="#1F1F1F" /> |
76 | 40 | <SolidColorBrush x:Key="StatusDetailBrush" Color="#575757" /> |
77 | 41 | </ResourceDictionary> |
78 | 42 | </ResourceDictionary.ThemeDictionaries> |
79 | | - <x:Double x:Key="CaptionButtonWidth">46</x:Double> |
80 | | - <x:Double x:Key="CaptionButtonHeight">38</x:Double> |
81 | 43 | </ResourceDictionary> |
82 | 44 | </Application.Resources> |
83 | 45 | <Application.Styles> |
84 | 46 | <FluentTheme /> |
85 | | - <!-- |
86 | | - No full-screen button: leaving full screen on Windows restores the window through |
87 | | - SW_RESTORE, which unmaximizes it and moves a snapped one back to its pre-snap place, |
88 | | - and a maximized window already gives this app the whole screen. |
89 | | - --> |
90 | | - <Style Selector="WindowDrawnDecorations /template/ Button#PART_FullScreenButton"> |
91 | | - <Setter Property="IsVisible" Value="False" /> |
92 | | - </Style> |
93 | 47 | </Application.Styles> |
94 | 48 | </Application> |
0 commit comments