S034: screenshot matrix and UI review fixes
--matrix renders every screen light/dark, hovered/pressed, empty/full and at 720x480. Fixes: breadcrumb overflow mark, compact toolbar, names-only narrow panes, short-window dialogs, scrolling settings pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
cf70592958
commit
b042dfe29c
14 changed files with 431 additions and 22 deletions
|
|
@ -96,6 +96,7 @@ Never modify: `PROMPT.md` (the user's brief), the user's other projects under `~
|
|||
| `TUNAL_PLAY=<audio file> XDG_CONFIG_HOME=<scratch> cargo run -p tunal -- <dir> --screenshot <png> [--dark] --size 1200x760` | player bar open on that file, a third in (tags, cover, waveform read at once; no audio output) | S023 |
|
||||
| `TUNAL_TAGS=editor\|lookup\|mapping\|apply:<file>:<file> TUNAL_TAGS_SYNC=1 TUNAL_MUSICBRAINZ=<mock url> XDG_CONFIG_HOME=<scratch> cargo run -p tunal -- <dir> --screenshot <png> --size 1000x760` | tag editor / lookup / mapping over a folder; `apply` also writes the tags (scratch copies only); mock = a local server for both services | S021 |
|
||||
| `cargo run -p tunal -- --gallery --page connection\|host-key\|secret --screenshot <png> [--dark] --size 960x640` | the connection editor, the unknown-host-key prompt, the password prompt over a stand-in folder; with a scratch `HOME` (own `.ssh/config`, key) and `XDG_CONFIG_HOME` holding `tunal/connections.toml`, `session.toml` (pane `sftp://…`) and a trusted `known_hosts`, a normal `--screenshot` shows the Network section and an SFTP folder (local sshd on a spare port only) | S029 |
|
||||
| `cargo build -p tunal && target/debug/tunal --matrix <dir>` (about 1.5 min) | screenshot matrix: shell full/grid/empty/split, row hover/pressed/selected, context menu, drag, rename, properties, open-with, delete, appearance, player, tag editor, settings pages 0–5, gallery pages, light + dark, 720x480 minimum; stand-in folder in `<dir>/fixture`, config in `<dir>/config`. Hooks: `TUNAL_POINTER=x,y[,press\|click\|menu]` (hover/press/select/right-click before the frame), `TUNAL_ACTION=<action id>` (runs a menu action on the selection) | S034 |
|
||||
|
||||
Don't assume a tool exists: check first. When your plan creates a tool, add its row here.
|
||||
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@ The full screenshot matrix (D-003 checks moved here by D-013) and an `/unslop` p
|
|||
CLAUDE.md §2 Motion rules, §5; `app-taste` skill; PROMPT.md §Appearance and motion.
|
||||
|
||||
## Steps
|
||||
- [ ] Extend `--screenshot` into a matrix command: every screen × light/dark × hover/pressed × empty/full × minimum window size; update its CLAUDE.md §5 row.
|
||||
- [ ] Render the matrix and look at every PNG; list issues.
|
||||
- [ ] Run `/unslop` on the screens; apply its fixes in token/component code.
|
||||
- [ ] Re-render; check tokens-only with the grep from earlier plans.
|
||||
- [ ] PROGRESS entry, INDEX line, commit `S034: …`
|
||||
- [x] Extend `--screenshot` into a matrix command: every screen × light/dark × hover/pressed × empty/full × minimum window size; update its CLAUDE.md §5 row.
|
||||
- [x] Render the matrix and look at every PNG; list issues.
|
||||
- [x] Run `/unslop` on the screens; apply its fixes in token/component code.
|
||||
- [x] Re-render; check tokens-only with the grep from earlier plans.
|
||||
- [x] PROGRESS entry, INDEX line, commit `S034: …`
|
||||
|
||||
## End criteria
|
||||
- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass.
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ Tracker: https://claude.ai/artifact/4X8YCk3cQjUGyuyCqGuU7v
|
|||
|
||||
- [x] [S032 — Automated tests: core, ops, trash, dirmeta, elevation protocol](12%20Testing/S032-tests-core.md) · Sonnet high
|
||||
- [ ] [S033 — Automated tests: thumbs, tags, MusicBrainz, player, ssh, SFTP, MTP](12%20Testing/S033-tests-media-net-devices.md) · Sonnet high
|
||||
- [ ] [S034 — Screenshot matrix and UI review](12%20Testing/S034-ui-review.md) · Opus high
|
||||
- [x] [S034 — Screenshot matrix and UI review](12%20Testing/S034-ui-review.md) · Opus high
|
||||
- [ ] [S035 — Motion audit and visual sign-off](12%20Testing/S035-motion-audit.md) · Opus high 🧑
|
||||
- [ ] [S036 — Real-world checks with the user](12%20Testing/S036-real-world-checks.md) · Opus high 🧑
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,8 @@ use tunal_core::{Locations, Uri};
|
|||
slint::include_modules!();
|
||||
|
||||
const USAGE: &str = "usage: tunal [<folder>…] [--split <folder> <folder>] \
|
||||
[--gallery [--page menu|dialog|connection|host-key|secret]] [--screenshot <png> [--dark] [--size WxH]]";
|
||||
[--gallery [--page menu|dialog|connection|host-key|secret]] [--screenshot <png> [--dark] [--size WxH]] \
|
||||
| --matrix <dir>";
|
||||
|
||||
fn main() -> ExitCode {
|
||||
// Root helper (`pkexec tunal --elevated-helper`): before any UI, theme or env lookups.
|
||||
|
|
@ -39,7 +40,21 @@ fn main() -> ExitCode {
|
|||
Err(_) => ExitCode::FAILURE,
|
||||
};
|
||||
}
|
||||
let result = parse(std::env::args().skip(1)).and_then(|args| match args.screenshot {
|
||||
let mut argv = std::env::args().skip(1);
|
||||
if std::env::args().nth(1).as_deref() == Some("--matrix") {
|
||||
let result = match (argv.nth(1), argv.next()) {
|
||||
(Some(dir), None) => screenshot::matrix(std::path::Path::new(&dir)),
|
||||
_ => Err(USAGE.into()),
|
||||
};
|
||||
return match result {
|
||||
Ok(()) => ExitCode::SUCCESS,
|
||||
Err(message) => {
|
||||
eprintln!("tunal: {message}");
|
||||
ExitCode::FAILURE
|
||||
}
|
||||
};
|
||||
}
|
||||
let result = parse(argv).and_then(|args| match args.screenshot {
|
||||
None if args.gallery => gallery(args.page).and_then(run).map_err(|e| e.to_string()),
|
||||
None => window(args.tabs, false)
|
||||
.and_then(|(ui, shell)| {
|
||||
|
|
@ -64,6 +79,13 @@ fn main() -> ExitCode {
|
|||
|| {
|
||||
if let Some(shell) = shell.borrow().as_ref() {
|
||||
shell.settle_thumbs();
|
||||
// `TUNAL_ACTION=<id>` runs a menu action on what `TUNAL_POINTER` selected.
|
||||
if let Some(action) = std::env::var("TUNAL_ACTION")
|
||||
.ok()
|
||||
.and_then(|id| actions::Action::from_id(&id))
|
||||
{
|
||||
shell.run_action(action);
|
||||
}
|
||||
}
|
||||
},
|
||||
)
|
||||
|
|
|
|||
|
|
@ -56,13 +56,20 @@ pub fn run<C: Themed>(
|
|||
window.set_size(PhysicalSize::new(width, height));
|
||||
ui.show().map_err(|e| e.to_string())?;
|
||||
let mut pixels = vec![PremultipliedRgbaColor::default(); (width * height) as usize];
|
||||
if let Ok(spec) = std::env::var("TUNAL_DRAG") {
|
||||
let drag_spec = std::env::var("TUNAL_DRAG").ok();
|
||||
let pointer_spec = std::env::var("TUNAL_POINTER").ok();
|
||||
if drag_spec.is_some() || pointer_spec.is_some() {
|
||||
// Lay the window out before pointing at it.
|
||||
window.draw_if_needed(|renderer| {
|
||||
renderer.render(&mut pixels, width as usize);
|
||||
});
|
||||
}
|
||||
if let Some(spec) = drag_spec {
|
||||
drag(&window, &spec);
|
||||
}
|
||||
if let Some(spec) = pointer_spec {
|
||||
pointer(&window, &spec);
|
||||
}
|
||||
// Lay the window out once so the views report what they show, then let work they asked
|
||||
// for (thumbnails) finish before the frame.
|
||||
window.draw_if_needed(|renderer| {
|
||||
|
|
@ -112,6 +119,324 @@ fn drag(window: &MinimalSoftwareWindow, spec: &str) {
|
|||
slint::platform::update_timers_and_animations();
|
||||
}
|
||||
|
||||
/// `TUNAL_POINTER=x,y[,press|click|menu]`: hovers a window point, or holds the button
|
||||
/// down there (`press`), clicks it (`click`, selects a row) or right-clicks it (`menu`).
|
||||
fn pointer(window: &MinimalSoftwareWindow, spec: &str) {
|
||||
use slint::LogicalPosition;
|
||||
use slint::platform::{PointerEventButton, WindowEvent};
|
||||
let parts: Vec<&str> = spec.split(',').map(str::trim).collect();
|
||||
let n: Vec<f32> = parts.iter().filter_map(|p| p.parse().ok()).collect();
|
||||
let [x, y] = n[..] else {
|
||||
eprintln!("tunal: TUNAL_POINTER wants x,y[,press|click|menu]");
|
||||
return;
|
||||
};
|
||||
let position = LogicalPosition::new(x, y);
|
||||
window.dispatch_event(WindowEvent::PointerMoved { position });
|
||||
let (button, release) = match parts.get(2) {
|
||||
Some(&"press") => (PointerEventButton::Left, false),
|
||||
Some(&"click") => (PointerEventButton::Left, true),
|
||||
Some(&"menu") => (PointerEventButton::Right, true),
|
||||
_ => {
|
||||
slint::platform::update_timers_and_animations();
|
||||
return;
|
||||
}
|
||||
};
|
||||
window.dispatch_event(WindowEvent::PointerPressed { position, button });
|
||||
if release {
|
||||
window.dispatch_event(WindowEvent::PointerReleased { position, button });
|
||||
}
|
||||
slint::platform::update_timers_and_animations();
|
||||
}
|
||||
|
||||
/// One screenshot of the matrix: a name, the arguments after the output path and its env.
|
||||
struct Cell {
|
||||
name: &'static str,
|
||||
args: Vec<String>,
|
||||
env: Vec<(&'static str, String)>,
|
||||
/// Also rendered dark.
|
||||
dark: bool,
|
||||
}
|
||||
|
||||
/// `tunal --matrix <dir>`: renders every screen (shell, views, dialogs, settings pages,
|
||||
/// gallery) light and dark, hovered and pressed, empty and full, and at the smallest window
|
||||
/// size into `<dir>`, one child process per PNG over a stand-in folder in `<dir>/fixture`.
|
||||
pub fn matrix(dir: &Path) -> Result<(), String> {
|
||||
let exe = std::env::current_exe().map_err(|e| e.to_string())?;
|
||||
let fixture = dir.join("fixture");
|
||||
let full = fixture.join("Project files");
|
||||
let empty = fixture.join("Empty folder");
|
||||
let config = dir.join("config");
|
||||
let song = full.join("Evening tide.flac");
|
||||
fixture_files(&full, &empty, &config, &song).map_err(|e| format!("fixture: {e}"))?;
|
||||
let s = |p: &Path| p.display().to_string();
|
||||
let a = |list: &[&str]| list.iter().map(|x| x.to_string()).collect::<Vec<_>>();
|
||||
let shell = |name, args: Vec<String>, env: Vec<(&'static str, String)>, dark| Cell {
|
||||
name,
|
||||
args,
|
||||
env,
|
||||
dark,
|
||||
};
|
||||
let folder = vec![s(&full)];
|
||||
let sized = |size: &str| [folder.clone(), a(&["--size", size])].concat();
|
||||
let normal = sized("1200x760");
|
||||
let min = sized("720x480");
|
||||
let on = |key: &'static str, value: &str| vec![(key, value.to_string())];
|
||||
// A file row, the second in the details view at 1200x760.
|
||||
let row = "520,170";
|
||||
let mut cells = vec![
|
||||
shell("shell-full", normal.clone(), vec![], true),
|
||||
shell("shell-grid", normal.clone(), on("TUNAL_VIEW", "grid"), true),
|
||||
shell(
|
||||
"shell-empty",
|
||||
[vec![s(&empty)], a(&["--size", "1200x760"])].concat(),
|
||||
vec![],
|
||||
true,
|
||||
),
|
||||
shell(
|
||||
"shell-split",
|
||||
[
|
||||
a(&["--split"]),
|
||||
vec![s(&full), s(&empty)],
|
||||
a(&["--size", "1200x760"]),
|
||||
]
|
||||
.concat(),
|
||||
vec![],
|
||||
true,
|
||||
),
|
||||
shell("shell-min", min.clone(), vec![], true),
|
||||
shell(
|
||||
"shell-min-split",
|
||||
[
|
||||
a(&["--split"]),
|
||||
vec![s(&full), s(&empty)],
|
||||
a(&["--size", "720x480"]),
|
||||
]
|
||||
.concat(),
|
||||
vec![],
|
||||
false,
|
||||
),
|
||||
shell("row-hover", normal.clone(), on("TUNAL_POINTER", row), true),
|
||||
shell(
|
||||
"row-pressed",
|
||||
normal.clone(),
|
||||
on("TUNAL_POINTER", &format!("{row},press")),
|
||||
true,
|
||||
),
|
||||
shell(
|
||||
"row-selected",
|
||||
normal.clone(),
|
||||
on("TUNAL_POINTER", &format!("{row},click")),
|
||||
false,
|
||||
),
|
||||
shell(
|
||||
"context-menu",
|
||||
normal.clone(),
|
||||
on("TUNAL_POINTER", &format!("{row},menu")),
|
||||
true,
|
||||
),
|
||||
shell(
|
||||
"drag-hold",
|
||||
normal.clone(),
|
||||
on("TUNAL_DRAG", "520,170,520,240,hold"),
|
||||
false,
|
||||
),
|
||||
shell(
|
||||
"rename",
|
||||
normal.clone(),
|
||||
[
|
||||
on("TUNAL_POINTER", &format!("{row},click")),
|
||||
on("TUNAL_ACTION", "rename"),
|
||||
]
|
||||
.concat(),
|
||||
false,
|
||||
),
|
||||
shell(
|
||||
"properties",
|
||||
normal.clone(),
|
||||
[
|
||||
on("TUNAL_POINTER", &format!("{row},click")),
|
||||
on("TUNAL_ACTION", "properties"),
|
||||
]
|
||||
.concat(),
|
||||
true,
|
||||
),
|
||||
shell(
|
||||
"properties-min",
|
||||
min.clone(),
|
||||
[
|
||||
on("TUNAL_POINTER", "420,170,click"),
|
||||
on("TUNAL_ACTION", "properties"),
|
||||
]
|
||||
.concat(),
|
||||
false,
|
||||
),
|
||||
shell(
|
||||
"open-with",
|
||||
normal.clone(),
|
||||
[
|
||||
on("TUNAL_POINTER", &format!("{row},click")),
|
||||
on("TUNAL_ACTION", "open-with"),
|
||||
]
|
||||
.concat(),
|
||||
true,
|
||||
),
|
||||
shell(
|
||||
"delete-confirm",
|
||||
normal.clone(),
|
||||
[
|
||||
on("TUNAL_POINTER", &format!("{row},click")),
|
||||
on("TUNAL_ACTION", "delete"),
|
||||
]
|
||||
.concat(),
|
||||
true,
|
||||
),
|
||||
shell(
|
||||
"appearance",
|
||||
normal.clone(),
|
||||
on("TUNAL_APPEARANCE", "1"),
|
||||
true,
|
||||
),
|
||||
shell("player", normal.clone(), on("TUNAL_PLAY", &s(&song)), true),
|
||||
shell(
|
||||
"tag-editor",
|
||||
normal.clone(),
|
||||
[
|
||||
on("TUNAL_TAGS", &format!("editor:{}", s(&song))),
|
||||
on("TUNAL_TAGS_SYNC", "1"),
|
||||
]
|
||||
.concat(),
|
||||
true,
|
||||
),
|
||||
];
|
||||
for page in 0..=5 {
|
||||
let name = [
|
||||
"settings-0",
|
||||
"settings-1",
|
||||
"settings-2",
|
||||
"settings-3",
|
||||
"settings-4",
|
||||
"settings-5",
|
||||
][page];
|
||||
cells.push(shell(
|
||||
name,
|
||||
normal.clone(),
|
||||
on("TUNAL_SETTINGS", &page.to_string()),
|
||||
true,
|
||||
));
|
||||
}
|
||||
cells.push(shell("settings-min", min, on("TUNAL_SETTINGS", "0"), false));
|
||||
for (name, page) in [
|
||||
("gallery-menu", "menu"),
|
||||
("gallery-dialog", "dialog"),
|
||||
("gallery-connection", "connection"),
|
||||
("gallery-host-key", "host-key"),
|
||||
("gallery-secret", "secret"),
|
||||
] {
|
||||
cells.push(shell(
|
||||
name,
|
||||
a(&["--gallery", "--page", page, "--size", "960x640"]),
|
||||
vec![],
|
||||
true,
|
||||
));
|
||||
}
|
||||
cells.push(shell(
|
||||
"gallery-controls",
|
||||
a(&["--gallery", "--size", "1200x1000"]),
|
||||
vec![],
|
||||
true,
|
||||
));
|
||||
|
||||
let mut failed = Vec::new();
|
||||
for cell in &cells {
|
||||
for dark in [false, true] {
|
||||
if dark && !cell.dark {
|
||||
continue;
|
||||
}
|
||||
let png = dir.join(format!(
|
||||
"{}-{}.png",
|
||||
cell.name,
|
||||
if dark { "dark" } else { "light" }
|
||||
));
|
||||
let mut command = std::process::Command::new(&exe);
|
||||
command
|
||||
.args(&cell.args)
|
||||
.arg("--screenshot")
|
||||
.arg(&png)
|
||||
.env("XDG_CONFIG_HOME", &config)
|
||||
.env("TUNAL_REDUCED_MOTION", "1")
|
||||
.envs(cell.env.iter().map(|(k, v)| (k, v)));
|
||||
if dark {
|
||||
command.arg("--dark");
|
||||
}
|
||||
let ok = command.status().is_ok_and(|s| s.success()) && png.exists();
|
||||
println!("{} {}", if ok { "ok " } else { "FAIL" }, png.display());
|
||||
if !ok {
|
||||
failed.push(png.display().to_string());
|
||||
}
|
||||
}
|
||||
}
|
||||
if failed.is_empty() {
|
||||
Ok(())
|
||||
} else {
|
||||
Err(format!("{} screenshots failed", failed.len()))
|
||||
}
|
||||
}
|
||||
|
||||
/// The stand-in folders: a full one (folders, documents, images, an audio file with tags),
|
||||
/// an empty one, and a config folder with the user's places but no saved session.
|
||||
fn fixture_files(full: &Path, empty: &Path, config: &Path, song: &Path) -> std::io::Result<()> {
|
||||
std::fs::create_dir_all(empty)?;
|
||||
std::fs::create_dir_all(config.join("tunal"))?;
|
||||
if let Some(home) = std::env::var_os("HOME") {
|
||||
let dirs = Path::new(&home).join(".config/user-dirs.dirs");
|
||||
if dirs.exists() {
|
||||
std::fs::copy(dirs, config.join("user-dirs.dirs"))?;
|
||||
}
|
||||
}
|
||||
for name in ["Designs", "Invoices", "Photos 2026"] {
|
||||
std::fs::create_dir_all(full.join(name))?;
|
||||
}
|
||||
for (name, size) in [
|
||||
("Meeting notes.txt", 2_400),
|
||||
("Quarterly report.pdf", 482_000),
|
||||
("budget.ods", 31_000),
|
||||
("cover-draft.svg", 12_000),
|
||||
("install.sh", 900),
|
||||
("archive-2025.tar.gz", 8_400_000),
|
||||
(
|
||||
"A very long file name that keeps going well past the column width.md",
|
||||
1_200,
|
||||
),
|
||||
] {
|
||||
let path = full.join(name);
|
||||
if !path.exists() {
|
||||
std::fs::write(path, vec![b'x'; size])?;
|
||||
}
|
||||
}
|
||||
if !song.exists() {
|
||||
// A short tone with tags; skipped without ffmpeg (the player cells then fail).
|
||||
let _ = std::process::Command::new("ffmpeg")
|
||||
.args([
|
||||
"-loglevel",
|
||||
"error",
|
||||
"-f",
|
||||
"lavfi",
|
||||
"-i",
|
||||
"sine=frequency=330:duration=8",
|
||||
])
|
||||
.args([
|
||||
"-metadata",
|
||||
"title=Evening tide",
|
||||
"-metadata",
|
||||
"artist=Harbour Lights",
|
||||
])
|
||||
.args(["-metadata", "album=Low Water"])
|
||||
.arg(song)
|
||||
.status();
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn write_png(path: &Path, width: u32, height: u32, rgba: &[u8]) -> Result<(), png::EncodingError> {
|
||||
let mut encoder = png::Encoder::new(BufWriter::new(File::create(path)?), width, height);
|
||||
encoder.set_color(png::ColorType::Rgba);
|
||||
|
|
|
|||
|
|
@ -212,6 +212,17 @@ export component MainWindow inherits Window {
|
|||
// Sidebar.
|
||||
in property <[SidebarSection]> sections;
|
||||
in property <bool> show-sidebar: true;
|
||||
// Set after a resize, not bound: the window's size depends on the toolbar's buttons.
|
||||
property <bool> toolbar-compact;
|
||||
function fit-toolbar() {
|
||||
root.toolbar-compact = root.width - (root.show-sidebar ? 240px : 0) < Theme.toolbar-compact-width;
|
||||
}
|
||||
changed width => {
|
||||
root.fit-toolbar();
|
||||
}
|
||||
changed show-sidebar => {
|
||||
root.fit-toolbar();
|
||||
}
|
||||
in property <[MenuItem]> place-menu;
|
||||
callback toggle-sidebar();
|
||||
callback place-opened(int, int, bool);
|
||||
|
|
@ -495,6 +506,7 @@ export component MainWindow inherits Window {
|
|||
|
||||
VerticalLayout {
|
||||
toolbar := Toolbar {
|
||||
compact: root.toolbar-compact;
|
||||
can-back: root.can-back;
|
||||
can-forward: root.can-forward;
|
||||
can-up: root.can-up;
|
||||
|
|
|
|||
|
|
@ -142,7 +142,8 @@ export component Dialog inherits Overlay {
|
|||
spacing: Theme.space-4;
|
||||
|
||||
// The cookie turns into place as the dialog opens.
|
||||
if root.glyph != "": HorizontalLayout {
|
||||
// A short window drops the cookie so the content keeps its room.
|
||||
if root.glyph != "" && root.height >= Theme.dialog-cookie-min-height: HorizontalLayout {
|
||||
alignment: center;
|
||||
|
||||
Shape {
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ export global Icons {
|
|||
out property <string> expand-more: "\u{e5cf}";
|
||||
out property <string> side-navigation: "\u{e9e2}";
|
||||
out property <string> more-vert: "\u{e5d4}";
|
||||
out property <string> more-horiz: "\u{e5d3}";
|
||||
out property <string> drag-handle: "\u{e945}";
|
||||
out property <string> restore: "\u{e8b3}";
|
||||
out property <string> create-new-folder: "\u{e2cc}";
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import { ScrollView } from "std-widgets.slint";
|
||||
import { Theme } from "../theme.slint";
|
||||
import { Motion } from "../motion.slint";
|
||||
import { Dialog } from "../components/dialog.slint";
|
||||
|
|
@ -212,9 +213,10 @@ export component SettingsDialog inherits Dialog {
|
|||
root.closed();
|
||||
}
|
||||
|
||||
// The pages scroll when the window is too short for them.
|
||||
HorizontalLayout {
|
||||
spacing: Theme.space-4;
|
||||
height: 400px;
|
||||
height: min(400px, max(160px, root.height - 250px));
|
||||
|
||||
VerticalLayout {
|
||||
width: 168px;
|
||||
|
|
@ -234,6 +236,10 @@ export component SettingsDialog inherits Dialog {
|
|||
Rectangle {
|
||||
horizontal-stretch: 1;
|
||||
|
||||
if root.page < 5: ScrollView {
|
||||
VerticalLayout {
|
||||
alignment: start;
|
||||
|
||||
if root.page == 0: VerticalLayout {
|
||||
alignment: start;
|
||||
|
||||
|
|
@ -517,6 +523,9 @@ export component SettingsDialog inherits Dialog {
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if root.page == 5: MenuEditor {
|
||||
contexts: root.menu-contexts;
|
||||
context: root.menu-context;
|
||||
|
|
|
|||
|
|
@ -127,8 +127,10 @@ export component Breadcrumb inherits Rectangle {
|
|||
}
|
||||
|
||||
// Crumbs keep their natural width; when they don't fit, the first one elides, and past
|
||||
// that the row slides left so the current folder stays in view.
|
||||
if !root.editing: HorizontalLayout {
|
||||
// that the row slides left so the current folder stays in view, behind an ellipsis that
|
||||
// marks the hidden part (a click on it edits the path).
|
||||
if !root.editing: Rectangle {
|
||||
row := HorizontalLayout {
|
||||
x: min(0, root.width - self.width);
|
||||
width: max(root.width, self.min-width);
|
||||
padding-left: Theme.space-1;
|
||||
|
|
@ -168,6 +170,26 @@ export component Breadcrumb inherits Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
if row.x < 0: Rectangle {
|
||||
x: 0;
|
||||
width: Theme.space-8;
|
||||
background: Theme.surface-container-high;
|
||||
|
||||
Icon {
|
||||
glyph: Icons.more-horiz;
|
||||
size: 18px;
|
||||
color: Theme.on-surface-variant;
|
||||
}
|
||||
|
||||
TouchArea {
|
||||
mouse-cursor: MouseCursor.text;
|
||||
clicked => {
|
||||
root.edit();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
keys := FocusScope {
|
||||
visible: root.editing;
|
||||
enabled: root.editing;
|
||||
|
|
|
|||
|
|
@ -48,6 +48,9 @@ export component Toolbar inherits Rectangle {
|
|||
}
|
||||
|
||||
height: 56px;
|
||||
// A short bar (the smallest window) drops Forward (Alt+Right) and the previews toggle so
|
||||
// the path keeps its room. Set by the window: the bar's own width depends on its buttons.
|
||||
in property <bool> compact;
|
||||
|
||||
HorizontalLayout {
|
||||
padding-left: Theme.space-2;
|
||||
|
|
@ -81,7 +84,7 @@ export component Toolbar inherits Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
VerticalLayout {
|
||||
if !root.compact: VerticalLayout {
|
||||
alignment: center;
|
||||
IconButton {
|
||||
icon: Icons.arrow-forward;
|
||||
|
|
@ -110,8 +113,8 @@ export component Toolbar inherits Rectangle {
|
|||
VerticalLayout {
|
||||
alignment: center;
|
||||
horizontal-stretch: 1;
|
||||
padding-left: Theme.space-2;
|
||||
padding-right: Theme.space-2;
|
||||
padding-left: root.compact ? 0 : Theme.space-2;
|
||||
padding-right: root.compact ? 0 : Theme.space-2;
|
||||
|
||||
crumb := Breadcrumb {
|
||||
crumbs: root.crumbs;
|
||||
|
|
@ -142,7 +145,7 @@ export component Toolbar inherits Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
VerticalLayout {
|
||||
if !root.compact: VerticalLayout {
|
||||
alignment: center;
|
||||
IconButton {
|
||||
// `checked` is flipped by the click: follow `previews` again after it.
|
||||
|
|
|
|||
|
|
@ -100,6 +100,10 @@ export global Theme {
|
|||
out property <float> scrim-opacity: 0.32;
|
||||
// Gap kept between a floating surface and the window edge.
|
||||
out property <length> window-margin: 8px;
|
||||
// Below this window height dialogs drop their cookie; below this width the toolbar
|
||||
// drops its secondary buttons.
|
||||
out property <length> dialog-cookie-min-height: 560px;
|
||||
out property <length> toolbar-compact-width: 640px;
|
||||
|
||||
// Keyboard focus ring, drawn outside the control's shape.
|
||||
out property <length> focus-ring-width: 2px;
|
||||
|
|
|
|||
|
|
@ -437,6 +437,8 @@ export component DetailsView inherits Rectangle {
|
|||
|
||||
// Narrow views drop the Type column so names keep their room.
|
||||
property <bool> compact: root.width < 640px;
|
||||
// A narrow pane (split at the smallest window) shows only the names.
|
||||
property <bool> narrow: root.width < 400px;
|
||||
property <float> settle: Motion.settle(root.motion);
|
||||
|
||||
public function focus-view() {
|
||||
|
|
@ -537,7 +539,7 @@ export component DetailsView inherits Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
HeaderColumn {
|
||||
if !root.narrow: HeaderColumn {
|
||||
width: Columns.size;
|
||||
text: "Size";
|
||||
end-aligned: true;
|
||||
|
|
@ -560,7 +562,7 @@ export component DetailsView inherits Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
HeaderColumn {
|
||||
if !root.narrow: HeaderColumn {
|
||||
width: Columns.modified;
|
||||
text: "Modified";
|
||||
active: root.state.sort == SortColumn.modified;
|
||||
|
|
@ -696,7 +698,7 @@ export component DetailsView inherits Rectangle {
|
|||
root.row-activated(i);
|
||||
}
|
||||
|
||||
Cell {
|
||||
if !root.narrow: Cell {
|
||||
width: Columns.size;
|
||||
text: row.size;
|
||||
end-aligned: true;
|
||||
|
|
@ -709,7 +711,7 @@ export component DetailsView inherits Rectangle {
|
|||
color: row.selected ? Theme.on-secondary-container : Theme.on-surface-variant;
|
||||
}
|
||||
|
||||
Cell {
|
||||
if !root.narrow: Cell {
|
||||
width: Columns.modified;
|
||||
text: row.modified;
|
||||
color: row.selected ? Theme.on-secondary-container : Theme.on-surface-variant;
|
||||
|
|
|
|||
|
|
@ -259,6 +259,13 @@ One entry per session, newest last, ≤ 15 lines: done, verified how, not done,
|
|||
- Safety: trash tests hold one lock, and skip when a per-mount trash of the user is visible (`EmptyTrash` would delete it); none found on this machine.
|
||||
- Not done: permission tests skip as root; cross-device test skips when /dev/shm shares the temp device; no pkexec/polkit run; per-mount (`.Trash-$uid`) trash paths untested.
|
||||
|
||||
## S034 — Screenshot matrix and UI review
|
||||
- Done: `tunal --matrix <dir>` (screenshot.rs) renders 37 cells / 58 PNGs (every shell state, dialogs, settings pages, gallery; light + dark; 720x480) over a stand-in fixture, one child process each. New hooks `TUNAL_POINTER=x,y[,press|click|menu]`, `TUNAL_ACTION=<id>`. CLAUDE.md §5 row added.
|
||||
- Unslop (polish mode, D-035 look kept; design calls mine): breadcrumb overflow shows a `…` mark at the left edge (click edits); toolbar under `Theme.toolbar-compact-width` drops Forward + previews toggle (set from the window on resize: a binding would loop); details pane < 400 px shows names only; dialogs drop the cookie below `Theme.dialog-cookie-min-height`; settings pages scroll and fit at 720x480.
|
||||
- PNGs: before /tmp/claude-1000/-home-astar76-Projects-Tunal/9f8868e3-106e-44a3-ab18-75f381125aa4/scratchpad/before, after /tmp/claude-1000/-home-astar76-Projects-Tunal/9f8868e3-106e-44a3-ab18-75f381125aa4/scratchpad/after (contact sheets in /tmp/claude-1000/-home-astar76-Projects-Tunal/9f8868e3-106e-44a3-ab18-75f381125aa4/scratchpad/sheets).
|
||||
- Verified: workspace build, `clippy -p tunal --all-targets -D warnings`, fmt --check, literal grep empty. Workspace clippy fails only in S033's uncommitted `tunal-player/tests/waveform.rs` (manual_range_contains).
|
||||
- Not done: press squeeze not drawn by software renderer (pressed == hover in PNGs); conflict/errors dialogs have no hook (not in matrix); single-sentence captions keep their periods; Material You pink-tinted surfaces kept (D-035) though unslop prefers neutral.
|
||||
- Later: Network settings "Keep alive" subtitle elides (Setting subtitle should wrap); settings scrollbar sits tight to the switches.
|
||||
|
||||
## Later
|
||||
- (orchestrator) Breadcrumb: a long path is hard-clipped at the bar's left edge with no elision mark, and the root crumb elides at 960 px — for S034.
|
||||
-
|
||||
|
|
|
|||
Loading…
Reference in a new issue