fix(miniplayer): restore button, resizable window, smaller cover art
- Move drag handler to artwork-section and track-info only, not parent - Buttons in window-controls and controls-row now receive clicks - Enable window resizing in miniplayer mode - Reduce cover art width from 180px to 110px (~60% of original)
This commit is contained in:
1 parent
0aeb4fbbcc
commit
5ebbcaca0b
2 files changed
+11
-7
No files matched your search
@@ -96,7 +96,7 @@ export async function enterMiniplayerMode(): Promise<void> {
|
||||
console.log('[MiniPlayer] Setting size to', MINIPLAYER_WIDTH, 'x', MINIPLAYER_HEIGHT);
|
||||
await window.setSize({ type: 'Physical', width: MINIPLAYER_WIDTH, height: MINIPLAYER_HEIGHT });
|
||||
|
||||
await window.setResizable(false);
|
||||
await window.setResizable(true);
|
||||
await window.setDecorations(false);
|
||||
await window.setAlwaysOnTop(true);
|
||||
|
||||
|
||||
@@ -207,10 +207,9 @@
|
||||
class:dragging={isDragging}
|
||||
role="application"
|
||||
aria-label="MiniPlayer"
|
||||
onmousedown={startDrag}
|
||||
>
|
||||
<!-- Album Art -->
|
||||
<div class="artwork-section">
|
||||
<!-- Album Art - draggable -->
|
||||
<div class="artwork-section" onmousedown={startDrag}>
|
||||
{#if playerState.currentTrack?.artwork}
|
||||
<img src={playerState.currentTrack.artwork} alt="Album art" class="artwork" />
|
||||
{:else}
|
||||
@@ -224,7 +223,7 @@
|
||||
<div class="content-section">
|
||||
<!-- Header: Track info + window controls -->
|
||||
<div class="header">
|
||||
<div class="track-info">
|
||||
<div class="track-info" onmousedown={startDrag}>
|
||||
<div class="title">{playerState.currentTrack?.title ?? 'No track'}</div>
|
||||
<div class="artist">{playerState.currentTrack?.artist ?? '—'}</div>
|
||||
</div>
|
||||
@@ -322,20 +321,24 @@
|
||||
color: white;
|
||||
user-select: none;
|
||||
overflow: hidden;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.miniplayer.dragging {
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
.miniplayer.dragging * {
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
/* Album Art */
|
||||
.artwork-section {
|
||||
width: 180px;
|
||||
width: 110px;
|
||||
flex-shrink: 0;
|
||||
padding: 6px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.artwork {
|
||||
@@ -378,6 +381,7 @@
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.title {
|
||||
|
||||
Reference in new issue
Block a user