fix: add window shadow on Windows

This commit is contained in:
Lykin 2024-07-31 23:25:14 +08:00
parent 0739cb8b68
commit 0038092193
3 changed files with 14 additions and 2 deletions

View File

@ -13,7 +13,7 @@ import ContentLogPane from './components/content/ContentLogPane.vue'
import ContentValueTab from '@/components/content/ContentValueTab.vue' import ContentValueTab from '@/components/content/ContentValueTab.vue'
import ToolbarControlWidget from '@/components/common/ToolbarControlWidget.vue' import ToolbarControlWidget from '@/components/common/ToolbarControlWidget.vue'
import { EventsOn, WindowIsFullscreen, WindowIsMaximised, WindowToggleMaximise } from 'wailsjs/runtime/runtime.js' import { EventsOn, WindowIsFullscreen, WindowIsMaximised, WindowToggleMaximise } from 'wailsjs/runtime/runtime.js'
import { isMacOS } from '@/utils/platform.js' import { isMacOS, isWindows } from '@/utils/platform.js'
import iconUrl from '@/assets/images/icon.png' import iconUrl from '@/assets/images/icon.png'
import ResizeableWrapper from '@/components/common/ResizeableWrapper.vue' import ResizeableWrapper from '@/components/common/ResizeableWrapper.vue'
import { extraTheme } from '@/utils/extra_theme.js' import { extraTheme } from '@/utils/extra_theme.js'
@ -57,6 +57,9 @@ const logoPaddingLeft = ref(10)
const maximised = ref(false) const maximised = ref(false)
const hideRadius = ref(false) const hideRadius = ref(false)
const wrapperStyle = computed(() => { const wrapperStyle = computed(() => {
if (isWindows()) {
return {}
}
return hideRadius.value return hideRadius.value
? {} ? {}
: { : {
@ -65,6 +68,11 @@ const wrapperStyle = computed(() => {
} }
}) })
const spinStyle = computed(() => { const spinStyle = computed(() => {
if (isWindows()) {
return {
backgroundColor: themeVars.value.bodyColor,
}
}
return hideRadius.value return hideRadius.value
? { ? {
backgroundColor: themeVars.value.bodyColor, backgroundColor: themeVars.value.bodyColor,

View File

@ -10,3 +10,7 @@ export async function loadEnvironment() {
export function isMacOS() { export function isMacOS() {
return os === 'darwin' return os === 'darwin'
} }
export function isWindows() {
return os === 'windows'
}

View File

@ -114,7 +114,7 @@ func main() {
Windows: &windows.Options{ Windows: &windows.Options{
WebviewIsTransparent: true, WebviewIsTransparent: true,
WindowIsTranslucent: true, WindowIsTranslucent: true,
DisableFramelessWindowDecorations: true, DisableFramelessWindowDecorations: false,
}, },
Linux: &linux.Options{ Linux: &linux.Options{
ProgramName: "Tiny RDM", ProgramName: "Tiny RDM",