Conversation
… Album Art Mode (#78) - Scale AlbumArtMode controls with clamp()/vmin units instead of fixed px sizes, so buttons aren't tiny in a large window and aren't oversized in the 320x320 mini mode. - Make enterAlbumArtWindow() reliably land on an exact 320x320 square by lowering minSize/maxSize before resizing and re-applying setSize on the next frame, working around WM/compositor timing after setDecorations(false). - Add data-tauri-resize-handle corner elements + startResizeDragging() so the undecorated mini window supports diagonal resizing.
Use a fixed 8x8px diagonal-only resize handle at each corner (matching typical OS resize-border size), with permissions for setMaxSize and startResizeDragging so the mini window resizes correctly and stays square.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #78 — buttons in Album Art Mode were tiny in larger windows, the mini desktop window didn't always end up square, and the undecorated mini window had no way to resize diagonally.
AlbumArtMode.sveltenow sizes the close button, prev/play/next icons, and the play button circle withclamp(min, vmin-based, max)instead of fixed pixel sizes (e.g.width="22"on<svg>,48px.play-btn). They now scale proportionally whether the window is the 320x320 mini mode or a large fullscreen overlay.enterAlbumArtWindow()inalbumArtWindow.jspreviously calledsetDecorations(false)followed immediately bysetSize(320x320), which on some Linux WMs raced against the decoration change and didn't always land on an exact square. Now it lowersminSize/maxSizefirst (so the resize isn't clamped against the larger normal minimum), applies the 320x320 size, waits a frame for the decoration change to settle, then re-applies the size once more.data-tauri-resize-handleelements (nw/ne/sw/se) toAlbumArtMode.svelte, each calling the newstartResizeDrag()helper (getCurrentWindow().startResizeDragging(direction)). This is required for Tauri v2 undecorated windows, which draw no resize borders themselves. AminSize/maxSizeof 220–800px keeps the mini window within a sane range while still allowing the user to resize it (including diagonally) per the issue request — it isn't hard-locked to a perfect square while dragging, since the issue prioritizes allowing diagonal resize.Notes on testing
npm run buildandnpm testpass (49/49 unit tests, no new pure-logic helpers needed for this change).enterAlbumArtWindow/exitAlbumArtWindowsquare sizing, and the new resize handles viastartResizeDragging) — this requiresnpm run tauri dev/buildon a real desktop environment with a window manager, which isn't feasible in this sandboxed worktree. Please verify on your desktop build:Test plan