Skip to content

armgit / dbx

Public Imported from GitHub
0

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。

fix(editor): keep caret visible at fractional zoom levels

Jamie5e4f756a63c9
diff --git a/apps/desktop/src/lib/editor/editorThemes.ts b/apps/desktop/src/lib/editor/editorThemes.ts
index 2461026223..c563912ea1 100644
--- a/apps/desktop/src/lib/editor/editorThemes.ts
+++ b/apps/desktop/src/lib/editor/editorThemes.ts
@@ -772,9 +772,16 @@ export function buildEditorFontThemeRules(opts?: { fixedHeight?: boolean; scroll
".cm-selectionLayer .cm-selectionBackground": {
display: "none",
},
+ // 光标是零宽元素,可见部分只来自 border-left。在 WebView 页面缩放(uiScale)下
+ // 1 CSS px 不再映射为整数设备像素,1.2px 的小数边框加上 transform 造成的独立绘制层
+ // 会被 WebKit 舍入丢弃,表现为光标在部分列/部分窗口宽度下不显示。
+ // 因此:用 margin-top 代替 transform(不产生绘制层),并给边框整数宽度。
+ // 颜色仍由各主题的 borderLeftColor 提供,无需改动主题。
".cm-cursor": {
height: "1.6em !important",
- transform: "translateY(-0.3em)",
+ marginTop: "-0.3em",
+ borderLeftWidth: "2px",
+ marginLeft: "-1px",
},
".cm-trimmedSelection": {
backgroundColor: `var(${EDITOR_SELECTION_BACKGROUND_CSS_VAR}, rgb(148 163 184 / 38%))`,