Skip to content

Commit f8b09fc

Browse files
Merge pull request #95 from Flow-Launcher/onesounds-patch-1
Update how-to-create-a-theme.md
2 parents 403f8d9 + 28df9ae commit f8b09fc

1 file changed

Lines changed: 71 additions & 2 deletions

File tree

how-to-create-a-theme.md

Lines changed: 71 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ The theme file allows you to set the following parts. Each style has a key, and
1616

1717
![Flow Launcher screenshot](https://cdn.jsdelivr.net/gh/Flow-Launcher/docs@main/assets/themelayout.png)
1818

19-
<br>
20-
2119
### WindowBorderStyle
2220

2321
In this item, you can set the color, border size, border color, and corner radius of the basic window.
@@ -252,6 +250,77 @@ Specifies the color of the glyph icon.
252250
</Style>
253251
```
254252

253+
----
254+
### Theme Info
255+
You can add the following theme information at the top of the file: the theme name, whether blur is supported, and whether dark mode is supported. This value is displayed as an icon in Flow's theme list.
256+
```
257+
<!--
258+
Name: Windows 11
259+
IsDark: True
260+
HasBlur: True
261+
-->
262+
```
263+
264+
## How to Make Blur theme
265+
The following values must be added within the theme file.
266+
267+
```
268+
<system:Boolean x:Key="ThemeBlurEnabled">True</system:Boolean>
269+
<system:String x:Key="SystemBG">Auto</system:String>
270+
<Color x:Key="LightBG">#BFFAFAFA</Color>
271+
<Color x:Key="DarkBG">#DD202020</Color>
272+
```
273+
Set `ThemeBlurEnabled` to `True` for themes that support blur, and False otherwise.
274+
`SystemBG` selects the default window background color drawn by the system when blur is enabled. It can be set to `Light`, `Dark`, or `Auto`.
275+
`Auto` automatically switches between `Light` and `Dark` based on Flow's ColorScheme setting.
276+
`LightBG` is the window color used in `Light` mode, and `DarkBG` is the window color used in `Dark` mode.
277+
278+
When the blur effect is enabled, users cannot disable window shadows, and the window corner radius is determined by the system. In other words, any values specified by the theme designer for these properties will be ignored.
279+
280+
### Blur Effects
281+
282+
Windows 11 users can choose from four types of blur effects, each with the following characteristics:
283+
284+
285+
#### **None**
286+
287+
No blur effect is applied. The window background color is determined in the following order of priority:
288+
289+
1. The `LightBG` or `DarkBG` color with the alpha (transparency) value removed.
290+
2. If `LightBG`/`DarkBG` is not set, the background color from `WindowBorderStyle` is used.
291+
292+
293+
#### **Acrylic**
294+
295+
1. The system-defined Light/Dark background is applied first.
296+
2. Then, the colors defined in `LightBG` and `DarkBG` are drawn on top. (Like Tint)
297+
3. The `LightBG` and `DarkBG` values should include some level of alpha (transparency), and the colors should not differ too drastically from the system-applied base color.
298+
299+
In other words, you should avoid specifying background colors that differ too much in tone from the default window colors drawn by Windows.
300+
301+
#### **Mica / Mica Alt**
302+
303+
- The user-defined `LightBG` and `DarkBG` are completely ignored.
304+
- The background color is automatically determined based on the user's desktop wallpaper.
305+
- It uses either a Light or Dark variant, selected according to the `SystemBG` setting.
306+
307+
#### 💡 Design Recommendation
308+
309+
Since the window background can change significantly depending on the user's blur settings, it is **recommended to design Blur themes by adjusting text and element opacity based on black or white colors** to ensure good contrast and readability.
310+
<br>
311+
312+
----
313+
314+
## How to Make Auto Dark Mode theme
315+
- By default, if the SystemBG property is set to Auto and both LightBG and DarkBG color values are specified, the theme will function automatically as intended.
316+
- The colors of control elements for Light and Dark modes should be based on Flow's resource definitions to ensure they switch automatically with the theme. (Currently, these cannot be defined separately within the theme itself.)
317+
Refer to the built-in Windows11 theme as a reference, and check the provided link
318+
319+
- https://github.com/Flow-Launcher/Flow.Launcher/blob/dev/Flow.Launcher/Themes/Win11Light.xaml
320+
- https://github.com/Flow-Launcher/Flow.Launcher/blob/dev/Flow.Launcher/Resources/Light.xaml
321+
- https://github.com/Flow-Launcher/Flow.Launcher/blob/dev/Flow.Launcher/Resources/Dark.xaml
322+
----
323+
255324
## Let's share it!
256325
Once you have crafted your perfect theme, why not share it with the community:
257326

0 commit comments

Comments
 (0)