The clips screen lists the clips folder: one card per mp4 the user exported, newest first, with the clip's 16:9 stage, the champion it stars when its recording is in the loaded history, share, and a menu whose Delete removes the file. The folder read runs when the screen opens, and again when an export finishes on it. Computed highlights were the first plan for the grid, but a real history parses hundreds of timelines and some run to tens of MB, so the grid now reads only what the user actually exported.
59 lines
2.5 KiB
Rust
59 lines
2.5 KiB
Rust
//! The few shapes the app draws itself: transport arrows, a play triangle and pause bars.
|
|
//!
|
|
//! Rune renders an [`Icon`] from SVG paths tinted with the element's colour, so these are plain
|
|
//! geometry at a 16 point box and need no font behind them.
|
|
|
|
use rune::Icon;
|
|
|
|
pub static PLAY: Icon = Icon {
|
|
name: "app-play",
|
|
view: 16.0,
|
|
body: r#"<path d="M5.4 3.4 12.6 8 5.4 12.6Z" fill="currentColor"/>"#,
|
|
};
|
|
|
|
pub static PAUSE: Icon = Icon {
|
|
name: "app-pause",
|
|
view: 16.0,
|
|
body: r#"<rect x="5" y="3.6" width="2.4" height="8.8" rx="0.6" fill="currentColor"/><rect x="8.6" y="3.6" width="2.4" height="8.8" rx="0.6" fill="currentColor"/>"#,
|
|
};
|
|
|
|
/// Two triangles pointing back: a step of ten seconds, as the button says.
|
|
pub static BACK: Icon = Icon {
|
|
name: "app-back",
|
|
view: 16.0,
|
|
body: r#"<path d="M2.8 8 7.2 4.6v6.8Z" fill="currentColor"/><path d="M7.6 8 12 4.6v6.8Z" fill="currentColor"/>"#,
|
|
};
|
|
|
|
pub static FORWARD: Icon = Icon {
|
|
name: "app-forward",
|
|
view: 16.0,
|
|
body: r#"<path d="M13.2 8 8.8 4.6v6.8Z" fill="currentColor"/><path d="M8.4 8 4 4.6v6.8Z" fill="currentColor"/>"#,
|
|
};
|
|
|
|
/// One end of the clip: a single chevron, drawn on the scrubber over the knob.
|
|
pub static CHEVRON_LEFT: Icon = Icon {
|
|
name: "app-chevron-left",
|
|
view: 16.0,
|
|
body: r#"<path d="M10 3.6 5.4 8 10 12.4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>"#,
|
|
};
|
|
|
|
pub static CHEVRON_RIGHT: Icon = Icon {
|
|
name: "app-chevron-right",
|
|
view: 16.0,
|
|
body: r#"<path d="M6 3.6 10.6 8 6 12.4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>"#,
|
|
};
|
|
|
|
/// A box with an arrow out of the top: the button that will share a clip.
|
|
pub static SHARE: Icon = Icon {
|
|
name: "app-share",
|
|
view: 16.0,
|
|
body: r#"<path d="M8 9.4V2.4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M5.3 4.7 8 2l2.7 2.7" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M5.7 6.9H4.8c-1 0-1.8.8-1.8 1.8v3.5c0 1 .8 1.8 1.8 1.8h6.4c1 0 1.8-.8 1.8-1.8V8.7c0-1-.8-1.8-1.8-1.8h-.9" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>"#,
|
|
};
|
|
|
|
/// Three vertical dots: the button that opens a card's menu of actions.
|
|
pub static DOTS: Icon = Icon {
|
|
name: "app-dots",
|
|
view: 16.0,
|
|
body: r#"<circle cx="8" cy="3.6" r="1.7" fill="currentColor"/><circle cx="8" cy="8" r="1.7" fill="currentColor"/><circle cx="8" cy="12.4" r="1.7" fill="currentColor"/>"#,
|
|
};
|