polish(slint): immersive panels contrast, alignment and legibility pass
Content sat directly over the variable album atmosphere and washed out. Add a semi-opaque dark backing behind the split-right panel (and a lighter plate behind the split-left metadata) so any panel reads on any cover. Track Info: replace the dark-gray modal labels with bright local variants (labels #ffffffb3, values near-white). Queue: fix the misaligned clear button (content-sized, 34px baseline, flush trailing edge), de-pill the sub-tabs (underline active), brighten rows. Suggestions: hairline rims and badge backing discs, brighter text. Header: unify the glass capsule idiom across the mode trigger, search placeholder and controls; polish the two-level dropdown (caps group headers, spacing). Split gutters/gaps tuned. cc
This commit is contained in:
4 files changed
+488
-233
No files matched your search
@@ -29,10 +29,10 @@ component ImmExplicitBadge inherits Rectangle {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 3px;
|
||||
background: #ffffff1f;
|
||||
background: #ffffff29;
|
||||
Text {
|
||||
text: "E";
|
||||
color: #ffffffa6;
|
||||
color: #ffffffd9;
|
||||
font-size: 9px;
|
||||
font-weight: 600;
|
||||
horizontal-alignment: center;
|
||||
@@ -43,47 +43,69 @@ component ImmExplicitBadge inherits Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
// One Queue / History sub-tab — plain text, NO pill (ADR-008). Mirrors the
|
||||
// QueueSidebar QueueTab brightness idiom, recolored white-on-glass for the
|
||||
// immersive backdrop.
|
||||
// One Queue / History sub-tab — plain TEXT only, NO pill background (ADR-008).
|
||||
// Mirrors the QueueSidebar QueueTab brightness idiom (active = brightest,
|
||||
// inactive dims and brightens on hover), recolored white-on-glass for the
|
||||
// immersive backdrop. An active tab is marked by a 2px underline accent rather
|
||||
// than a filled rectangle, keeping it pill-free while still reading as "active".
|
||||
component SubTab inherits Rectangle {
|
||||
in property <string> label;
|
||||
in property <int> count: 0;
|
||||
in property <bool> active: false;
|
||||
callback clicked();
|
||||
|
||||
height: 32px;
|
||||
border-radius: 8px;
|
||||
background: root.active ? #ffffff26 : (ta.has-hover ? #ffffff14 : transparent);
|
||||
animate background { duration: 150ms; }
|
||||
// Content-sized: hugs the label so tabs sit close together, no pill chrome.
|
||||
width: tab-row.preferred-width;
|
||||
height: 34px;
|
||||
background: transparent;
|
||||
|
||||
HorizontalLayout {
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
spacing: 6px;
|
||||
tab-row := HorizontalLayout {
|
||||
spacing: 5px;
|
||||
alignment: center;
|
||||
Text {
|
||||
text: root.label;
|
||||
color: root.active ? #ffffff : (ta.has-hover ? #ffffffd9 : #ffffff99);
|
||||
font-size: 17px;
|
||||
font-weight: root.active ? 600 : 500;
|
||||
color: root.active ? #ffffff : (ta.has-hover ? #ffffffe6 : #ffffff99);
|
||||
font-size: 18px;
|
||||
font-weight: root.active ? 700 : 500;
|
||||
vertical-alignment: center;
|
||||
animate color { duration: 150ms; }
|
||||
}
|
||||
if root.count > 0: Text {
|
||||
text: "(" + root.count + ")";
|
||||
color: #ffffff66;
|
||||
color: root.active ? #ffffffb3 : #ffffff66;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
vertical-alignment: center;
|
||||
animate color { duration: 150ms; }
|
||||
}
|
||||
}
|
||||
|
||||
// Active underline — 2px accent flush to the bottom of the label row.
|
||||
Rectangle {
|
||||
x: 0;
|
||||
y: parent.height - self.height;
|
||||
width: parent.width;
|
||||
height: 2px;
|
||||
border-radius: 1px;
|
||||
background: root.active ? #ffffff : (ta.has-hover ? #ffffff33 : transparent);
|
||||
animate background { duration: 150ms; }
|
||||
}
|
||||
|
||||
ta := TouchArea {
|
||||
mouse-cursor: pointer;
|
||||
clicked => { root.clicked(); }
|
||||
}
|
||||
}
|
||||
|
||||
// Section header — small, uppercase, tracked-out label (NOW PLAYING / UP NEXT).
|
||||
// Hoisted to a component so both sections share identical typography + color.
|
||||
component SectionLabel inherits Text {
|
||||
color: #ffffffb3;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 1.2px;
|
||||
}
|
||||
|
||||
// One UP NEXT / History row. 40x40 cover, title/artist, duration, and a
|
||||
// hover-revealed circular play button. Fires `play()` on click OR play-button —
|
||||
// the parent maps it to the right QueueState callback. Reuses QueueRow's visual
|
||||
@@ -94,14 +116,15 @@ component ImmQueueRow inherits Rectangle {
|
||||
callback play();
|
||||
|
||||
height: 56px;
|
||||
border-radius: 8px;
|
||||
// `.track-item.current` (data-panels §4): --alpha-10 bg + 1px --alpha-15
|
||||
// border. Plain rows: transparent, hover --alpha-10.
|
||||
border-radius: 10px;
|
||||
// `.track-item.current` (data-panels §4): the now-playing row gets a brighter
|
||||
// fill + 1px hairline so it reads as the anchor over ANY album atmosphere.
|
||||
// Plain rows are transparent and lift to a soft --alpha-10 on hover.
|
||||
background: root.current
|
||||
? #ffffff1a
|
||||
? #ffffff24
|
||||
: (ta.has-hover ? #ffffff1a : transparent);
|
||||
border-width: root.current ? 1px : 0px;
|
||||
border-color: #ffffff26;
|
||||
border-color: #ffffff3d;
|
||||
animate background { duration: 150ms; }
|
||||
|
||||
ta := TouchArea {
|
||||
@@ -110,18 +133,21 @@ component ImmQueueRow inherits Rectangle {
|
||||
}
|
||||
|
||||
HorizontalLayout {
|
||||
padding-left: 8px;
|
||||
padding-left: 10px;
|
||||
padding-right: 8px;
|
||||
spacing: 10px;
|
||||
spacing: 12px;
|
||||
|
||||
// 40x40 cover.
|
||||
// 40x40 cover. A 1px inset hairline keeps the artwork edge crisp against
|
||||
// both bright and dark atmospheres.
|
||||
VerticalLayout {
|
||||
alignment: center;
|
||||
Rectangle {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 4px;
|
||||
border-radius: 5px;
|
||||
background: #ffffff14;
|
||||
border-width: 1px;
|
||||
border-color: #ffffff1f;
|
||||
clip: true;
|
||||
if root.item.artwork.width > 0: Image {
|
||||
source: root.item.artwork;
|
||||
@@ -136,14 +162,16 @@ component ImmQueueRow inherits Rectangle {
|
||||
VerticalLayout {
|
||||
horizontal-stretch: 1;
|
||||
alignment: center;
|
||||
spacing: 2px;
|
||||
spacing: 3px;
|
||||
HorizontalLayout {
|
||||
spacing: 5px;
|
||||
spacing: 6px;
|
||||
Text {
|
||||
text: root.item.title;
|
||||
// Now-playing title at full white + heavier weight; queue rows
|
||||
// a hair softer so the current row clearly leads.
|
||||
color: #ffffff;
|
||||
font-size: 17px;
|
||||
font-weight: 500;
|
||||
font-weight: root.current ? 600 : 500;
|
||||
overflow: elide;
|
||||
}
|
||||
if root.item.explicit: VerticalLayout {
|
||||
@@ -153,34 +181,45 @@ component ImmQueueRow inherits Rectangle {
|
||||
}
|
||||
Text {
|
||||
text: root.item.artist;
|
||||
color: #ffffff99;
|
||||
font-size: 16px;
|
||||
// Lifted from a faint gray to a legible light secondary so the
|
||||
// artist stays readable over a bright cover atmosphere.
|
||||
color: #ffffffb3;
|
||||
font-size: 15px;
|
||||
overflow: elide;
|
||||
}
|
||||
}
|
||||
|
||||
// Duration.
|
||||
VerticalLayout {
|
||||
alignment: center;
|
||||
// Duration + play affordance share one trailing slot. A plain Rectangle
|
||||
// (NOT a layout) so the absolutely-positioned children honor their x/y —
|
||||
// a VerticalLayout would re-flow them and drop the overlap. The duration
|
||||
// fades on hover and the circular play button fades in over the same
|
||||
// slot, so revealing it never shifts the row.
|
||||
trailing-slot := Rectangle {
|
||||
width: 36px;
|
||||
Text {
|
||||
x: 0;
|
||||
width: parent.width;
|
||||
y: Math.round((parent.height - self.height) / 2 / 1px) * 1px;
|
||||
text: root.item.duration;
|
||||
color: #ffffff80;
|
||||
font-size: 16px;
|
||||
color: #ffffff99;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
horizontal-alignment: right;
|
||||
opacity: (!root.current && ta.has-hover) ? 0.0 : 1.0;
|
||||
animate opacity { duration: 150ms; }
|
||||
}
|
||||
}
|
||||
|
||||
// Hover-revealed circular play button (28px). Hidden for the current
|
||||
// (now-playing) row, which is not re-playable.
|
||||
VerticalLayout {
|
||||
alignment: center;
|
||||
width: 32px;
|
||||
// Hover-revealed circular play button (30px). Hidden for the current
|
||||
// (now-playing) row, which is not re-playable.
|
||||
if !root.current: play-btn := Rectangle {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 14px;
|
||||
background: pta.has-hover ? #ffffff40 : #ffffff26;
|
||||
x: parent.width - self.width;
|
||||
y: Math.round((parent.height - self.height) / 2 / 1px) * 1px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 15px;
|
||||
background: pta.has-hover ? #ffffff59 : #ffffff33;
|
||||
opacity: ta.has-hover || pta.has-hover ? 1.0 : 0.0;
|
||||
animate opacity { duration: 150ms; }
|
||||
animate background { duration: 120ms; }
|
||||
QbzIcon {
|
||||
source: @image-url("../assets/icons/play-fill.svg");
|
||||
width: 13px;
|
||||
@@ -231,46 +270,69 @@ export component ImmersiveQueuePanel inherits Rectangle {
|
||||
spacing: 16px;
|
||||
|
||||
// --- Sub-tab header (Queue / History) ---------------------------
|
||||
// Tabs LEFT, clear-queue action flush at the TRAILING edge (alignment
|
||||
// standard: actions always right, content-sized, on one baseline).
|
||||
// A fixed 34px row height puts the tab labels and the Clear button on
|
||||
// a single horizontal line — the previous version let the unsized
|
||||
// button balloon to fill the spacer and sat off the tab baseline.
|
||||
HorizontalLayout {
|
||||
spacing: 8px;
|
||||
height: 34px;
|
||||
spacing: 18px;
|
||||
alignment: start;
|
||||
SubTab {
|
||||
label: @tr("Queue");
|
||||
count: root.upcoming-count;
|
||||
active: QueueState.tab == 0;
|
||||
clicked => { QueueState.set-tab(0); }
|
||||
VerticalLayout {
|
||||
alignment: center;
|
||||
SubTab {
|
||||
label: @tr("Queue");
|
||||
count: root.upcoming-count;
|
||||
active: QueueState.tab == 0;
|
||||
clicked => { QueueState.set-tab(0); }
|
||||
}
|
||||
}
|
||||
SubTab {
|
||||
label: @tr("History");
|
||||
count: QueueState.history.length;
|
||||
active: QueueState.tab == 1;
|
||||
clicked => { QueueState.set-tab(1); }
|
||||
VerticalLayout {
|
||||
alignment: center;
|
||||
SubTab {
|
||||
label: @tr("History");
|
||||
count: QueueState.history.length;
|
||||
active: QueueState.tab == 1;
|
||||
clicked => { QueueState.set-tab(1); }
|
||||
}
|
||||
}
|
||||
Rectangle { horizontal-stretch: 1; }
|
||||
// Clear-queue button — Queue tab only, when there is something
|
||||
// upcoming (data-panels §4 `.clear-btn`).
|
||||
// upcoming (data-panels §4 `.clear-btn`). Content-sized (hugs its
|
||||
// icon + label via the inner layout's preferred-width) and
|
||||
// vertically centered on the tab baseline, pinned right by the
|
||||
// stretch spacer above. NO pill — a soft bordered rectangle
|
||||
// (ADR-008).
|
||||
if QueueState.tab == 0 && root.upcoming-count > 0: VerticalLayout {
|
||||
alignment: center;
|
||||
clear-btn := Rectangle {
|
||||
height: 30px;
|
||||
width: clear-row.preferred-width;
|
||||
height: 32px;
|
||||
border-radius: 8px;
|
||||
background: cta.has-hover ? #ffffff26 : #ffffff14;
|
||||
animate background { duration: 150ms; }
|
||||
HorizontalLayout {
|
||||
background: cta.has-hover ? #ffffff29 : #ffffff14;
|
||||
border-width: 1px;
|
||||
border-color: cta.has-hover ? #ffffff40 : #ffffff26;
|
||||
animate background, border-color { duration: 150ms; }
|
||||
clear-row := HorizontalLayout {
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
spacing: 6px;
|
||||
spacing: 7px;
|
||||
alignment: center;
|
||||
QbzIcon {
|
||||
source: @image-url("../assets/icons/trash-2.svg");
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
tint: #ffffffcc;
|
||||
VerticalLayout {
|
||||
alignment: center;
|
||||
QbzIcon {
|
||||
source: @image-url("../assets/icons/trash-2.svg");
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
tint: cta.has-hover ? #ffffff : #ffffffcc;
|
||||
}
|
||||
}
|
||||
Text {
|
||||
text: @tr("Clear");
|
||||
color: #ffffffcc;
|
||||
font-size: 16px;
|
||||
color: cta.has-hover ? #ffffff : #ffffffcc;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
vertical-alignment: center;
|
||||
}
|
||||
}
|
||||
@@ -284,7 +346,7 @@ export component ImmersiveQueuePanel inherits Rectangle {
|
||||
// Header underline (data-panels §4 `.panel-header` border-bottom).
|
||||
Rectangle {
|
||||
height: 1px;
|
||||
background: #ffffff1a;
|
||||
background: #ffffff21;
|
||||
}
|
||||
|
||||
// --- Body -------------------------------------------------------
|
||||
@@ -295,17 +357,13 @@ export component ImmersiveQueuePanel inherits Rectangle {
|
||||
if QueueState.tab == 0: Rectangle {
|
||||
// NOW PLAYING card + UP NEXT list, OR empty state.
|
||||
if QueueState.has-current || root.upcoming-count > 0: VerticalLayout {
|
||||
spacing: 12px;
|
||||
spacing: 16px;
|
||||
|
||||
// NOW PLAYING section.
|
||||
if QueueState.has-current: VerticalLayout {
|
||||
spacing: 8px;
|
||||
Text {
|
||||
spacing: 10px;
|
||||
SectionLabel {
|
||||
text: @tr("NOW PLAYING");
|
||||
color: #ffffff80;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
ImmQueueRow {
|
||||
item: QueueState.now-playing;
|
||||
@@ -316,13 +374,21 @@ export component ImmersiveQueuePanel inherits Rectangle {
|
||||
// UP NEXT section.
|
||||
if root.upcoming-count > 0: VerticalLayout {
|
||||
vertical-stretch: 1;
|
||||
spacing: 8px;
|
||||
Text {
|
||||
text: @tr("UP NEXT");
|
||||
color: #ffffff80;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.5px;
|
||||
spacing: 10px;
|
||||
HorizontalLayout {
|
||||
spacing: 8px;
|
||||
SectionLabel {
|
||||
text: @tr("UP NEXT");
|
||||
vertical-alignment: center;
|
||||
}
|
||||
SectionLabel {
|
||||
text: "· " + root.upcoming-count;
|
||||
color: #ffffff80;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.4px;
|
||||
vertical-alignment: center;
|
||||
}
|
||||
Rectangle { horizontal-stretch: 1; }
|
||||
}
|
||||
Rectangle {
|
||||
vertical-stretch: 1;
|
||||
@@ -333,6 +399,9 @@ export component ImmersiveQueuePanel inherits Rectangle {
|
||||
viewport-height: up-list.preferred-height;
|
||||
up-list := VerticalLayout {
|
||||
width: parent.width;
|
||||
// Trailing gutter so rows never tuck under
|
||||
// the overlaid scrollbar (14px gutter).
|
||||
padding-right: 16px;
|
||||
// spacing 0 — the inter-row gap is baked
|
||||
// into each VISIBLE wrapper's height (60 =
|
||||
// 56 row + 4 gap), with the row anchored to
|
||||
@@ -380,55 +449,94 @@ export component ImmersiveQueuePanel inherits Rectangle {
|
||||
// Empty state — nothing playing and nothing upcoming.
|
||||
if !QueueState.has-current && root.upcoming-count == 0: VerticalLayout {
|
||||
alignment: center;
|
||||
spacing: 8px;
|
||||
Text {
|
||||
text: @tr("Your queue is empty");
|
||||
color: #ffffff66;
|
||||
font-size: 18px;
|
||||
font-italic: true;
|
||||
color: #ffffffcc;
|
||||
font-size: 19px;
|
||||
font-weight: 600;
|
||||
horizontal-alignment: center;
|
||||
}
|
||||
Text {
|
||||
text: @tr("Play an album or track to get started");
|
||||
color: #ffffff80;
|
||||
font-size: 15px;
|
||||
horizontal-alignment: center;
|
||||
wrap: word-wrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ===== HISTORY tab =====
|
||||
if QueueState.tab == 1: Rectangle {
|
||||
if QueueState.history.length > 0: Rectangle {
|
||||
hist-flick := Flickable {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
viewport-width: self.width;
|
||||
viewport-height: hist-list.preferred-height;
|
||||
hist-list := VerticalLayout {
|
||||
width: parent.width;
|
||||
spacing: 4px;
|
||||
// QueueState.history is already most-recent-first
|
||||
// (matches QueueSidebar), and play-history(idx)
|
||||
// indexes it directly — no coverflow math here.
|
||||
for item[idx] in QueueState.history: ImmQueueRow {
|
||||
item: item;
|
||||
play => { QueueState.play-history(idx); }
|
||||
if QueueState.history.length > 0: VerticalLayout {
|
||||
spacing: 10px;
|
||||
// Section header — parity with QueueSidebar "RECENTLY
|
||||
// PLAYED".
|
||||
HorizontalLayout {
|
||||
spacing: 8px;
|
||||
SectionLabel {
|
||||
text: @tr("RECENTLY PLAYED");
|
||||
vertical-alignment: center;
|
||||
}
|
||||
SectionLabel {
|
||||
text: "· " + QueueState.history.length;
|
||||
color: #ffffff80;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.4px;
|
||||
vertical-alignment: center;
|
||||
}
|
||||
Rectangle { horizontal-stretch: 1; }
|
||||
}
|
||||
Rectangle {
|
||||
vertical-stretch: 1;
|
||||
hist-flick := Flickable {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
viewport-width: self.width;
|
||||
viewport-height: hist-list.preferred-height;
|
||||
hist-list := VerticalLayout {
|
||||
width: parent.width;
|
||||
spacing: 4px;
|
||||
// Trailing gutter so rows clear the scrollbar.
|
||||
padding-right: 16px;
|
||||
// QueueState.history is already most-recent-first
|
||||
// (matches QueueSidebar), and play-history(idx)
|
||||
// indexes it directly — no coverflow math here.
|
||||
for item[idx] in QueueState.history: ImmQueueRow {
|
||||
item: item;
|
||||
play => { QueueState.play-history(idx); }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ListScrollbar {
|
||||
x: parent.width - self.width;
|
||||
y: 0;
|
||||
height: parent.height;
|
||||
viewport-height: hist-flick.viewport-height;
|
||||
visible-height: hist-flick.height;
|
||||
viewport-y <=> hist-flick.viewport-y;
|
||||
auto-hide: true;
|
||||
ListScrollbar {
|
||||
x: parent.width - self.width;
|
||||
y: 0;
|
||||
height: parent.height;
|
||||
viewport-height: hist-flick.viewport-height;
|
||||
visible-height: hist-flick.height;
|
||||
viewport-y <=> hist-flick.viewport-y;
|
||||
auto-hide: true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if QueueState.history.length == 0: VerticalLayout {
|
||||
alignment: center;
|
||||
spacing: 8px;
|
||||
Text {
|
||||
text: @tr("Nothing played yet");
|
||||
color: #ffffff66;
|
||||
font-size: 18px;
|
||||
font-italic: true;
|
||||
color: #ffffffcc;
|
||||
font-size: 19px;
|
||||
font-weight: 600;
|
||||
horizontal-alignment: center;
|
||||
}
|
||||
Text {
|
||||
text: @tr("Tracks you play will appear here");
|
||||
color: #ffffff80;
|
||||
font-size: 15px;
|
||||
horizontal-alignment: center;
|
||||
wrap: word-wrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,12 +32,19 @@ component OverlayButton inherits Rectangle {
|
||||
in property <length> icon-size: 16px;
|
||||
callback clicked();
|
||||
|
||||
width: root.primary ? 40px : 32px;
|
||||
height: root.primary ? 40px : 32px;
|
||||
width: root.primary ? 44px : 34px;
|
||||
height: root.primary ? 44px : 34px;
|
||||
border-radius: self.width / 2;
|
||||
background: root.primary
|
||||
? (ta.has-hover ? Theme.accent-hover : Theme.accent)
|
||||
: (ta.has-hover ? #ffffff80 : #ffffff4d);
|
||||
: (ta.has-hover ? #ffffff33 : #ffffff1f);
|
||||
// Hairline rim so the secondary discs read on any backdrop.
|
||||
border-width: root.primary ? 0px : 1px;
|
||||
border-color: #ffffff4d;
|
||||
animate background { duration: 120ms; }
|
||||
// Subtle lift on the primary disc.
|
||||
drop-shadow-blur: root.primary ? 12px : 0px;
|
||||
drop-shadow-color: #00000066;
|
||||
|
||||
QbzIcon {
|
||||
source: root.icon;
|
||||
@@ -76,12 +83,14 @@ component SuggestionCardView inherits Rectangle {
|
||||
in property <int> index;
|
||||
|
||||
width: 168px;
|
||||
height: 220px;
|
||||
height: 224px;
|
||||
border-radius: 12px;
|
||||
background: card-ta.has-hover ? #ffffff26 : #ffffff1a;
|
||||
background: card-ta.has-hover ? #ffffff2e : #ffffff1f;
|
||||
border-width: 1px;
|
||||
border-color: #ffffff1a;
|
||||
animate background { duration: 150ms; }
|
||||
border-color: card-ta.has-hover ? #ffffff40 : #ffffff26;
|
||||
drop-shadow-blur: 16px;
|
||||
drop-shadow-color: #00000059;
|
||||
animate background, border-color { duration: 150ms; }
|
||||
|
||||
property <bool> is-radio: root.card.kind == "radio";
|
||||
|
||||
@@ -160,22 +169,31 @@ component SuggestionCardView inherits Rectangle {
|
||||
}
|
||||
|
||||
// Corner badge (above the collage): the full-colour Qobuz logo
|
||||
// (playlist cards) or a white radio glyph (radio card).
|
||||
if root.card.badge == "qobuz": Image {
|
||||
x: parent.width - self.width - 8px;
|
||||
y: 8px;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
image-fit: contain;
|
||||
source: @image-url("../assets/icons/qobuz-logo-filled.svg");
|
||||
}
|
||||
if root.card.badge != "qobuz": QbzIcon {
|
||||
x: parent.width - self.width - 8px;
|
||||
y: 8px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
source: @image-url("../assets/icons/radio.svg");
|
||||
tint: #ffffffcc;
|
||||
// (playlist cards) or a white radio glyph (radio card). A small dark
|
||||
// disc behind it keeps the glyph legible over any collage cover.
|
||||
badge-disc := Rectangle {
|
||||
x: parent.width - self.width - 6px;
|
||||
y: 6px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: self.width / 2;
|
||||
background: #000000a6;
|
||||
if root.card.badge == "qobuz": Image {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
x: (parent.width - self.width) / 2;
|
||||
y: (parent.height - self.height) / 2;
|
||||
image-fit: contain;
|
||||
source: @image-url("../assets/icons/qobuz-logo-filled.svg");
|
||||
}
|
||||
if root.card.badge != "qobuz": QbzIcon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
x: (parent.width - self.width) / 2;
|
||||
y: (parent.height - self.height) / 2;
|
||||
source: @image-url("../assets/icons/radio.svg");
|
||||
tint: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
// Radio building spinner — dim veil + the shared LoadingSpinner
|
||||
@@ -263,7 +281,7 @@ component SuggestionCardView inherits Rectangle {
|
||||
}
|
||||
Text {
|
||||
text: root.card.subtitle;
|
||||
color: #ffffff80;
|
||||
color: #ffffffb3;
|
||||
font-size: 13px;
|
||||
overflow: elide;
|
||||
}
|
||||
@@ -277,7 +295,7 @@ component RecTrackRow inherits Rectangle {
|
||||
|
||||
height: 56px;
|
||||
border-radius: 8px;
|
||||
background: row-ta.has-hover ? #ffffff1a : transparent;
|
||||
background: row-ta.has-hover ? #ffffff21 : transparent;
|
||||
animate background { duration: 150ms; }
|
||||
|
||||
HorizontalLayout {
|
||||
@@ -327,11 +345,12 @@ component RecTrackRow inherits Rectangle {
|
||||
text: root.track.title;
|
||||
color: #ffffff;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
overflow: elide;
|
||||
}
|
||||
Text {
|
||||
text: root.track.artist;
|
||||
color: #ffffff99;
|
||||
color: #ffffffb3;
|
||||
font-size: 13px;
|
||||
overflow: elide;
|
||||
}
|
||||
@@ -342,8 +361,9 @@ component RecTrackRow inherits Rectangle {
|
||||
alignment: center;
|
||||
Text {
|
||||
text: root.track.duration;
|
||||
color: #ffffff80;
|
||||
color: #ffffff99;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -381,12 +401,12 @@ export component ImmersiveSuggestionsPanel inherits Rectangle {
|
||||
source: @image-url("../assets/icons/radio.svg");
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
tint: #ffffff80;
|
||||
tint: #ffffffb3;
|
||||
}
|
||||
}
|
||||
Text {
|
||||
text: @tr("No track selected");
|
||||
color: #ffffff80;
|
||||
color: #ffffffb3;
|
||||
font-size: 18px;
|
||||
horizontal-alignment: center;
|
||||
}
|
||||
@@ -396,7 +416,7 @@ export component ImmersiveSuggestionsPanel inherits Rectangle {
|
||||
if SuggestionsState.loading && SuggestionsState.cards.length == 0
|
||||
&& SuggestionsState.tracks.length == 0: Text {
|
||||
text: @tr("Loading suggestions...");
|
||||
color: #ffffff80;
|
||||
color: #ffffffcc;
|
||||
font-size: 18px;
|
||||
horizontal-alignment: center;
|
||||
vertical-alignment: center;
|
||||
@@ -407,8 +427,9 @@ export component ImmersiveSuggestionsPanel inherits Rectangle {
|
||||
// ---- Error ------------------------------------------------
|
||||
if SuggestionsState.error != "": Text {
|
||||
text: @tr("Failed to load suggestions");
|
||||
color: #ffffff80;
|
||||
color: #ffffffe6;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
horizontal-alignment: center;
|
||||
vertical-alignment: center;
|
||||
width: 100%;
|
||||
@@ -442,9 +463,10 @@ export component ImmersiveSuggestionsPanel inherits Rectangle {
|
||||
// Recommended tracks.
|
||||
if SuggestionsState.tracks.length > 0: Text {
|
||||
text: @tr("Recommended tracks");
|
||||
color: #ffffff80;
|
||||
color: #ffffffe6;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.4px;
|
||||
}
|
||||
if SuggestionsState.tracks.length > 0: VerticalLayout {
|
||||
spacing: 4px;
|
||||
|
||||
@@ -7,19 +7,81 @@
|
||||
// Data is fed by crate::info_modals::load_track_info_inline via
|
||||
// TrackInfoActions.load-inline — it populates the SAME TrackInfoState the
|
||||
// floating modal reads, but never sets `open`, so the overlay modal does NOT
|
||||
// appear over the immersive view. The shared metadata/credit cells are reused
|
||||
// 1:1 from TrackInfoModal.slint (MetaCell / CreditCell).
|
||||
// appear over the immersive view.
|
||||
//
|
||||
// Rendered white-on-dark over the atmosphere backdrop (vs the modal's
|
||||
// surface-card), matching the other immersive split panels. Viewport dims are
|
||||
// passed as props (no `parent` in the root binding); no `opacity:` on the
|
||||
// root; no `changed` watcher on layout geometry (ADR-009 declaration order,
|
||||
// reference_slint_* gotchas).
|
||||
// CONTRAST: this panel renders OVER the dynamic album-art atmosphere backdrop,
|
||||
// whose brightness/hue VARY per album. The modal's shared MetaCell/CreditCell
|
||||
// label color (Theme.text-muted — a dark gray tuned for the dark surface-card)
|
||||
// disappears over a bright atmosphere, so this panel uses LOCAL cell variants
|
||||
// (MetaCellLight / CreditCellLight) with near-white labels/values that stay
|
||||
// legible on any background (does NOT rely solely on the split-right backing).
|
||||
//
|
||||
// Rendered white-on-dark over the atmosphere backdrop, matching the other
|
||||
// immersive split panels. Viewport dims are passed as props (no `parent` in the
|
||||
// root binding); no `opacity:` on the root; no `changed` watcher on layout
|
||||
// geometry (ADR-009 declaration order, reference_slint_* gotchas).
|
||||
|
||||
import { TrackInfoState, TrackInfoActions } from "../state.slint";
|
||||
import { MetaCell, CreditCell } from "../album/TrackInfoModal.slint";
|
||||
import { TrackInfoState, TrackInfoActions, InfoCreditRow } from "../state.slint";
|
||||
import { ListScrollbar } from "../primitives/ListScrollbar.slint";
|
||||
|
||||
// Local bright metadata cell: uppercase label (legible light tone over the
|
||||
// atmosphere, NOT the modal's dark text-muted) + a value supplied as a child.
|
||||
component MetaCellLight inherits VerticalLayout {
|
||||
in property <string> label;
|
||||
spacing: 6px;
|
||||
Text {
|
||||
text: root.label;
|
||||
// Legible light label over a variable backdrop (was Theme.text-muted).
|
||||
color: #ffffffb3;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.6px;
|
||||
}
|
||||
@children
|
||||
}
|
||||
|
||||
// Local bright credit cell: role label (legible light) + clickable performer
|
||||
// names. Clipped so a long name list can't bleed into the neighbouring column.
|
||||
component CreditCellLight inherits VerticalLayout {
|
||||
in property <InfoCreditRow> cell;
|
||||
callback name-clicked(string /* name */, string /* role-raw */);
|
||||
spacing: 6px;
|
||||
Text {
|
||||
text: root.cell.role;
|
||||
color: #ffffffb3;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.6px;
|
||||
}
|
||||
Rectangle {
|
||||
clip: true;
|
||||
height: names-row.preferred-height;
|
||||
names-row := HorizontalLayout {
|
||||
alignment: start;
|
||||
for name[j] in root.cell.names: HorizontalLayout {
|
||||
nta := TouchArea {
|
||||
width: nm.preferred-width;
|
||||
height: nm.preferred-height;
|
||||
mouse-cursor: pointer;
|
||||
clicked => {
|
||||
root.name-clicked(name, root.cell.role-raw);
|
||||
}
|
||||
nm := Text {
|
||||
text: name;
|
||||
color: nta.has-hover ? #b794f6 : #ffffff;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
if j < root.cell.names.length - 1: Text {
|
||||
text: ", ";
|
||||
color: #ffffffcc;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export component ImmersiveTrackInfoPanel inherits Rectangle {
|
||||
// Slot dimensions, supplied by the mount site (the split-right Rectangle).
|
||||
in property <length> viewport-width: 480px;
|
||||
@@ -45,7 +107,7 @@ export component ImmersiveTrackInfoPanel inherits Rectangle {
|
||||
// ---- Loading -----------------------------------------------
|
||||
if TrackInfoState.loading && TrackInfoState.error == "": Text {
|
||||
text: @tr("Loading track info...");
|
||||
color: #ffffff80;
|
||||
color: #ffffffcc;
|
||||
font-size: 18px;
|
||||
horizontal-alignment: center;
|
||||
vertical-alignment: center;
|
||||
@@ -59,13 +121,14 @@ export component ImmersiveTrackInfoPanel inherits Rectangle {
|
||||
spacing: 8px;
|
||||
Text {
|
||||
text: @tr("Failed to load track info");
|
||||
color: #ffffff80;
|
||||
color: #ffffffe6;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
horizontal-alignment: center;
|
||||
}
|
||||
Text {
|
||||
text: TrackInfoState.error;
|
||||
color: #ffffff66;
|
||||
color: #ffffff99;
|
||||
font-size: 13px;
|
||||
horizontal-alignment: center;
|
||||
wrap: word-wrap;
|
||||
@@ -75,7 +138,7 @@ export component ImmersiveTrackInfoPanel inherits Rectangle {
|
||||
// ---- Empty (no track / not yet loaded) ---------------------
|
||||
if !TrackInfoState.loading && TrackInfoState.error == "" && TrackInfoState.title == "": Text {
|
||||
text: @tr("No track selected");
|
||||
color: #ffffff66;
|
||||
color: #ffffffb3;
|
||||
font-size: 18px;
|
||||
horizontal-alignment: center;
|
||||
vertical-alignment: center;
|
||||
@@ -93,23 +156,23 @@ export component ImmersiveTrackInfoPanel inherits Rectangle {
|
||||
|
||||
body := VerticalLayout {
|
||||
width: parent.width;
|
||||
padding-right: 12px;
|
||||
padding-right: 14px;
|
||||
|
||||
// Header: track title + album.
|
||||
VerticalLayout {
|
||||
spacing: 4px;
|
||||
padding-bottom: 24px;
|
||||
spacing: 6px;
|
||||
padding-bottom: 28px;
|
||||
Text {
|
||||
text: TrackInfoState.title;
|
||||
color: #ffffff;
|
||||
font-size: 24px;
|
||||
font-size: 26px;
|
||||
font-weight: 700;
|
||||
wrap: word-wrap;
|
||||
}
|
||||
if TrackInfoState.album != "": Text {
|
||||
text: TrackInfoState.album;
|
||||
color: #ffffff99;
|
||||
font-size: 18px;
|
||||
color: #ffffffcc;
|
||||
font-size: 17px;
|
||||
wrap: word-wrap;
|
||||
}
|
||||
}
|
||||
@@ -119,30 +182,32 @@ export component ImmersiveTrackInfoPanel inherits Rectangle {
|
||||
spacing: 24px;
|
||||
HorizontalLayout {
|
||||
spacing: 24px;
|
||||
MetaCell {
|
||||
MetaCellLight {
|
||||
horizontal-stretch: 1;
|
||||
label: @tr("Duration");
|
||||
Text {
|
||||
text: TrackInfoState.duration;
|
||||
color: #ffffff;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
MetaCell {
|
||||
MetaCellLight {
|
||||
horizontal-stretch: 1;
|
||||
label: @tr("Quality");
|
||||
Text {
|
||||
text: TrackInfoState.quality;
|
||||
color: #ffffff;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
if TrackInfoState.isrc != "": MetaCell {
|
||||
if TrackInfoState.isrc != "": MetaCellLight {
|
||||
horizontal-stretch: 1;
|
||||
label: "ISRC";
|
||||
Text {
|
||||
text: TrackInfoState.isrc;
|
||||
color: #ffffffb3;
|
||||
color: #ffffffe6;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
@@ -150,7 +215,7 @@ export component ImmersiveTrackInfoPanel inherits Rectangle {
|
||||
}
|
||||
if TrackInfoState.label != "": HorizontalLayout {
|
||||
spacing: 24px;
|
||||
MetaCell {
|
||||
MetaCellLight {
|
||||
horizontal-stretch: 1;
|
||||
label: @tr("Label");
|
||||
label-link := TouchArea {
|
||||
@@ -167,6 +232,7 @@ export component ImmersiveTrackInfoPanel inherits Rectangle {
|
||||
color: (label-link.has-hover && TrackInfoState.label-id != "")
|
||||
? #b794f6 : #ffffff;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -176,24 +242,24 @@ export component ImmersiveTrackInfoPanel inherits Rectangle {
|
||||
}
|
||||
|
||||
// Grouped CREDITS (2-column), only when present.
|
||||
if TrackInfoState.credits.length > 0: Rectangle { height: 20px; }
|
||||
if TrackInfoState.credits.length > 0: Rectangle { height: 24px; }
|
||||
if TrackInfoState.credits.length > 0: Rectangle {
|
||||
height: 1px;
|
||||
background: #ffffff1a;
|
||||
background: #ffffff26;
|
||||
}
|
||||
if TrackInfoState.credits.length > 0: Rectangle { height: 20px; }
|
||||
if TrackInfoState.credits.length > 0: Rectangle { height: 24px; }
|
||||
if TrackInfoState.credits.length > 0: VerticalLayout {
|
||||
spacing: 16px;
|
||||
spacing: 18px;
|
||||
for pair in TrackInfoState.credits: HorizontalLayout {
|
||||
spacing: 24px;
|
||||
CreditCell {
|
||||
CreditCellLight {
|
||||
horizontal-stretch: 1;
|
||||
cell: pair.left;
|
||||
name-clicked(n, r) => {
|
||||
TrackInfoActions.open-musician(n, r);
|
||||
}
|
||||
}
|
||||
if pair.has-right: CreditCell {
|
||||
if pair.has-right: CreditCellLight {
|
||||
horizontal-stretch: 1;
|
||||
cell: pair.right;
|
||||
name-clicked(n, r) => {
|
||||
@@ -205,15 +271,15 @@ export component ImmersiveTrackInfoPanel inherits Rectangle {
|
||||
}
|
||||
|
||||
// Copyright.
|
||||
if TrackInfoState.copyright != "": Rectangle { height: 20px; }
|
||||
if TrackInfoState.copyright != "": Rectangle { height: 24px; }
|
||||
if TrackInfoState.copyright != "": Rectangle {
|
||||
height: 1px;
|
||||
background: #ffffff1a;
|
||||
background: #ffffff26;
|
||||
}
|
||||
if TrackInfoState.copyright != "": Rectangle { height: 20px; }
|
||||
if TrackInfoState.copyright != "": Rectangle { height: 24px; }
|
||||
if TrackInfoState.copyright != "": Text {
|
||||
text: TrackInfoState.copyright;
|
||||
color: #ffffff66;
|
||||
color: #ffffff99;
|
||||
font-size: 12px;
|
||||
wrap: word-wrap;
|
||||
}
|
||||
|
||||
@@ -435,10 +435,12 @@ component ImmersivePlayerBar inherits Rectangle {
|
||||
// One grouped section header inside the view menu ("Focus" / "Split").
|
||||
component ImmersiveMenuGroupHeader inherits Rectangle {
|
||||
in property <string> label;
|
||||
height: 26px;
|
||||
height: 28px;
|
||||
HorizontalLayout {
|
||||
padding-left: 14px;
|
||||
padding-right: 14px;
|
||||
padding-top: 8px;
|
||||
padding-bottom: 4px;
|
||||
alignment: start;
|
||||
Text {
|
||||
text: root.label;
|
||||
@@ -446,8 +448,9 @@ component ImmersiveMenuGroupHeader inherits Rectangle {
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
vertical-alignment: center;
|
||||
// Uppercase-ish section header look without a font dependency.
|
||||
letter-spacing: 0.6px;
|
||||
// ALL-CAPS section-header look per the UI alignment standard
|
||||
// (GroupHeader: 11px, semibold, wide tracking, muted).
|
||||
letter-spacing: 1.5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -524,7 +527,7 @@ component ImmersiveViewMenuPopup inherits PopupWindow {
|
||||
property <int> md: ImmersiveState.mode;
|
||||
property <int> sp: ImmersiveState.split-panel;
|
||||
|
||||
width: 244px;
|
||||
width: 256px;
|
||||
height: menu-body.preferred-height;
|
||||
// close-on-click dismisses the menu on ANY click, including a row tap —
|
||||
// so a child selection both applies its state and closes the popup (the
|
||||
@@ -532,20 +535,20 @@ component ImmersiveViewMenuPopup inherits PopupWindow {
|
||||
close-policy: close-on-click;
|
||||
|
||||
Rectangle {
|
||||
background: #0b0b0ef2;
|
||||
border-radius: 14px;
|
||||
background: #0b0b0ef7;
|
||||
border-radius: 16px;
|
||||
border-width: 1px;
|
||||
border-color: #ffffff2e;
|
||||
drop-shadow-blur: 32px;
|
||||
drop-shadow-color: #00000099;
|
||||
drop-shadow-offset-y: 10px;
|
||||
drop-shadow-blur: 36px;
|
||||
drop-shadow-color: #000000a6;
|
||||
drop-shadow-offset-y: 12px;
|
||||
|
||||
menu-body := VerticalLayout {
|
||||
padding: 6px;
|
||||
spacing: 1px;
|
||||
padding: 8px;
|
||||
spacing: 2px;
|
||||
|
||||
// ---- FOCUS group ----
|
||||
ImmersiveMenuGroupHeader { label: @tr("Focus"); }
|
||||
ImmersiveMenuGroupHeader { label: @tr("FOCUS"); }
|
||||
ImmersiveMenuRow {
|
||||
icon: @image-url("../assets/icons/audio-lines.svg");
|
||||
label: @tr("Album Reactive");
|
||||
@@ -631,17 +634,17 @@ component ImmersiveViewMenuPopup inherits PopupWindow {
|
||||
}
|
||||
|
||||
// Divider between the two groups.
|
||||
Rectangle { height: 7px;
|
||||
Rectangle { height: 11px;
|
||||
Rectangle {
|
||||
y: 3px; height: 1px;
|
||||
width: parent.width - 16px;
|
||||
x: 8px;
|
||||
y: 5px; height: 1px;
|
||||
width: parent.width - 20px;
|
||||
x: 10px;
|
||||
background: #ffffff1f;
|
||||
}
|
||||
}
|
||||
|
||||
// ---- SPLIT group ----
|
||||
ImmersiveMenuGroupHeader { label: @tr("Split"); }
|
||||
ImmersiveMenuGroupHeader { label: @tr("SPLIT"); }
|
||||
ImmersiveMenuRow {
|
||||
icon: @image-url("../assets/icons/mic-vocal.svg");
|
||||
label: @tr("Lyrics");
|
||||
@@ -698,12 +701,13 @@ component ImmersiveViewMenu inherits Rectangle {
|
||||
callback suggestions-entered();
|
||||
callback wake();
|
||||
|
||||
width: 40px;
|
||||
width: 44px;
|
||||
height: 36px;
|
||||
border-radius: 12px;
|
||||
background: #00000080;
|
||||
border-radius: 18px;
|
||||
background: trigger-ta.has-hover ? #000000a6 : #00000080;
|
||||
border-width: 1px;
|
||||
border-color: #ffffff2e;
|
||||
border-color: trigger-ta.has-hover ? #ffffff42 : #ffffff2e;
|
||||
animate background, border-color { duration: 120ms; }
|
||||
drop-shadow-blur: 32px;
|
||||
drop-shadow-color: #00000066;
|
||||
drop-shadow-offset-y: 8px;
|
||||
@@ -744,27 +748,30 @@ component ImmersiveViewMenu inherits Rectangle {
|
||||
// is a future session.
|
||||
component ImmersiveSearchPlaceholder inherits Rectangle {
|
||||
height: 36px;
|
||||
border-radius: 8px;
|
||||
background: #00000066;
|
||||
border-radius: 18px;
|
||||
background: #00000080;
|
||||
border-width: 1px;
|
||||
border-color: #ffffff26;
|
||||
drop-shadow-blur: 32px;
|
||||
drop-shadow-color: #00000066;
|
||||
drop-shadow-offset-y: 8px;
|
||||
|
||||
HorizontalLayout {
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
spacing: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
spacing: 10px;
|
||||
VerticalLayout {
|
||||
alignment: center;
|
||||
QbzIcon {
|
||||
source: @image-url("../assets/icons/search.svg");
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
tint: #ffffff8c;
|
||||
tint: #ffffff80;
|
||||
}
|
||||
}
|
||||
Text {
|
||||
text: @tr("Search");
|
||||
color: #ffffff8c;
|
||||
color: #ffffff80;
|
||||
font-size: 13px;
|
||||
vertical-alignment: center;
|
||||
horizontal-stretch: 1;
|
||||
@@ -783,7 +790,7 @@ component ImmersiveWindowBtn inherits Rectangle {
|
||||
height: 32px;
|
||||
border-radius: 16px;
|
||||
background: ta.has-hover
|
||||
? (root.danger ? #ef4444cc : #ffffff26)
|
||||
? (root.danger ? #ef4444b3 : #ffffff26)
|
||||
: transparent;
|
||||
animate background { duration: 120ms; }
|
||||
|
||||
@@ -793,7 +800,12 @@ component ImmersiveWindowBtn inherits Rectangle {
|
||||
height: 15px;
|
||||
x: Math.round((parent.width - self.width) / 2 / 1px) * 1px;
|
||||
y: Math.round((parent.height - self.height) / 2 / 1px) * 1px;
|
||||
tint: ta.has-hover ? #ffffff : #ffffffd9;
|
||||
// Idle: the close-app X carries a faint danger tint so it reads as the
|
||||
// destructive control even before hover; hover goes full white on the
|
||||
// red wash.
|
||||
tint: ta.has-hover
|
||||
? #ffffff
|
||||
: (root.danger ? #ff8f8fd9 : #ffffffd9);
|
||||
}
|
||||
|
||||
ta := TouchArea {
|
||||
@@ -826,7 +838,7 @@ component ImmersiveWindowControls inherits Rectangle {
|
||||
x: 2px;
|
||||
y: 2px;
|
||||
height: 32px;
|
||||
spacing: 2px;
|
||||
spacing: 3px;
|
||||
alignment: center;
|
||||
|
||||
// Drag (move the native window).
|
||||
@@ -1050,9 +1062,9 @@ export component ImmersiveView inherits Rectangle {
|
||||
// the focus panels' clearance so nothing tucks under the chrome.
|
||||
padding-top: 56px;
|
||||
padding-bottom: 132px;
|
||||
padding-left: 48px;
|
||||
padding-right: 48px;
|
||||
spacing: 40px;
|
||||
padding-left: 56px;
|
||||
padding-right: 56px;
|
||||
spacing: 48px;
|
||||
|
||||
// LEFT (~55%): artwork + shared metadata block, centered in its half.
|
||||
// horizontal-stretch 11 (vs the right's 9) yields the 55/45 ratio.
|
||||
@@ -1060,7 +1072,7 @@ export component ImmersiveView inherits Rectangle {
|
||||
property <length> col-h: parent.col-h;
|
||||
horizontal-stretch: 11;
|
||||
alignment: center;
|
||||
spacing: 24px;
|
||||
spacing: 28px;
|
||||
|
||||
// Artwork. Large + responsive: a square bounded by this column's
|
||||
// resolved width and the available height (minus a budget for the
|
||||
@@ -1069,7 +1081,7 @@ export component ImmersiveView inherits Rectangle {
|
||||
// `height`, never the column's own width, so there's no loop.
|
||||
left-art := Rectangle {
|
||||
property <length> art-size:
|
||||
Math.max(220px,
|
||||
Math.max(240px,
|
||||
Math.min(self.width, left-col.col-h - 200px));
|
||||
height: self.art-size;
|
||||
horizontal-stretch: 1;
|
||||
@@ -1078,11 +1090,11 @@ export component ImmersiveView inherits Rectangle {
|
||||
height: parent.art-size;
|
||||
x: (parent.width - self.width) / 2;
|
||||
y: (parent.height - self.height) / 2;
|
||||
border-radius: 8px;
|
||||
border-radius: 12px;
|
||||
clip: true;
|
||||
drop-shadow-blur: 32px;
|
||||
drop-shadow-color: #00000080;
|
||||
drop-shadow-offset-y: 8px;
|
||||
drop-shadow-blur: 40px;
|
||||
drop-shadow-color: #00000099;
|
||||
drop-shadow-offset-y: 12px;
|
||||
Image {
|
||||
source: NowPlayingState.artwork-large.width > 0
|
||||
? NowPlayingState.artwork-large
|
||||
@@ -1093,17 +1105,63 @@ export component ImmersiveView inherits Rectangle {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Shared metadata block (reused from the focus panels).
|
||||
ImmersiveTrackInfo {
|
||||
equalizer-tint: #7c3aed;
|
||||
// Shared metadata block (reused from the focus panels). Wrapped in a
|
||||
// subtle dark plate so the title/artist text reads cleanly over the
|
||||
// variable atmosphere instead of washing out — the art above stays
|
||||
// prominent (no plate of its own; its drop-shadow carries it). The
|
||||
// plate is full column width with 22px side gutters so the elided
|
||||
// Text rows have a real width to truncate against.
|
||||
meta-plate := Rectangle {
|
||||
background: #00000059;
|
||||
border-radius: 14px;
|
||||
border-width: 1px;
|
||||
border-color: #ffffff14;
|
||||
horizontal-stretch: 1;
|
||||
height: meta-block.preferred-height + 28px;
|
||||
meta-block := VerticalLayout {
|
||||
padding-top: 14px;
|
||||
padding-bottom: 14px;
|
||||
padding-left: 22px;
|
||||
padding-right: 22px;
|
||||
alignment: center;
|
||||
ImmersiveTrackInfo {
|
||||
equalizer-tint: #7c3aed;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// RIGHT (~45%): the active split panel, full column width + height.
|
||||
// RIGHT (~45%): the active split panel sits inside a semi-opaque dark
|
||||
// rounded BACKING so any mounted panel's text reads cleanly over the
|
||||
// variable atmosphere (root-cause fix for the washed-out Track Info /
|
||||
// Suggestions / Queue / Lyrics labels). #000000 @ ~58% alpha, hairline
|
||||
// #ffffff1a border, 16px radius, 20px inner padding. The mounted panel
|
||||
// receives the backing's INNER box (column width/height minus 2×pad)
|
||||
// via viewport-width/viewport-height so it never overflows the corners.
|
||||
// horizontal-stretch 9 (vs the left's 11) yields the 45% share.
|
||||
Rectangle {
|
||||
right-plate := Rectangle {
|
||||
// The backing's inner padding. The mounted panel's content box
|
||||
// (`right-inner`) subtracts this on both axes so nothing tucks under
|
||||
// the rounded corners.
|
||||
property <length> pad: 20px;
|
||||
horizontal-stretch: 9;
|
||||
// The dark legibility plate.
|
||||
background: #00000094;
|
||||
border-radius: 16px;
|
||||
border-width: 1px;
|
||||
border-color: #ffffff1a;
|
||||
drop-shadow-blur: 36px;
|
||||
drop-shadow-color: #00000080;
|
||||
drop-shadow-offset-y: 10px;
|
||||
clip: true;
|
||||
|
||||
// Inner content box, inset by the backing padding on all sides.
|
||||
right-inner := Rectangle {
|
||||
x: right-plate.pad;
|
||||
y: right-plate.pad;
|
||||
width: right-plate.width - right-plate.pad * 2;
|
||||
height: right-plate.height - right-plate.pad * 2;
|
||||
clip: true;
|
||||
if ImmersiveState.split-panel == 0: LyricsLinesView {
|
||||
init => { LyricsState.panel-opened(); }
|
||||
width: 100%;
|
||||
@@ -1139,8 +1197,8 @@ export component ImmersiveView inherits Rectangle {
|
||||
changed live-track-id => { TrackInfoActions.load-inline(self.live-track-id); }
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
viewport-width: parent.width;
|
||||
viewport-height: parent.height;
|
||||
viewport-width: right-inner.width;
|
||||
viewport-height: right-inner.height;
|
||||
centered: true;
|
||||
}
|
||||
// Checkpoint D: the live Suggestions panel (artist playlists +
|
||||
@@ -1156,8 +1214,8 @@ export component ImmersiveView inherits Rectangle {
|
||||
changed live-track-id => { SuggestionsActions.load(self.live-track-id); }
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
viewport-width: parent.width;
|
||||
viewport-height: parent.height;
|
||||
viewport-width: right-inner.width;
|
||||
viewport-height: right-inner.height;
|
||||
centered: true;
|
||||
}
|
||||
// Checkpoint B: the Queue + History panel, centered in the right
|
||||
@@ -1167,10 +1225,11 @@ export component ImmersiveView inherits Rectangle {
|
||||
init => { QueueState.panel-opened(); }
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
viewport-width: parent.width;
|
||||
viewport-height: parent.height;
|
||||
viewport-width: right-inner.width;
|
||||
viewport-height: right-inner.height;
|
||||
centered: true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user