дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-04 01:01:17 +02:00
feat(appearance): make Compact Mode match IntelliJ's compact density (#4593)
Compact Mode only lowered the title bar and narrowed the stripes: row heights, toolbar widgets and icons were fixed in code, and nothing in JS (where virtualised list row heights are set) could tell whether the mode was on. A small density store now mirrors the setting for JS, and Compact Mode uses IntelliJ's *.compact theme values: tree/list rows 22 (VCS log 24), toolbar widgets 26, toolbar and stripe icons 16, status bar 24, island gap 4, and chrome text 1px smaller. Co-authored-by: ChildishForces <[email protected]>
Цей коміт міститься в:
1 джерело
0379c37a49
коміт
efd4e454ee
67 files changed
+356
-118
No files matched your search
@@ -16,6 +16,7 @@ import { prettyDate } from "../ui/prettyDate";
|
||||
import { commitDescription } from "./model";
|
||||
import { selectCommit, useCreatePr, type CreateChange } from "./store";
|
||||
import styles from "./Create.module.css";
|
||||
import { useRowHeight } from "@/ui/density";
|
||||
|
||||
function Centered({ children, error }: { children: ReactNode; error?: boolean }) {
|
||||
return <div className={error ? `${styles.centered} ${styles.errorText}` : styles.centered}>{children}</div>;
|
||||
@@ -170,6 +171,7 @@ function showDiff(all: readonly CreateChange[], first: CreateChange) {
|
||||
}
|
||||
|
||||
function ChangesTree() {
|
||||
const rowHeight = useRowHeight(22);
|
||||
const changes = useCreatePr((s) => s.changes);
|
||||
const files = changes?.state === "ok" ? changes.value : null;
|
||||
const roots = useMemo(() => (files ? buildFileTree(files, (f) => f.path) : []), [files]);
|
||||
@@ -219,7 +221,7 @@ function ChangesTree() {
|
||||
selected={selection}
|
||||
onSelectionChange={setSelection}
|
||||
multiSelect
|
||||
rowHeight={22}
|
||||
rowHeight={rowHeight}
|
||||
aria-label="Changes"
|
||||
speedSearch
|
||||
onActivate={(n) => n.file && showDiff(ordered, n.file)}
|
||||
|
||||
@@ -178,7 +178,6 @@ function HeadPopup(props: { anchor: HTMLElement; initialRepo: GHRemote; onClose:
|
||||
onActivate={(r) => choose(r)}
|
||||
focusable={false}
|
||||
hoverSelects
|
||||
rowHeight={24}
|
||||
className={styles.headList}
|
||||
aria-label="Branches"
|
||||
empty={<div className={styles.hint}>{tx("Nothing to show")}</div>}
|
||||
|
||||
Reference in new issue
Заблокувати користувача