mirror of
https://github.com/storytold/soundcraft.git
synced 2026-11-16 15:22:28 +00:00
Edge the Universe's playback line so it reads over every track colour
The Universe paints clips in their raw track colours, and the neutral playback line is as light as some of them (1.1:1 over the first one in the dark theme): a dark edge on each side keeps it visible. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f3873d4e2c
commit
4f99e2a686
1 file changed
+5
-4
@@ -83,10 +83,11 @@ pub(super) fn universe(app: &mut SoundApp, ui: &mut Ui) {
|
||||
ui.painter().rect_stroke(vr, 2.0, Stroke::new(1.5, Tokens::current().universe_view), StrokeKind::Outside);
|
||||
if app.is_playing() {
|
||||
let x = r.min.x + app.position() as f32 / total * r.width();
|
||||
ui.painter().line_segment(
|
||||
[pos2(x, r.min.y), pos2(x, r.max.y)],
|
||||
Stroke::new(1.0, playhead_colour(&Tokens::current(), app.engine.transport.recording)),
|
||||
);
|
||||
let line = [pos2(x, r.min.y), pos2(x, r.max.y)];
|
||||
// The Universe paints clips in their raw track colours, some as light as the neutral playback line: a dark
|
||||
// edge on each side keeps it readable over all of them.
|
||||
ui.painter().line_segment(line, Stroke::new(3.0, Color32::from_black_alpha(160)));
|
||||
ui.painter().line_segment(line, Stroke::new(1.0, playhead_colour(&Tokens::current(), app.engine.transport.recording)));
|
||||
}
|
||||
let resp = ui.interact(r, ui.scope_id().with("universe"), Sense::click_and_drag());
|
||||
if let Some(p) = resp.interact_pointer_pos()
|
||||
|
||||
Reference in new issue
Block a user