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 ToolbarControlWidget from '@/components/common/ToolbarControlWidget.vue'
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 ResizeableWrapper from '@/components/common/ResizeableWrapper.vue'
import { extraTheme } from '@/utils/extra_theme.js'
@ -57,6 +57,9 @@ const logoPaddingLeft = ref(10)
const maximised = ref(false)
const hideRadius = ref(false)
const wrapperStyle = computed(() => {
if (isWindows()) {
return {}
}
return hideRadius.value
? {}
: {
@ -65,6 +68,11 @@ const wrapperStyle = computed(() => {
}
})
const spinStyle = computed(() => {
if (isWindows()) {
return {
backgroundColor: themeVars.value.bodyColor,
}
}
return hideRadius.value
? {
backgroundColor: themeVars.value.bodyColor,

View File

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

View File

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