Options bar: Brush and Eraser size go to 5000 px in every theme (#5708) (#5709)

Options bar: Brush and Eraser size go to 5000 px in every theme (#5708)

Also covers the same fix as #5724; thanks to its author.

Co-authored-by: nrq6993-a11y <342501791+nrq6993-a11y@users.noreply.github.com>
This commit is contained in:
David Mann
2026-10-14 15:04:09 -07:00
committed by GitHub
co-authored by nrq6993-a11y
parent 2807deb209
commit 772dfb9e7e
2 changed files with 16 additions and 1 deletions
+15
View File
@@ -399,6 +399,21 @@ fn brush_mode_dropdown_shows_outside_the_pro_themes() {
assert_eq!(j[n].0, "tools.setBrush");
}
#[test]
fn brush_and_eraser_size_fields_keep_sizes_above_2500_px() {
// #5708: outside the Pro themes the Size field capped at 2500 px and clamped a bigger brush
// (set from the picker or `]`) on the next frame; Photoshop and the engine allow 5000 px.
for tool in [crate::state::Tool::Brush, crate::state::Tool::Eraser] {
let mut h = options_bar_harness(tool);
let n = h.state().session.journal.len();
h.state_mut().session.tools.brush.size = 4000.0;
h.run_steps(4);
assert_eq!(h.state().session.tools.brush.size, 4000.0, "{tool:?}");
let j = &h.state().session.journal;
assert_eq!(j.len(), n, "showing the bar issues nothing: {:?}", &j[n..]);
}
}
#[test]
fn airbrush_smoothing_options_and_symmetry_buttons_work() {
// #1177: in the default (Photoshop) theme these options-bar buttons did nothing.