Keep global actions visible and follow each platform's title bar
Phase 5-4. - The workspace button sits at the left end of the header. It shows the workspace name and opens the workspace list below it. - The left ribbon is always present: plugin views at the top, Help and Settings at the bottom. The left pane footer is gone. - Tabs keep 120 pixels and scroll. Fades show tabs out of view, and a list button names all tabs, with pinned and unsaved marks. The active tab now scrolls into view with its close button. - A drag area of 120 pixels follows the tabs. In a narrow header, the tabs shrink first, and the drag area keeps at least 48 pixels. - Caption buttons are square, 46 pixels wide, and full height. When the pointer rests on maximize, the new window_snap_layouts command opens Snap Layouts with Win+Z for the focused window. - macOS keeps its native traffic lights: tauri.macos.conf.json and the runtime window builders use an overlay title bar. Title bars leave --rs-titlebar-inset-start free for the traffic lights. - 3 new catalog rows and 1 removed row, in French, Japanese, and Simplified Chinese. - Docs: UI-050, the user guide, and ui-design.md. Tests: the new layout/titleBar. Tests that used the left pane footer, the rounded caption buttons, the 600-pixel theme editor pane, or a ribbon of no width now follow the new layout.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
<script lang="ts">
|
||||
// The left pane: a plugin sidebar view, or the files, search, and bookmarks views, and the workspace footer.
|
||||
// The left pane: a plugin sidebar view, or the files, search, and bookmarks views.
|
||||
import { t } from "$lib/i18n";
|
||||
import IconButton from "$lib/ui/IconButton.svelte";
|
||||
import PluginEditor from "$lib/plugins/PluginEditor.svelte";
|
||||
import BrowserSlot from "$lib/plugins/BrowserSlot.svelte";
|
||||
import { pluginSidebar } from "$lib/plugins/external";
|
||||
@@ -10,7 +9,6 @@
|
||||
import FileTree from "./FileTree.svelte";
|
||||
import SearchPane from "./SearchPane.svelte";
|
||||
import BookmarksPane from "./BookmarksPane.svelte";
|
||||
import { commandShortcut } from "./workbenchKeys";
|
||||
|
||||
type Props = {
|
||||
workspace: WorkspaceInfo | null;
|
||||
@@ -21,18 +19,14 @@
|
||||
activePath: string | null;
|
||||
searchRequest: { text: string; id: number } | null;
|
||||
fileTree?: FileTree;
|
||||
workspaceAnchor?: HTMLDivElement;
|
||||
onOpenFile: (entry: TreeEntry, line?: number, target?: "current" | "new") => void;
|
||||
onCreated: (entry: TreeEntry) => void;
|
||||
onSaveTemplate: (entry: TreeEntry) => void;
|
||||
onManageTemplates: () => void;
|
||||
onStatus: (message: string) => void;
|
||||
onChooseWorkspace: () => void;
|
||||
onHelp: () => void;
|
||||
onSettings: () => void;
|
||||
};
|
||||
let { workspace, session, leftView, keysActive, showInternal, activePath, searchRequest, fileTree = $bindable(), workspaceAnchor = $bindable(),
|
||||
onOpenFile, onCreated, onSaveTemplate, onManageTemplates, onStatus, onChooseWorkspace, onHelp, onSettings }: Props = $props();
|
||||
let { workspace, session, leftView, keysActive, showInternal, activePath, searchRequest, fileTree = $bindable(),
|
||||
onOpenFile, onCreated, onSaveTemplate, onManageTemplates, onStatus }: Props = $props();
|
||||
</script>
|
||||
|
||||
<aside class="left">
|
||||
@@ -69,16 +63,6 @@
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="left-footer">
|
||||
<div class="footer-start" bind:this={workspaceAnchor}>
|
||||
<IconButton icon="folder-open" label={$t("Open folder")} onclick={onChooseWorkspace} />
|
||||
<span class="ws">{workspace ? workspace.name : $t("No workspace")}</span>
|
||||
</div>
|
||||
<div class="footer-actions">
|
||||
<IconButton icon="help" label={$t("Help and about ({shortcut})", { shortcut: commandShortcut("help") })} onclick={onHelp} />
|
||||
<IconButton icon="settings" label={$t("Settings ({shortcut})", { shortcut: commandShortcut("settings") })} onclick={onSettings} />
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<style>
|
||||
@@ -135,36 +119,6 @@
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.left-footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
padding: 4px 6px;
|
||||
border-top: 1px solid var(--rs-border);
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.footer-start {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.footer-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
|
||||
.footer-actions :global(.icon-btn) { width: 32px; height: 32px; flex-basis: 32px; }
|
||||
|
||||
.ws {
|
||||
color: var(--rs-text-dim);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
margin: 12px;
|
||||
color: var(--rs-text-dim);
|
||||
|
||||
Reference in New Issue
Block a user