mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 16:04:21 +00: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 <40196330+ChildishForces@users.noreply.github.com>
This commit is contained in:
@@ -18,6 +18,7 @@ import {
|
||||
import type { CloneSourceProps } from "@/workbench/contributions";
|
||||
import { openInBrowser } from "../data/local";
|
||||
import styles from "./GitHubCloneSource.module.css";
|
||||
import { useRowHeight } from "@/ui/density";
|
||||
|
||||
type Row = { repo: GhAccountRepo; indices: number[] | null };
|
||||
|
||||
@@ -32,6 +33,7 @@ export function matchRepos(repos: readonly GhAccountRepo[], query: string): Row[
|
||||
}
|
||||
|
||||
export function GitHubCloneSource({ url, onUrl, onClone, disabled }: CloneSourceProps) {
|
||||
const rowHeight = useRowHeight(26);
|
||||
const [state, setState] = useState<GhAccountRepos | null>(null);
|
||||
const [query, setQuery] = useState("");
|
||||
const [attempt, setAttempt] = useState(0);
|
||||
@@ -140,7 +142,7 @@ export function GitHubCloneSource({ url, onUrl, onClone, disabled }: CloneSource
|
||||
activeIndex={active}
|
||||
onActiveChange={pick}
|
||||
focusable={false}
|
||||
rowHeight={26}
|
||||
rowHeight={rowHeight}
|
||||
empty={
|
||||
<span className={styles.muted}>
|
||||
<T>{state.repos.length ? "No matching repositories" : "No repositories"}</T>
|
||||
|
||||
Reference in New Issue
Block a user