mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 14:35:41 +00:00
feat(mini-player): custom titlebar with action icons; cover/meta/controls layout polish
- Drop the native titlebar on Windows + Linux (decorations: false in open_mini_player); macOS keeps the system titlebar with traffic lights. - Add a slim 26 px custom titlebar with drag region, current track title, and the queue / pin / open-main / close action icons. - Remove the bottom toolbar — those four buttons now live in the titlebar where they're easier to reach. - Refresh the player layout: cover shrinks 112 → 84 px, the right column gets title / artist / transport in a single 84 px-tall block, progress bar spans the full width below. - Add a miniPlayer i18n namespace (showQueue, hideQueue, pinOnTop, pinOff, openMainWindow, close, emptyQueue) localized for all 8 supported locales — previously the tooltips were hard-coded English. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2756,6 +2756,11 @@ fn open_mini_player(app: tauri::AppHandle) -> Result<(), String> {
|
||||
.map(|m| m.scale_factor())
|
||||
.unwrap_or(1.0);
|
||||
|
||||
// macOS keeps the native titlebar (traffic lights + system look).
|
||||
// Windows and Linux use a custom in-page titlebar so the mini fits a
|
||||
// tighter visual style across all WMs (incl. tiling).
|
||||
let use_decorations = cfg!(target_os = "macos");
|
||||
|
||||
let mut builder = tauri::WebviewWindowBuilder::new(
|
||||
&app,
|
||||
"mini",
|
||||
@@ -2765,7 +2770,7 @@ fn open_mini_player(app: tauri::AppHandle) -> Result<(), String> {
|
||||
.inner_size(340.0, 180.0)
|
||||
.min_inner_size(320.0, 180.0)
|
||||
.resizable(true)
|
||||
.decorations(true)
|
||||
.decorations(use_decorations)
|
||||
.always_on_top(use_always_on_top)
|
||||
.skip_taskbar(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user