Scroll to R before clicking it and document the new settings fields

This commit is contained in:
vangel76 committed 2026-11-25 00:56:49 +01:00
1 parent e016ba2f10
commit af296eb5bc
3 files changed
+12 -2

No files matched your search

+2 -1
View File
@@ -167,7 +167,8 @@ pub struct Prefs {
pub reserved_cores: u32,
/// Maximum decompressed project size accepted on open, in GiB (at least one).
pub project_open_limit_gib: u32,
/// Percent of the free RAM a project save may hold at once (desktop; 1 to 100).
/// Percent of the free RAM a project save may hold at once (desktop; 0 to 100, a save holds
/// at least 1).
pub save_ram_percent: u8,
/// Worker threads for painting, baking and export (desktop; 0: one per logical CPU). Read at
/// startup, before the first parallel job.
@@ -156,6 +156,8 @@ fn the_resource_sliders_step_by_one_and_follow_the_arrow_keys() {
let ram_percent = |h: &Harness<'_, TextureCraftApp>| h.state().ui.windows.settings_draft.as_ref().unwrap().prefs.save_ram_percent;
let before = ram_percent(&h);
h.get_by_role_and_label(Role::Slider, "Max RAM while saving").scroll_to_me();
h.run_steps(3);
h.get_by_role_and_label(Role::Slider, "Max RAM while saving").focus();
h.run_steps(2);
press_key(&mut h, Key::ArrowRight);
@@ -194,6 +196,9 @@ fn the_local_cache_directory_takes_a_folder_and_r_goes_back_to_the_default() {
type_into(&mut h, "Local cache directory", &folder);
assert_eq!(stored(&h), folder);
// The Files cache directory's R stays disabled; the local cache's R is the one that works
h.query_all_by_label("R").find(|node| !node.accesskit_node().is_disabled()).unwrap().scroll_to_me();
h.run_steps(3);
h.query_all_by_label("R").find(|node| !node.accesskit_node().is_disabled()).unwrap().click();
h.run_steps(3);
assert!(stored(&h).is_empty(), "R goes back to the default folder");
+5 -1
View File
@@ -326,7 +326,11 @@ Other preferences set through `ui.set {"prefs": {...}}`: `language` (`""` follow
language), `work_threads` (worker threads for painting, baking and export; 0 uses every logical
CPU; read at startup), `rotation_speed` (default 2), `zoom_speed` and `wheel_speed` (default 1,
each from 0.1 to 10) with `zoom_inverse` and `wheel_inverse`, `gpu_raytracing` (false keeps bake
rays on the CPU) and `libraries` (the folders the shelf scans for saved smart materials and masks).
rays on the CPU), `show_world_axes` (the 3D view's X, Y and Z corner, default true) and `libraries`
(the folders the shelf scans for saved smart materials and masks). `show_keyboard_helper`,
`only_selected_material_when_painting`, `save_preprocessed_scene_files`, `live_preview_baking` and
`local_cache_directory` (empty: the system's temporary folder) are kept for Settings but have no
effect yet.
For example, the `libraries` field can contain `[{"name": "Studio", "path": "/assets/studio"}]`.
Use an absolute path on the host running TextureCraft. To change one preference, read `state.prefs`
with `ui.inspect`, update that field and send the full `prefs` object to `ui.set`.