forge
Explore
Log in

Don't you dare go Hollow

A second palette, named button groups, and one live accent

Browse files at this commit

5a36eae01c1b7f1385cccb7dbc563ac7af1da472Ahmet Kaan GümüşParent: 0e5864c
  • feat
    • a second palette, named button groups, and one live accent
Show full message
🎨 feat(ui): a second palette, named button groups, and one live accent

Three of the redesign's other answers, kept where they were better than what
this branch had.

The palette is two tables now, `cool` (default) and `warm`, in one file with
one role name list between them: `--features warm` swaps the family and no
call site knows it happened, and a role missing from either is a compile
error rather than a region that quietly kept the old colour. It is a compile
switch because every token is a `const` and a runtime palette is a lookup at
every paint -- the ceiling and the way past it are written where the tables
are. The warm family is held to the same measured floors as the cool one,
and that caught something on the way in: its picked-row surface put the
secondary ink at 4.09:1 where WCAG 1.4.3 wants 4.5, so the surface is darker
here than in the branch it came from.

The toolbar's buttons are three named groups -- Edit, Track, View -- because
a row of twelve unlabelled boxes is a row nobody reads twice, and three
labels are three things to skip.

Import is filled with the accent while the library is empty, which is the
one moment it is genuinely the primary action; Export, which wears the
accent the rest of the time, is dimmed until there is something to export.
So there is still exactly one live accent in the window -- which is the rule
that made Export the accented button in the first place -- and it is on the
thing the user has to press next. An accented button also keeps its accent
under the pointer now: hovering it to the chrome's grey read as the primary
action switching itself off.

And a glyph sits in a box of its own width rather than the width it happens
to draw: the pause bars are 12 px and the play triangle 11, so pressing Play
slid every button in the row one pixel to the left.
crates/app/Cargo.tomlmodified+5 -0
@@ -7,6 +7,11 @@ edition.workspace = true
7 name = "edith"7 name = "edith"
8 path = "src/main.rs"8 path = "src/main.rs"
9 9
10+[features]
11+# The warm palette instead of the default cool one: same role names, different
12+# numbers (`ui/theme.rs`). `cargo run -p edith --features warm`.
13+warm = []
14+
10 [dependencies]15 [dependencies]
11 engine = { path = "../engine" }16 engine = { path = "../engine" }
12 gpui = "0.2.2"17 gpui = "0.2.2"
crates/app/src/ui/library.rsmodified+9 -1
@@ -279,7 +279,15 @@ impl Player {
279 // there, whatever tab is open and however narrow the279 // there, whatever tab is open and however narrow the
280 // window is.280 // window is.
281 width - 16.,281 width - 16.,
282- BG_RAISED,282+ // Filled with the accent while there is nothing to work
283+ // on, because with an empty library this *is* the
284+ // primary action -- and Export, which wears the accent
285+ // the rest of the time, is dimmed until something is
286+ // imported. One live accent in the window either way.
287+ match rows.is_empty() {
288+ true => ACCENT_PRIMARY,
289+ false => BG_RAISED,
290+ },
283 None,291 None,
284 "Import",292 "Import",
285 "adds a file to this list — or drop one on the window".to_string(),293 "adds a file to this list — or drop one on the window".to_string(),
crates/app/src/ui/theme.rsmodified+183 -85
@@ -6,62 +6,192 @@
6 //! *role*, never the shade -- `bg/panel`, not "the dark grey" -- so the palette6 //! *role*, never the shade -- `bg/panel`, not "the dark grey" -- so the palette
7 //! can be swapped whole without touching a single element.7 //! can be swapped whole without touching a single element.
8 //!8 //!
9-//! Family B: near-black ground, cool neutral chrome, one cyan accent, with the9+//! Which is what the two modules below are for. Both families carry the same
10-//! clip bodies carrying the cross-NLE kind convention (video blue, audio green,10+//! role names, so the switch between them is one `use` and no call site knows
11-//! image teal, text purple) instead of four greys that differ by a hair.11+//! it happened -- and a role missing from either is a compile error rather than
12+//! a region that quietly kept the old colour.
13+//!
14+//! * `cool` (default) -- near-black ground, cool neutral chrome, one cyan accent.
15+//! * `warm` (`--features warm`) -- a deep neutral warmed towards brown so no
16+//! surface reads as office grey, with one coral accent.
17+//!
18+//! Both take the clip bodies from the cross-NLE kind convention (video blue,
19+//! audio green, image teal, text purple) instead of four greys that differ by a
20+//! hair, and both are held to the same measured floors: the contrast guards in
21+//! `main.rs` run against whichever one is compiled.
22+//!
23+//! ponytail: a compile switch, because every token is a `const` and a runtime
24+//! palette means a lookup at every paint. Ceiling: the day the palette has to
25+//! change without a restart, these two modules become two `struct Palette`
26+//! values and the consts become fields on the one the window holds.
12 27
13 use engine::project::LaneKind;28 use engine::project::LaneKind;
14 29
15-// -- surfaces -----------------------------------------------------------------30+#[cfg(not(feature = "warm"))]
16-/// The app's base, and the bed a picture is letterboxed against: darker than31+pub use cool::*;
17-/// every panel, so the picture is what the eye lands on.32+#[cfg(feature = "warm")]
18-pub const BG_CANVAS: u32 = 0x0b0d10;33+pub use warm::*;
19-/// The library, the inspector, the toolbar: the chrome the work sits between.34+
20-pub const BG_PANEL: u32 = 0x151a21;35+/// Family B: near-black ground, cool neutral chrome, one cyan accent.
21-/// Buttons, menu bodies, cards -- one plane up from the panel. Flat: the36+pub mod cool {
22-/// separation is colour, never a shadow.37+ // -- surfaces ---------------------------------------------------------------
23-pub const BG_RAISED: u32 = 0x212936;38+ /// The app's base, and the bed a picture is letterboxed against: darker than
24-/// The lane bed, darker than the panel so a clip reads as an object on it.39+ /// every panel, so the picture is what the eye lands on.
25-pub const BG_TIMELINE: u32 = 0x0e1218;40+ pub const BG_CANVAS: u32 = 0x0b0d10;
26-/// One step lighter than whatever it sits on: the pointer's answer that this is41+ /// The library, the inspector, the toolbar: the chrome the work sits between.
27-/// clickable.42+ pub const BG_PANEL: u32 = 0x151a21;
28-pub const BG_HOVER: u32 = 0x2f3a4a;43+ /// Buttons, menu bodies, cards -- one plane up from the panel. Flat: the
29-/// The same answer for the things that stand on the panel rather than on a44+ /// separation is colour, never a shadow.
30-/// button.45+ pub const BG_RAISED: u32 = 0x212936;
31-pub const BG_HOVER_DIM: u32 = 0x1d2531;46+ /// The lane bed, darker than the panel so a clip reads as an object on it.
32-/// A picked row, a picked clip: the accent at surface brightness, so a47+ pub const BG_TIMELINE: u32 = 0x0e1218;
33-/// selection is tinted rather than lit up.48+ /// One step lighter than whatever it sits on: the pointer's answer that this
34-pub const BG_SELECTED: u32 = 0x0d4b5c;49+ /// is clickable.
35-/// What a card is floated over when it is genuinely modal (the export, the50+ pub const BG_HOVER: u32 = 0x2f3a4a;
36-/// actions list). Inspector sections never draw one -- they occlude nothing.51+ /// The same answer for the things that stand on the panel rather than on a
37-pub const SCRIM: u32 = 0x0b0d10cc;52+ /// button.
38-53+ pub const BG_HOVER_DIM: u32 = 0x1d2531;
39-// -- strokes ------------------------------------------------------------------54+ /// A picked row, a picked clip: the accent at surface brightness, so a
40-pub const STROKE_DIVIDER: u32 = 0x2a3442;55+ /// selection is tinted rather than lit up.
41-/// The keyboard's own ring, distinct from selection on purpose: focus is where56+ pub const BG_SELECTED: u32 = 0x0d4b5c;
42-/// the next stroke lands, selection is what an edit acts on.57+ /// What a card is floated over when it is genuinely modal (the export, the
43-pub const STROKE_FOCUS: u32 = 0xffd166;58+ /// actions list). Inspector sections never draw one -- they occlude nothing.
44-pub const STROKE_SELECTED: u32 = 0x22d3ee;59+ pub const SCRIM: u32 = 0x0b0d10cc;
45-60+ /// The lighter scrim: the picker list floats over a card that is still being
46-// -- text ---------------------------------------------------------------------61+ /// read, so it dims rather than hides.
47-pub const FG_PRIMARY: u32 = 0xe9eff7;62+ pub const SCRIM_LIGHT: u32 = 0x0b0d1055;
48-/// Shortcuts, dismissal hints, detail lines. Past 4.5:1 on every surface above.63+
49-pub const FG_SECONDARY: u32 = 0xa7b6c9;64+ // -- strokes ----------------------------------------------------------------
50-pub const FG_DISABLED: u32 = 0x6c7a8b;65+ pub const STROKE_DIVIDER: u32 = 0x2a3442;
51-66+ /// The keyboard's own ring, distinct from selection on purpose: focus is
52-// -- interaction --------------------------------------------------------------67+ /// where the next stroke lands, selection is what an edit acts on.
53-pub const ACCENT_PRIMARY: u32 = 0x22d3ee;68+ pub const STROKE_FOCUS: u32 = 0xffd166;
54-/// Not the accent: the playhead crosses every clip colour there is and has to69+ pub const STROKE_SELECTED: u32 = 0x22d3ee;
55-/// stay the one line that is none of them.70+
56-pub const ACCENT_PLAYHEAD: u32 = 0xff9db0;71+ // -- text -------------------------------------------------------------------
57-/// The accent as a translucent wash, for the marks drawn over a clip body.72+ pub const FG_PRIMARY: u32 = 0xe9eff7;
58-pub const ACCENT_WASH: u32 = 0x22d3eeaa;73+ /// Shortcuts, dismissal hints, detail lines. Past 4.5:1 on every surface
59-74+ /// above.
60-// -- clip kinds (cross-NLE convention) ----------------------------------------75+ pub const FG_SECONDARY: u32 = 0xa7b6c9;
61-pub const CLIP_VIDEO: u32 = 0x2b5fa8;76+ pub const FG_DISABLED: u32 = 0x6c7a8b;
62-pub const CLIP_AUDIO: u32 = 0x276b43;77+
63-pub const CLIP_IMAGE: u32 = 0x1a6a6a;78+ // -- interaction ------------------------------------------------------------
64-pub const CLIP_TEXT: u32 = 0x6b46c1;79+ pub const ACCENT_PRIMARY: u32 = 0x22d3ee;
80+ /// The accent under the pointer: lighter, still the accent.
81+ pub const ACCENT_HOVER: u32 = 0x67e8f9;
82+ /// Not the accent: the playhead crosses every clip colour there is and has
83+ /// to stay the one line that is none of them.
84+ pub const ACCENT_PLAYHEAD: u32 = 0xff9db0;
85+ /// The accent as a translucent wash, for the marks drawn over a clip body.
86+ pub const ACCENT_WASH: u32 = 0x22d3eeaa;
87+
88+ // -- clip kinds (cross-NLE convention) --------------------------------------
89+ pub const CLIP_VIDEO: u32 = 0x2b5fa8;
90+ pub const CLIP_AUDIO: u32 = 0x276b43;
91+ pub const CLIP_IMAGE: u32 = 0x1a6a6a;
92+ pub const CLIP_TEXT: u32 = 0x6b46c1;
93+
94+ /// One per source, so a clip that came from an imported file reads as coming
95+ /// from somewhere else than its neighbour. The *kind* is the body colour now
96+ /// ([`super::clip_kind`]); this is the identity stripe and the library
97+ /// swatch, and it only has to be four things telling each other apart.
98+ pub const SOURCE_TINTS: [u32; 4] = [0x4f8fd6, 0xd69a4f, 0x4fd6a8, 0xb14fd6];
99+
100+ // -- feedback ---------------------------------------------------------------
101+ pub const STATUS_ERROR: u32 = 0xef4444;
102+ pub const STATUS_WARNING: u32 = 0xf59e0b;
103+ pub const STATUS_SUCCESS: u32 = 0x34d399;
104+ pub const STATUS_PROGRESS: u32 = ACCENT_PRIMARY;
105+ /// The mirror of [`BG_SELECTED`]: a drop the lane will not take, tinting the
106+ /// shadow the drag draws so a refusal is seen before the release.
107+ pub const DROP_REFUSE: u32 = 0x8f2740;
108+
109+ // -- subtitles (drawn over the picture, so they own their own contrast) -----
110+ pub const SUB_FG: u32 = 0xffffff;
111+ pub const SUB_SHADE: u32 = 0x000000cc;
112+
113+ // -- the equalizer graph and the histogram ----------------------------------
114+ pub const EQ_GRID: u32 = 0x2a3442;
115+ pub const EQ_SPECTRUM_INK: u32 = 0x7f95ad66;
116+ pub const EQ_FILL_INK: u32 = 0x22d3ee26;
117+ pub const EQ_BELL_INK: u32 = 0x22d3ee66;
118+ pub const HIST_INK: [u32; 3] = [0xE0_5A_5A, 0x5A_D0_7A, 0x5A_9A_E0];
119+}
120+
121+/// Family A: a warm consumer-editor ground (Movavi's bed, CapCut's saturation)
122+/// with one coral accent that is never used for anything but "this is live,
123+/// press this". Same roles, same measured floors, different numbers.
124+pub mod warm {
125+ // -- surfaces ---------------------------------------------------------------
126+ pub const BG_CANVAS: u32 = 0x0c0a09;
127+ pub const BG_PANEL: u32 = 0x1d1917;
128+ pub const BG_RAISED: u32 = 0x383029;
129+ pub const BG_TIMELINE: u32 = 0x151211;
130+ pub const BG_HOVER: u32 = 0x4a413b;
131+ pub const BG_HOVER_DIM: u32 = 0x241f1d;
132+ /// Darker than the family it came from: at V3's own `0x7a3a1c` the secondary
133+ /// ink on a picked row measures 4.09:1 and WCAG 1.4.3 wants 4.5, which the
134+ /// cool table's guard caught the moment this became a second palette.
135+ pub const BG_SELECTED: u32 = 0x6a3118;
136+ pub const SCRIM: u32 = 0x0c0a09cc;
137+ pub const SCRIM_LIGHT: u32 = 0x0c0a0955;
138+
139+ // -- strokes ----------------------------------------------------------------
140+ pub const STROKE_DIVIDER: u32 = 0x3a322e;
141+ pub const STROKE_FOCUS: u32 = 0xffc38a;
142+ pub const STROKE_SELECTED: u32 = ACCENT_PRIMARY;
143+
144+ // -- text -------------------------------------------------------------------
145+ pub const FG_PRIMARY: u32 = 0xf2ece6;
146+ pub const FG_SECONDARY: u32 = 0xbdb1a8;
147+ pub const FG_DISABLED: u32 = 0x8a7f78;
148+
149+ // -- interaction ------------------------------------------------------------
150+ pub const ACCENT_PRIMARY: u32 = 0xff7a45;
151+ pub const ACCENT_HOVER: u32 = 0xff9a6e;
152+ /// Warmer still than the accent, because it crosses everything the accent is
153+ /// drawn on and has to stay findable over a selected clip.
154+ pub const ACCENT_PLAYHEAD: u32 = 0xffc23a;
155+ pub const ACCENT_WASH: u32 = 0xff7a45aa;
156+
157+ // -- clip kinds (the same cross-NLE convention, at this family's weight) ----
158+ pub const CLIP_VIDEO: u32 = 0x2b4c7e;
159+ pub const CLIP_AUDIO: u32 = 0x2c5a3a;
160+ pub const CLIP_IMAGE: u32 = 0x1f5560;
161+ pub const CLIP_TEXT: u32 = 0x4a3070;
162+
163+ /// Warm-side identity stripes: the same four-way distinctness the cool
164+ /// family's are held to, in hues that belong to this ground.
165+ pub const SOURCE_TINTS: [u32; 4] = [0xe08a4f, 0x4fa8d6, 0x8fc94f, 0xd67aa8];
166+
167+ // -- feedback ---------------------------------------------------------------
168+ pub const STATUS_ERROR: u32 = 0xc85050;
169+ pub const STATUS_WARNING: u32 = 0xe0a53a;
170+ pub const STATUS_SUCCESS: u32 = 0x4fbf72;
171+ pub const STATUS_PROGRESS: u32 = ACCENT_PRIMARY;
172+ pub const DROP_REFUSE: u32 = 0x8a2f24;
173+
174+ // -- subtitles --------------------------------------------------------------
175+ pub const SUB_FG: u32 = 0xffffff;
176+ pub const SUB_SHADE: u32 = 0x000000cc;
177+
178+ // -- the equalizer graph and the histogram ----------------------------------
179+ pub const EQ_GRID: u32 = 0x4a413b;
180+ pub const EQ_SPECTRUM_INK: u32 = 0xbdb1a866;
181+ pub const EQ_FILL_INK: u32 = 0xff7a4526;
182+ pub const EQ_BELL_INK: u32 = 0xff7a4566;
183+ pub const HIST_INK: [u32; 3] = [0xE0_5A_5A, 0x5A_D0_7A, 0x5A_9A_E0];
184+}
185+
186+/// The box a button's glyph sits in, whatever the glyph happens to measure: the
187+/// pause bars are 12 px wide and the play triangle 11, and a button that resized
188+/// itself when it was pressed moved every button to its right.
189+pub const GLYPH_SLOT: f32 = 14.;
190+
191+/// How solid the shadow a drag draws is (`0xRRGGBBAA`): enough to read as a box,
192+/// little enough that the clip under it is still legible. Not a colour, so both
193+/// families share it.
194+pub const GHOST_ALPHA: u32 = 0x66;
65 195
66 /// What a clip on `kind` is painted: the timeline's whole colour language in196 /// What a clip on `kind` is painted: the timeline's whole colour language in
67 /// one call, so a lane added later cannot invent a shade of its own.197 /// one call, so a lane added later cannot invent a shade of its own.
@@ -73,17 +203,6 @@ pub const fn clip_kind(kind: LaneKind, image: bool) -> u32 {
73 }203 }
74 }204 }
75 205
76-/// One per source, so a clip that came from an imported file reads as coming
77-/// from somewhere else than its neighbour. The *kind* is the body colour now
78-/// ([`clip_kind`]); this is the identity stripe and the library swatch, and it
79-/// only has to be four things telling each other apart.
80-pub const SOURCE_TINTS: [u32; 4] = [0x4f8fd6, 0xd69a4f, 0x4fd6a8, 0xb14fd6];
81-
82-// -- feedback -----------------------------------------------------------------
83-pub const STATUS_ERROR: u32 = 0xef4444;
84-pub const STATUS_WARNING: u32 = 0xf59e0b;
85-pub const STATUS_SUCCESS: u32 = 0x34d399;
86-pub const STATUS_PROGRESS: u32 = ACCENT_PRIMARY;
87 /// Which of the feedback colours a message wears. Read off the words rather206 /// Which of the feedback colours a message wears. Read off the words rather
88 /// than carried alongside them: every message in this editor already opens with207 /// than carried alongside them: every message in this editor already opens with
89 /// what it is ("EXPORT DONE", "SCAN FAILED", "NOTHING DETACHED"), and a second208 /// what it is ("EXPORT DONE", "SCAN FAILED", "NOTHING DETACHED"), and a second
@@ -106,24 +225,6 @@ pub fn notice_tone(message: &str) -> u32 {
106 }225 }
107 }226 }
108 227
109-/// The mirror of [`BG_SELECTED`]: a drop the lane will not take, tinting the
110-/// shadow the drag draws so a refusal is seen before the release.
111-pub const DROP_REFUSE: u32 = 0x8f2740;
112-/// How solid that shadow is (`0xRRGGBBAA`): enough to read as a box, little
113-/// enough that the clip under it is still legible.
114-pub const GHOST_ALPHA: u32 = 0x66;
115-
116-// -- subtitles (drawn over the picture, so they own their own contrast) --------
117-pub const SUB_FG: u32 = 0xffffff;
118-pub const SUB_SHADE: u32 = 0x000000cc;
119-
120-// -- the equalizer graph and the histogram ------------------------------------
121-pub const EQ_GRID: u32 = 0x2a3442;
122-pub const EQ_SPECTRUM_INK: u32 = 0x7f95ad66;
123-pub const EQ_FILL_INK: u32 = 0x22d3ee26;
124-pub const EQ_BELL_INK: u32 = 0x22d3ee66;
125-pub const HIST_INK: [u32; 3] = [0xE0_5A_5A, 0x5A_D0_7A, 0x5A_9A_E0];
126-
127 // -- geometry the four regions are laid out on --------------------------------228 // -- geometry the four regions are laid out on --------------------------------
128 /// Compact density: 11-13 px text, 28 px controls, 8 px gutters. The floor the229 /// Compact density: 11-13 px text, 28 px controls, 8 px gutters. The floor the
129 /// whole window is measured at is 640x360, and airy spacing loses a region.230 /// whole window is measured at is 640x360, and airy spacing loses a region.
@@ -136,6 +237,3 @@ pub const INSPECTOR_FRAC: f32 = 0.24;
136 pub fn inspector_w(window_w: f32) -> f32 {237 pub fn inspector_w(window_w: f32) -> f32 {
137 (window_w * INSPECTOR_FRAC).clamp(INSPECTOR_MIN_W, INSPECTOR_MAX_W)238 (window_w * INSPECTOR_FRAC).clamp(INSPECTOR_MIN_W, INSPECTOR_MAX_W)
138 }239 }
139-/// The lighter scrim: the picker list floats over a card that is still being
140-/// read, so it dims rather than hides.
141-pub const SCRIM_LIGHT: u32 = 0x0b0d1055;
crates/app/src/ui/toolbar.rsmodified+3 -0
@@ -249,6 +249,7 @@ impl Player {
249 .items_center()249 .items_center()
250 .gap(px(8.))250 .gap(px(8.))
251 .overflow_x_scroll()251 .overflow_x_scroll()
252+ .child(group_label("Edit"))
252 .child(self.action_control(253 .child(self.action_control(
253 "cut",254 "cut",
254 0.,255 0.,
@@ -280,6 +281,7 @@ impl Player {
280 cx.listener(|this, _: &ClickEvent, _, cx| this.undo(cx)),281 cx.listener(|this, _: &ClickEvent, _, cx| this.undo(cx)),
281 ))282 ))
282 .child(separator())283 .child(separator())
284+ .child(group_label("Track"))
283 .child(self.action_control(285 .child(self.action_control(
284 "add-video-lane",286 "add-video-lane",
285 0.,287 0.,
@@ -317,6 +319,7 @@ impl Player {
317 }),319 }),
318 ))320 ))
319 .child(separator())321 .child(separator())
322+ .child(group_label("View"))
320 // Both toggles keep a rect of their own: the label is the323 // Both toggles keep a rect of their own: the label is the
321 // state, and a state that resized its own button is what324 // state, and a state that resized its own button is what
322 // made the row shuffle every time it was pressed.325 // made the row shuffle every time it was pressed.
crates/app/src/ui/widgets.rsmodified+33 -2
@@ -73,13 +73,33 @@ pub(crate) fn control(
73 .rounded(px(4.))73 .rounded(px(4.))
74 .bg(rgb(bg))74 .bg(rgb(bg))
75 .when(bg == ACCENT_PRIMARY, |d| d.text_color(rgb(BG_CANVAS)))75 .when(bg == ACCENT_PRIMARY, |d| d.text_color(rgb(BG_CANVAS)))
76- .children(glyph)76+ // A glyph sits in a box of its own width, never in the width it happens
77+ // to draw: the pause bars are 12 px wide and the play triangle is 11, so
78+ // pressing Play used to slide every button in the row one pixel left. A
79+ // slot is the only fix that holds for the next glyph as well as this one.
80+ .children(glyph.map(|glyph| {
81+ div()
82+ .flex_none()
83+ .w(px(GLYPH_SLOT))
84+ .flex()
85+ .items_center()
86+ .justify_center()
87+ .child(glyph)
88+ }))
77 .child(label)89 .child(label)
78 .tooltip(move |_, cx| cx.new(|_| Tip(tip.clone())).into())90 .tooltip(move |_, cx| cx.new(|_| Tip(tip.clone())).into())
79 .when(!enabled, |d| d.opacity(0.4).cursor_not_allowed())91 .when(!enabled, |d| d.opacity(0.4).cursor_not_allowed())
80 .when(enabled, |d| {92 .when(enabled, |d| {
93+ // An accented button keeps its accent under the pointer: hovering it
94+ // to the chrome's own hover colour reads as the primary action
95+ // turning itself off.
81 d.cursor_pointer()96 d.cursor_pointer()
82- .hover(|s| s.bg(rgb(BG_HOVER)))97+ .hover(move |s| {
98+ s.bg(rgb(match bg == ACCENT_PRIMARY {
99+ true => ACCENT_HOVER,
100+ false => BG_HOVER,
101+ }))
102+ })
83 .on_click(on_click)103 .on_click(on_click)
84 })104 })
85 }105 }
@@ -138,6 +158,17 @@ pub(crate) fn volume_slider(
138 }158 }
139 159
140 /// The line between two groups of buttons.160 /// The line between two groups of buttons.
161+/// What a group of buttons is *for*, printed in front of it. A toolbar of
162+/// twelve unlabelled boxes is a toolbar nobody reads twice; three named groups
163+/// are three things to skip.
164+pub(crate) fn group_label(name: &'static str) -> impl IntoElement {
165+ div()
166+ .flex_none()
167+ .text_size(px(10.))
168+ .text_color(rgb(FG_SECONDARY))
169+ .child(name)
170+}
171+
141 pub(crate) fn separator() -> impl IntoElement {172 pub(crate) fn separator() -> impl IntoElement {
142 div()173 div()
143 .flex_none()174 .flex_none()