25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。
TypeScript aicliclickhousedatabasedatabase-clientdatabase-managementdockerguimcpmongodbmysqlpostgresqlredisrustsql-serversqlitetaurivue
fix(desktop): align Windows window borders
Freedom4e68cd84cc53
diff --git a/apps/desktop/src/App.vue b/apps/desktop/src/App.vueindex 9a6641f2ae..5a4bbd6700 100644--- a/apps/desktop/src/App.vue+++ b/apps/desktop/src/App.vue@@ -45,7 +45,7 @@ import { sqlObjectNavigationSourceKind, sqlObjectNavigationTableType, type SqlObimport { buildExecutableObjectSourceStatements, executeObjectSourceSave } from "@/lib/table/objectSourceEditor";import { resolveExecutableSql, resolveExecutableSqlWithBackend, type SqlExecutionSnapshot } from "@/lib/sql/sqlExecutionTarget";import { uuid } from "@/lib/common/utils";-import { isMacOS } from "@/lib/backend/platform";+import { isMacOS, isWindows } from "@/lib/backend/platform";import { isTauriRuntime } from "@/lib/backend/tauriRuntime";import { openQueryResultArchiveFile } from "@/lib/query/queryResultArchiveFile";import { sqlFileTitleFromPath } from "@/lib/sql/sqlFileOpen";@@ -152,7 +152,7 @@ const {const { setupFileDrop } = useFileDrop();const isDesktop = isTauriRuntime();-const drawDesktopWindowFrame = shouldDrawDesktopWindowFrame(isMacOS(), isDesktop);+const drawDesktopWindowFrame = shouldDrawDesktopWindowFrame(isMacOS(), isDesktop, isWindows());const UPDATE_CHECK_INTERVAL_MS = 60 * 60 * 1000;let updateCheckTimer: ReturnType<typeof setInterval> | undefined;const needsAuth = ref(!isDesktop);diff --git a/apps/desktop/src/composables/__tests__/useWindowControls.spec.ts b/apps/desktop/src/composables/__tests__/useWindowControls.spec.tsindex e1c0068d56..b0bc7c4119 100644--- a/apps/desktop/src/composables/__tests__/useWindowControls.spec.ts+++ b/apps/desktop/src/composables/__tests__/useWindowControls.spec.ts@@ -14,10 +14,11 @@ describe("window controls", () => {expect(shouldShowWindowControls(false, false)).toBe(false);});- it("draws an app frame only for self-decorated desktop windows", () => {- expect(shouldDrawDesktopWindowFrame(false, true)).toBe(true);- expect(shouldDrawDesktopWindowFrame(true, true)).toBe(false);- expect(shouldDrawDesktopWindowFrame(false, false)).toBe(false);+ it("draws an app frame only for self-decorated non-Windows desktop windows", () => {+ expect(shouldDrawDesktopWindowFrame(false, true, false)).toBe(true);+ expect(shouldDrawDesktopWindowFrame(false, true, true)).toBe(false);+ expect(shouldDrawDesktopWindowFrame(true, true, false)).toBe(false);+ expect(shouldDrawDesktopWindowFrame(false, false, false)).toBe(false);});it("reserves traffic light inset only for non-fullscreen macOS desktop windows", () => {diff --git a/apps/desktop/src/composables/useWindowControls.ts b/apps/desktop/src/composables/useWindowControls.tsindex 4a8be83dd2..c1aeb2a861 100644--- a/apps/desktop/src/composables/useWindowControls.ts+++ b/apps/desktop/src/composables/useWindowControls.ts@@ -35,8 +35,10 @@ export function shouldShowWindowControls(isMac: boolean, isDesktop = true): boolreturn isDesktop && !isMac;}-export function shouldDrawDesktopWindowFrame(isMac: boolean, isDesktop = true): boolean {- return isDesktop && !isMac;+export function shouldDrawDesktopWindowFrame(isMac: boolean, isDesktop = true, isWindows = false): boolean {+ // Windows frameless+shadow windows already get a DWM 1px border on all sides.+ // An extra CSS top hairline stacks on that edge and no longer matches left/right/bottom.+ return isDesktop && !isMac && !isWindows;}export function useWindowControls() {