feat(slint): use immersive blur in album and artist headers
cx
This commit is contained in:
6 files changed
+87
-8
No files matched your search
@@ -24,6 +24,7 @@ import { ListScrollbar } from "../primitives/ListScrollbar.slint";
|
||||
import { CircleAction } from "../primitives/CircleAction.slint";
|
||||
import { MultiSelectBar } from "../primitives/MultiSelectBar.slint";
|
||||
import { NavButtons } from "../shell/NavButtons.slint";
|
||||
import { ImmersiveAtmosphere } from "../immersive/ImmersiveAtmosphere.slint";
|
||||
|
||||
// One label/award entry in the album sidebar — a round gradient avatar
|
||||
// and a name. In `compact` mode the name is dropped (the rail is an
|
||||
@@ -145,17 +146,41 @@ export component AlbumPageView inherits Rectangle {
|
||||
changed viewport-height => { self.sr-restore(); }
|
||||
changed viewport-y => { NavState.report-scroll(self.viewport-y); }
|
||||
|
||||
// Artwork-tinted gradient behind the header; scrolls with content.
|
||||
Rectangle {
|
||||
// Static Immersive-style blurred artwork field behind the header;
|
||||
// scrolls with content. The old tint gradient remains the fallback
|
||||
// until artwork decoding finishes.
|
||||
if AlbumState.header-atmosphere.width > 0: ImmersiveAtmosphere {
|
||||
x: 0;
|
||||
y: 0;
|
||||
width: parent.width;
|
||||
height: 340px;
|
||||
height: 360px;
|
||||
source-image: AlbumState.header-atmosphere;
|
||||
fallback-image: AlbumState.artwork;
|
||||
animated: false;
|
||||
dim: 0.24;
|
||||
base-opacity: 0.92;
|
||||
warp-opacity: 0.38;
|
||||
}
|
||||
if AlbumState.header-atmosphere.width <= 0: Rectangle {
|
||||
x: 0;
|
||||
y: 0;
|
||||
width: parent.width;
|
||||
height: 360px;
|
||||
background: @linear-gradient(180deg,
|
||||
AlbumState.header-color 0%,
|
||||
AlbumState.header-color 16%,
|
||||
transparent 100%);
|
||||
}
|
||||
Rectangle {
|
||||
x: 0;
|
||||
y: 0;
|
||||
width: parent.width;
|
||||
height: 360px;
|
||||
background: @linear-gradient(180deg,
|
||||
transparent 0%,
|
||||
transparent 58%,
|
||||
Theme.surface-main 100%);
|
||||
}
|
||||
|
||||
page := VerticalLayout {
|
||||
width: parent.width;
|
||||
|
||||
@@ -33,6 +33,7 @@ import { ReleaseGrid } from "ReleaseGrid.slint";
|
||||
import { NavButtons } from "../shell/NavButtons.slint";
|
||||
import { JumpNavBar, JumpNavTab } from "../primitives/JumpNavBar.slint";
|
||||
import { CircleAction } from "../primitives/CircleAction.slint";
|
||||
import { ImmersiveAtmosphere } from "../immersive/ImmersiveAtmosphere.slint";
|
||||
|
||||
component SectionTitle inherits Text {
|
||||
color: Theme.text-primary;
|
||||
@@ -167,17 +168,41 @@ export component ArtistPageView inherits Rectangle {
|
||||
changed viewport-height => { self.sr-restore(); }
|
||||
changed viewport-y => { NavState.report-scroll(self.viewport-y); }
|
||||
|
||||
// Artwork-tinted gradient behind the header; scrolls with content.
|
||||
Rectangle {
|
||||
// Static Immersive-style blurred artwork field behind the header;
|
||||
// scrolls with content. The old tint gradient remains the fallback
|
||||
// until artwork decoding finishes.
|
||||
if ArtistState.header-atmosphere.width > 0: ImmersiveAtmosphere {
|
||||
x: 0;
|
||||
y: 0;
|
||||
width: parent.width;
|
||||
height: 340px;
|
||||
height: 360px;
|
||||
source-image: ArtistState.header-atmosphere;
|
||||
fallback-image: ArtistState.artwork;
|
||||
animated: false;
|
||||
dim: 0.24;
|
||||
base-opacity: 0.92;
|
||||
warp-opacity: 0.38;
|
||||
}
|
||||
if ArtistState.header-atmosphere.width <= 0: Rectangle {
|
||||
x: 0;
|
||||
y: 0;
|
||||
width: parent.width;
|
||||
height: 360px;
|
||||
background: @linear-gradient(180deg,
|
||||
ArtistState.header-color 0%,
|
||||
ArtistState.header-color 16%,
|
||||
transparent 100%);
|
||||
}
|
||||
Rectangle {
|
||||
x: 0;
|
||||
y: 0;
|
||||
width: parent.width;
|
||||
height: 360px;
|
||||
background: @linear-gradient(180deg,
|
||||
transparent 0%,
|
||||
transparent 58%,
|
||||
Theme.surface-main 100%);
|
||||
}
|
||||
|
||||
page := VerticalLayout {
|
||||
width: parent.width;
|
||||
|
||||
@@ -406,7 +406,9 @@ export global AlbumState {
|
||||
// tracks keep priority. Falls back to the full short text when there's room.
|
||||
in property <string> description-shorter;
|
||||
in property <image> artwork;
|
||||
// Artwork-derived tint for the header gradient.
|
||||
// Static Immersive-style blurred artwork field for the header backdrop.
|
||||
in property <image> header-atmosphere;
|
||||
// Artwork-derived tint for the header fallback gradient.
|
||||
in property <color> header-color: #181820;
|
||||
in property <string> label;
|
||||
// Label id for the sidebar label card → label page navigation ("" = none).
|
||||
@@ -2664,7 +2666,9 @@ export global ArtistState {
|
||||
// "Source: <name>" line under the Read more toggle when present.
|
||||
in property <string> bio-source;
|
||||
in property <image> artwork;
|
||||
// Artwork-derived tint for the header gradient.
|
||||
// Static Immersive-style blurred artwork field for the header backdrop.
|
||||
in property <image> header-atmosphere;
|
||||
// Artwork-derived tint for the header fallback gradient.
|
||||
in property <color> header-color: #181820;
|
||||
in property <[TrackItem]> top-tracks: [];
|
||||
// Popular Tracks multi-select (track selection) mode + selected count —
|
||||
|
||||
Reference in new issue
Block a user