Skip to content

Commit c149be4

Browse files
committed
Surface: Add background and border constants
1 parent fa28642 commit c149be4

1 file changed

Lines changed: 29 additions & 5 deletions

File tree

Themes/Surface/README.md

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,26 @@ If you are using "MyDockFinder", you can hide the system tray with this style:
3636
Target: `Grid#SystemTrayFrameGrid`
3737
Style: `Visibility=Collapsed`
3838

39+
## Customization
40+
41+
To apply the customizations below, set the corresponding style constants in the mod settings under "Style constants".
42+
43+
### Task item background
44+
45+
The background and border of pinned and running task items. Set `TaskItemBackground` and `TaskItemBorder` to change them. Example values:
46+
* `TaskItemBackground=#E6202020` → Dark gray, mostly opaque
47+
* `TaskItemBackground=#B31A1A2E` → Dark navy, 70% opacity
48+
* `TaskItemBorder=#33000000` → Subtle dark border
49+
* `TaskItemBorder=#40FFFFFF` → Subtle light border
50+
51+
### System item background
52+
53+
The background and border of system items such as the Start button and Task View button. Set `SystemItemBackground` and `SystemItemBorder` to change them. Example values:
54+
* `SystemItemBackground=#CC202020` → Dark gray, 80% opacity
55+
* `SystemItemBackground=#B31A1A2E` → Dark navy, 70% opacity
56+
* `SystemItemBorder=#33000000` → Subtle dark border
57+
* `SystemItemBorder=#40FFFFFF` → Subtle light border
58+
3959
## Theme selection
4060

4161
The theme is integrated into the mod and can be selected directly from the mod's
@@ -84,21 +104,25 @@ The theme styles can also be imported manually. To do that, follow these steps:
84104
"controlStyles[5].target": "Taskbar.TaskbarFrame > Grid#RootGrid > Taskbar.TaskbarBackground > Grid > Rectangle#BackgroundFill",
85105
"controlStyles[5].styles[0]": "Fill:=<WindhawkBlur BlurAmount=\"5\" TintColor=\"#12FFFFFF\"/>",
86106
"controlStyles[6].target": "Taskbar.TaskListLabeledButtonPanel@RunningIndicatorStates > Border#BackgroundElement",
87-
"controlStyles[6].styles[0]": "Background:=<AcrylicBrush TintColor=\"{ThemeResource SystemChromeAltHighColor}\" TintOpacity=\"0.9\" FallbackColor=\"{ThemeResource SystemChromeMediumColor}\" />",
107+
"controlStyles[6].styles[0]": "Background:=$TaskItemBackground",
88108
"controlStyles[6].styles[1]": "Margin=-1,5.5,1,4",
89109
"controlStyles[6].styles[2]": "CornerRadius=12",
90110
"controlStyles[6].styles[3]": "BorderThickness=2,1,0.5,2",
91-
"controlStyles[6].styles[4]": "BorderBrush:=<LinearGradientBrush StartPoint=\"0,0\" EndPoint=\"0.5,1\"><GradientStop Color=\"#00000000\" Offset=\"0\" /><GradientStop Color=\"#33000000\" Offset=\"1.5\" /></LinearGradientBrush>",
111+
"controlStyles[6].styles[4]": "BorderBrush:=$TaskItemBorder",
92112
"controlStyles[7].target": "Taskbar.TaskListButtonPanel#ExperienceToggleButtonRootPanel > Border#BackgroundElement",
93-
"controlStyles[7].styles[0]": "Background:=<AcrylicBrush TintColor=\"{ThemeResource SystemChromeAltHighColor}\" TintOpacity=\"0.8\" FallbackColor=\"{ThemeResource SystemChromeLowColor}\" />",
113+
"controlStyles[7].styles[0]": "Background:=$SystemItemBackground",
94114
"controlStyles[7].styles[1]": "CornerRadius=12",
95115
"controlStyles[7].styles[2]": "Margin=-1,5.5,2.5,4",
96116
"controlStyles[7].styles[3]": "BorderThickness=2,1,0.5,2",
97-
"controlStyles[7].styles[4]": "BorderBrush:=<LinearGradientBrush StartPoint=\"0,0\" EndPoint=\"0.5,1\"><GradientStop Color=\"#00000000\" Offset=\"0\" /><GradientStop Color=\"#33000000\" Offset=\"1.5\" /></LinearGradientBrush>",
117+
"controlStyles[7].styles[4]": "BorderBrush:=$SystemItemBorder",
98118
"controlStyles[8].target": "Taskbar.TaskListLabeledButtonPanel@CommonStates > Rectangle#RunningIndicator",
99119
"controlStyles[8].styles[0]": "Margin=0,0,0,8",
100120
"controlStyles[9].target": "Border#MultiWindowElement",
101-
"controlStyles[9].styles[0]": "Height=0"
121+
"controlStyles[9].styles[0]": "Height=0",
122+
"styleConstants[0]": "TaskItemBackground=<AcrylicBrush TintColor=\"{ThemeResource SystemChromeAltHighColor}\" TintOpacity=\"0.9\" FallbackColor=\"{ThemeResource SystemChromeMediumColor}\" />",
123+
"styleConstants[1]": "TaskItemBorder=<LinearGradientBrush StartPoint=\"0,0\" EndPoint=\"0.5,1\"><GradientStop Color=\"#00000000\" Offset=\"0\" /><GradientStop Color=\"#33000000\" Offset=\"1.5\" /></LinearGradientBrush>",
124+
"styleConstants[2]": "SystemItemBackground=<AcrylicBrush TintColor=\"{ThemeResource SystemChromeAltHighColor}\" TintOpacity=\"0.8\" FallbackColor=\"{ThemeResource SystemChromeLowColor}\" />",
125+
"styleConstants[3]": "SystemItemBorder=<LinearGradientBrush StartPoint=\"0,0\" EndPoint=\"0.5,1\"><GradientStop Color=\"#00000000\" Offset=\"0\" /><GradientStop Color=\"#33000000\" Offset=\"1.5\" /></LinearGradientBrush>"
102126
}
103127
```
104128
</details>

0 commit comments

Comments
 (0)