Файли
openidea/src/workbench/documentTitle.ts
T
lleviathe 8dd29bad41 feat(workbench): toggle the toolbar, status bar and tool window bars from View › Appearance (#2206)
The main toolbar and status bar could not be hidden, Tool Window Bars was a Settings row only, and widgets could be switched only from the status bar's context menu. View > Appearance now has Toolbar, Tool Window Bars, Status Bar and Status Bar Widgets, with check marks in the macOS and in-app menus, plus Settings toggles. Both new settings default to shown. With the toolbar hidden, the window keeps a compact header with the title, which Distraction Free now shares.

Controls stay reachable with a bar hidden: the Git branches popup and background tasks have their own hosts, and background tasks has an action.

Co-authored-by: lleviathe <[email protected]>
2026-11-09 07:20:54 +08:00

13 рядки
477 B
TypeScript

import { useSyncExternalStore } from "react";
function subscribe(changed: () => void): () => void {
const observer = new MutationObserver(changed);
observer.observe(document.head, { subtree: true, childList: true, characterData: true });
return () => observer.disconnect();
}
/** The window title as `features/app/title.ts` writes it to `document.title`. */
export function useDocumentTitle(): string {
return useSyncExternalStore(subscribe, () => document.title);
}