diff --git a/src/components/topbar/TopMenubar.vue b/src/components/topbar/TopMenubar.vue index c41fffe90..8c703d38e 100644 --- a/src/components/topbar/TopMenubar.vue +++ b/src/components/topbar/TopMenubar.vue @@ -42,7 +42,7 @@ import WorkflowTabs from '@/components/topbar/WorkflowTabs.vue' import { app } from '@/scripts/app' import { useSettingStore } from '@/stores/settingStore' import { useWorkspaceStore } from '@/stores/workspaceStore' -import { showNativeMenu } from '@/utils/envUtil' +import { electronAPI, isElectron, showNativeMenu } from '@/utils/envUtil' const workspaceState = useWorkspaceStore() const settingStore = useSettingStore() @@ -77,6 +77,14 @@ eventBus.on((event: string, payload: any) => { isDroppable.value = payload.isOverlapping && payload.isDragging } }) + +onMounted(() => { + if (isElectron()) { + electronAPI().changeTheme({ + height: topMenuRef.value.getBoundingClientRect().height + }) + } +})