feat: restyle the UI in the colours and type of the logo
Warm maroon backgrounds with cream text replace the cool blue theme. The accent splits in two: a maroon fill for the current section and buttons, and a lighter red for text and thin lines, where the fill is too dark to read. Focus rings are cream. Headings use Noto Serif SemiBold, the wordmark's font, bundled with its licence so they look the same whatever the machine has installed. The sidebar and login card show the logo instead of plain text.
This commit is contained in:
+73
-46
@@ -2,6 +2,9 @@
|
||||
// (800px = 1.0, the Steam Deck). The UI keeps the same proportions on a Deck
|
||||
// and on a 4K TV, whatever scale factor the compositor reports.
|
||||
|
||||
// Bundled so headings look the same on every machine. Licence in fonts/OFL.txt.
|
||||
import "fonts/NotoSerif-SemiBold.ttf";
|
||||
|
||||
export enum Action {
|
||||
none, up, down, left, right, page-up, page-down, activate, back,
|
||||
play-pause, next, prev, queue, section-next, section-prev,
|
||||
@@ -43,21 +46,29 @@ export struct Hint { key: string, label: string }
|
||||
|
||||
export global Theme {
|
||||
in-out property <float> s: 1.0;
|
||||
out property <color> bg: #0d0f13;
|
||||
out property <color> panel: #14171d;
|
||||
out property <color> raised: #1e222a;
|
||||
out property <color> line: #2a2f39;
|
||||
out property <color> text: #f3f4f6;
|
||||
out property <color> muted: #a0a7b4;
|
||||
out property <color> faint: #626a78;
|
||||
out property <color> accent: #8ab4ff;
|
||||
out property <color> on-accent: #0d0f13;
|
||||
// Warm darks and cream text, from the logo's maroon (#5a0712) and cream.
|
||||
out property <color> bg: #140b0c;
|
||||
out property <color> panel: #1d1012;
|
||||
out property <color> raised: #2b181b;
|
||||
out property <color> line: #42272b;
|
||||
out property <color> text: #faebda;
|
||||
out property <color> muted: #bea999;
|
||||
out property <color> faint: #80685f;
|
||||
// Filled surfaces: the current section, buttons, the playing badge.
|
||||
out property <color> accent: #a51d2d;
|
||||
out property <color> on-accent: #faebda;
|
||||
// Accent for text and thin lines, where the fill colour is too dark to read.
|
||||
out property <color> highlight: #e8757b;
|
||||
// Ring around whatever has focus.
|
||||
out property <color> focus: #faebda;
|
||||
out property <color> error: #f0605d;
|
||||
out property <string> serif: "Noto Serif";
|
||||
}
|
||||
|
||||
component Art inherits Rectangle {
|
||||
in property <image> source;
|
||||
in property <bool> has-image;
|
||||
in property <color> tint: #39404d;
|
||||
in property <color> tint: Theme.raised;
|
||||
in property <string> letter;
|
||||
in property <bool> round;
|
||||
in property <length> letter-size: 64px * Theme.s;
|
||||
@@ -71,8 +82,9 @@ component Art inherits Rectangle {
|
||||
text: root.letter;
|
||||
// Not derived from the art's own height: that feeds back into layout.
|
||||
font-size: root.letter-size;
|
||||
font-weight: 800;
|
||||
color: #ffffff60;
|
||||
font-family: Theme.serif;
|
||||
font-weight: 600;
|
||||
color: Theme.text.with-alpha(0.4);
|
||||
horizontal-alignment: center;
|
||||
vertical-alignment: center;
|
||||
visible: !root.has-image;
|
||||
@@ -104,7 +116,7 @@ component Card inherits Rectangle {
|
||||
height: root.art + 2 * root.ring;
|
||||
border-radius: root.item.round ? self.width / 2 : 13px * Theme.s;
|
||||
border-width: 3px * Theme.s;
|
||||
border-color: root.selected ? (root.active ? Theme.accent : Theme.faint) : transparent;
|
||||
border-color: root.selected ? (root.active ? Theme.focus : Theme.faint) : transparent;
|
||||
animate border-color { duration: 120ms; }
|
||||
}
|
||||
|
||||
@@ -171,7 +183,7 @@ component Row inherits Rectangle {
|
||||
border-radius: 10px * Theme.s;
|
||||
background: root.selected ? (root.active ? Theme.raised : Theme.panel) : transparent;
|
||||
border-width: root.selected && root.active ? 2px * Theme.s : 0;
|
||||
border-color: Theme.accent;
|
||||
border-color: Theme.focus;
|
||||
|
||||
HorizontalLayout {
|
||||
padding-left: 16px * Theme.s;
|
||||
@@ -195,7 +207,7 @@ component Row inherits Rectangle {
|
||||
width: 34px * Theme.s;
|
||||
text: root.item.playing ? "▶" : root.item.number;
|
||||
font-size: 15px * Theme.s;
|
||||
color: root.item.playing ? Theme.accent : Theme.faint;
|
||||
color: root.item.playing ? Theme.highlight : Theme.faint;
|
||||
horizontal-alignment: right;
|
||||
vertical-alignment: center;
|
||||
}
|
||||
@@ -208,7 +220,7 @@ component Row inherits Rectangle {
|
||||
text: root.item.title;
|
||||
font-size: 17px * Theme.s;
|
||||
font-weight: 600;
|
||||
color: root.item.playing ? Theme.accent : Theme.text;
|
||||
color: root.item.playing ? Theme.highlight : Theme.text;
|
||||
overflow: elide;
|
||||
}
|
||||
if root.item.subtitle != "": Text {
|
||||
@@ -334,15 +346,17 @@ component PageHeader inherits Rectangle {
|
||||
horizontal-stretch: 1;
|
||||
Text {
|
||||
text: root.h.kind;
|
||||
font-size: 13px * Theme.s;
|
||||
font-weight: 700;
|
||||
letter-spacing: 2px * Theme.s;
|
||||
color: Theme.accent;
|
||||
font-size: 14px * Theme.s;
|
||||
font-family: Theme.serif;
|
||||
font-weight: 600;
|
||||
letter-spacing: 3px * Theme.s;
|
||||
color: Theme.highlight;
|
||||
}
|
||||
Text {
|
||||
text: root.h.title;
|
||||
font-size: 40px * Theme.s;
|
||||
font-weight: 800;
|
||||
font-family: Theme.serif;
|
||||
font-weight: 600;
|
||||
color: Theme.text;
|
||||
overflow: elide;
|
||||
}
|
||||
@@ -368,7 +382,8 @@ component Sidebar inherits Rectangle {
|
||||
in property <string> footer;
|
||||
callback clicked(int);
|
||||
|
||||
background: Theme.panel;
|
||||
// A hint of the logo's maroon at the top, fading into the panel.
|
||||
background: @linear-gradient(180deg, #2a0b11 0%, Theme.panel 55%);
|
||||
|
||||
VerticalLayout {
|
||||
padding: 26px * Theme.s;
|
||||
@@ -376,11 +391,15 @@ component Sidebar inherits Rectangle {
|
||||
spacing: 6px * Theme.s;
|
||||
alignment: start;
|
||||
|
||||
Text {
|
||||
text: "remus";
|
||||
font-size: 30px * Theme.s;
|
||||
font-weight: 800;
|
||||
color: Theme.text;
|
||||
HorizontalLayout {
|
||||
alignment: start;
|
||||
padding-left: 6px * Theme.s;
|
||||
Image {
|
||||
source: @image-url("../branding/svg/remus-logo.svg");
|
||||
height: 44px * Theme.s;
|
||||
// The lockup's aspect ratio, so the image box hugs the logo.
|
||||
width: self.height * 2.93;
|
||||
}
|
||||
}
|
||||
Rectangle { height: 26px * Theme.s; }
|
||||
|
||||
@@ -426,7 +445,7 @@ component SearchBox inherits Rectangle {
|
||||
border-radius: 12px * Theme.s;
|
||||
background: Theme.raised;
|
||||
border-width: 2px * Theme.s;
|
||||
border-color: input.has-focus || root.highlighted ? Theme.accent : Theme.line;
|
||||
border-color: input.has-focus || root.highlighted ? Theme.focus : Theme.line;
|
||||
|
||||
input := TextInput {
|
||||
x: 18px * Theme.s;
|
||||
@@ -472,7 +491,7 @@ component NowBar inherits Rectangle {
|
||||
Rectangle {
|
||||
x: 0;
|
||||
width: parent.width * root.progress;
|
||||
background: Theme.accent;
|
||||
background: Theme.highlight;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -522,7 +541,7 @@ component NowBar inherits Rectangle {
|
||||
if root.has-track: Text {
|
||||
text: root.paused ? "❚❚" : "▶";
|
||||
font-size: 18px * Theme.s;
|
||||
color: Theme.accent;
|
||||
color: Theme.highlight;
|
||||
vertical-alignment: center;
|
||||
}
|
||||
}
|
||||
@@ -599,7 +618,7 @@ component Field inherits VerticalLayout {
|
||||
border-radius: 10px * Theme.s;
|
||||
background: Theme.raised;
|
||||
border-width: 2px * Theme.s;
|
||||
border-color: input.has-focus || root.highlighted ? Theme.accent : Theme.line;
|
||||
border-color: input.has-focus || root.highlighted ? Theme.focus : Theme.line;
|
||||
input := TextInput {
|
||||
x: 16px * Theme.s;
|
||||
width: parent.width - 32px * Theme.s;
|
||||
@@ -634,6 +653,8 @@ component LoginView inherits Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
background: @radial-gradient(circle, #3a0b13 0%, Theme.bg 70%);
|
||||
|
||||
Rectangle {
|
||||
width: min(560px * Theme.s, parent.width - 40px * Theme.s);
|
||||
height: col.preferred-height;
|
||||
@@ -644,11 +665,14 @@ component LoginView inherits Rectangle {
|
||||
padding: 40px * Theme.s;
|
||||
spacing: 20px * Theme.s;
|
||||
|
||||
Text {
|
||||
text: "remus";
|
||||
font-size: 38px * Theme.s;
|
||||
font-weight: 800;
|
||||
color: Theme.text;
|
||||
HorizontalLayout {
|
||||
alignment: start;
|
||||
Image {
|
||||
source: @image-url("../branding/svg/remus-logo.svg");
|
||||
height: 68px * Theme.s;
|
||||
// The lockup's aspect ratio, so the image box hugs the logo.
|
||||
width: self.height * 2.93;
|
||||
}
|
||||
}
|
||||
Text {
|
||||
text: "Connect to your Subsonic server";
|
||||
@@ -691,7 +715,7 @@ component LoginView inherits Rectangle {
|
||||
if root.error != "": Text {
|
||||
text: root.error;
|
||||
font-size: 15px * Theme.s;
|
||||
color: #f0605d;
|
||||
color: Theme.error;
|
||||
wrap: word-wrap;
|
||||
}
|
||||
Text {
|
||||
@@ -734,7 +758,7 @@ component NowPlayingView inherits Rectangle {
|
||||
opacity: 0.16;
|
||||
}
|
||||
Rectangle {
|
||||
background: @linear-gradient(90deg, #0d0f13aa, #0d0f13f2);
|
||||
background: @linear-gradient(90deg, Theme.bg.with-alpha(0.67), Theme.bg.with-alpha(0.95));
|
||||
}
|
||||
|
||||
HorizontalLayout {
|
||||
@@ -761,8 +785,9 @@ component NowPlayingView inherits Rectangle {
|
||||
Rectangle { height: 14px * Theme.s; }
|
||||
Text {
|
||||
text: root.has-track ? root.title : "Nothing playing";
|
||||
font-size: 30px * Theme.s;
|
||||
font-weight: 800;
|
||||
font-size: 32px * Theme.s;
|
||||
font-family: Theme.serif;
|
||||
font-weight: 600;
|
||||
color: Theme.text;
|
||||
overflow: elide;
|
||||
}
|
||||
@@ -787,7 +812,7 @@ component NowPlayingView inherits Rectangle {
|
||||
x: 0;
|
||||
width: parent.width * root.progress;
|
||||
border-radius: 3px * Theme.s;
|
||||
background: Theme.accent;
|
||||
background: Theme.highlight;
|
||||
}
|
||||
}
|
||||
HorizontalLayout {
|
||||
@@ -800,7 +825,7 @@ component NowPlayingView inherits Rectangle {
|
||||
horizontal-stretch: 1;
|
||||
text: root.has-track ? (root.paused ? "Paused" : "Playing") : "";
|
||||
font-size: 14px * Theme.s;
|
||||
color: Theme.accent;
|
||||
color: Theme.highlight;
|
||||
horizontal-alignment: center;
|
||||
}
|
||||
Text {
|
||||
@@ -816,8 +841,9 @@ component NowPlayingView inherits Rectangle {
|
||||
horizontal-stretch: 1;
|
||||
Text {
|
||||
text: "Queue";
|
||||
font-size: 26px * Theme.s;
|
||||
font-weight: 800;
|
||||
font-size: 28px * Theme.s;
|
||||
font-family: Theme.serif;
|
||||
font-weight: 600;
|
||||
color: Theme.text;
|
||||
}
|
||||
ItemView {
|
||||
@@ -999,8 +1025,9 @@ export component AppWindow inherits Window {
|
||||
visible: !root.header.visible;
|
||||
Text {
|
||||
text: root.page-title;
|
||||
font-size: 30px * Theme.s;
|
||||
font-weight: 800;
|
||||
font-size: 32px * Theme.s;
|
||||
font-family: Theme.serif;
|
||||
font-weight: 600;
|
||||
color: Theme.text;
|
||||
vertical-alignment: center;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user