Skip to content

Commit c417115

Browse files
authored
fix: enable shadows by default, closes #6909 (#6916)
1 parent 29ce9ce commit c417115

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

.changes/shadows-default-on.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'tauri': 'patch'
3+
---
4+
5+
Enable shadows by default.

core/tauri-config-schema/schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@
702702
},
703703
"shadow": {
704704
"description": "Whether or not the window has shadow.\n\n## Platform-specific\n\n- **Windows:** - `false` has no effect on decorated window, shadow are always ON. - `true` will make ndecorated window have a 1px white border, and on Windows 11, it will have a rounded corners. - **Linux:** Unsupported.",
705-
"default": false,
705+
"default": true,
706706
"type": "boolean"
707707
}
708708
},

core/tauri-utils/src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ pub struct WindowConfig {
800800
/// - `true` will make ndecorated window have a 1px white border,
801801
/// and on Windows 11, it will have a rounded corners.
802802
/// - **Linux:** Unsupported.
803-
#[serde(default)]
803+
#[serde(default = "default_true")]
804804
pub shadow: bool,
805805
}
806806

@@ -837,7 +837,7 @@ impl Default for WindowConfig {
837837
accept_first_mouse: false,
838838
tabbing_identifier: None,
839839
additional_browser_args: None,
840-
shadow: false,
840+
shadow: true,
841841
}
842842
}
843843
}

examples/api/src-tauri/src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,7 @@ pub fn run() {
5454

5555
#[cfg(target_os = "windows")]
5656
{
57-
window_builder = window_builder
58-
.transparent(true)
59-
.shadow(true)
60-
.decorations(false);
57+
window_builder = window_builder.transparent(true).decorations(false);
6158
}
6259

6360
let window = window_builder.build().unwrap();

examples/splashscreen/tauri.conf.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
"width": 400,
4343
"height": 200,
4444
"decorations": false,
45-
"shadow": true,
4645
"resizable": false,
4746
"url": "splashscreen.html"
4847
}

tooling/cli/schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@
702702
},
703703
"shadow": {
704704
"description": "Whether or not the window has shadow.\n\n## Platform-specific\n\n- **Windows:** - `false` has no effect on decorated window, shadow are always ON. - `true` will make ndecorated window have a 1px white border, and on Windows 11, it will have a rounded corners. - **Linux:** Unsupported.",
705-
"default": false,
705+
"default": true,
706706
"type": "boolean"
707707
}
708708
},

0 commit comments

Comments
 (0)