mirror of
https://github.com/storytold/texturecraft.git
synced 2026-12-01 10:34:00 +01:00
Custom title bar: app icon, menus and window buttons in one strip
The top menu strip is now the window's title bar wherever the app draws the frame (crates/ui-egui/src/titlebar.rs), using craft-window for the decision and for the draggable empty area: - Windows: no OS frame. App icon at the very left, the menus, empty space that moves the window (double-click maximizes), the mode label, then minimize, maximize/restore and close (46 pt wide, crisp pixel-snapped glyphs, close turns red on hover, dimmed while inactive). Invisible edge and corner zones resize the window. A per-frame guard ported from VectorCraft keeps the undecorated window borderless and a maximized one clear of the taskbar (winsafe, no unsafe), and the taskbar gets the big app icon. - macOS: the traffic lights over the strip (full-size content view, hidden title), centred on it with eframe's traffic-light API, the app icon after their inset, and AppKit's movable flag synced by craft-window. - Linux and the BSDs: craft-window's probe decides; where the compositor leaves the frame to the app (GNOME) the strip draws the buttons in the desktop's button layout. - Wherever the system draws the frame (and on the web) the strip stays the menu bar, with the app icon at its left. No line under the strip. TEXTURECRAFT_TITLEBAR=app|system overrides the decision. Settings › Interface › System title bar (applies on restart) brings the OS frame back; it is read from the saved settings before the window opens and is settable over the control channel as prefs.system_title_bar. ui.inspect reports titleBar. New strings are translated in every language, and the offscreen snapshots render the app-drawn and macOS variants.
This commit is contained in:
1 parent
d9b1f4628e
commit
bdac5a22d2
25 files changed
+987
-51
No files matched your search
@@ -96,6 +96,9 @@ Everything TextureCraft does today, by area. What's still missing is in [`ROADMA
|
||||
|
||||
- A modern look in **four brightness levels** (dark, medium dark, medium light and light) with
|
||||
**seven accent colors**, set in Settings › Interface.
|
||||
- **Its own title bar** with the app icon, menus and window buttons on Windows (and on Linux
|
||||
desktops that leave the frame to the app, such as GNOME), the macOS traffic lights over the same
|
||||
strip, and Settings › Interface › System title bar for the system's frame instead.
|
||||
- **Dockable, tabbed and floating panels**, saved layouts, and panels that reopen where you closed
|
||||
them.
|
||||
- A **shortcut editor** with conflict detection, and every shortcut shown in its tooltip.
|
||||
|
||||
Reference in new issue
Block a user