4 Commits
Author SHA1 Message Date
Hoddcoderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>Claude Opus 5.5Brandon Thomas
d878e38333 Color pickers: pick on press and follow small drags (#7793) (#7822)
* Color pickers: pick on press and follow small drags (#7793)

The Color Picker dialog's field and slider, and the Color panel's
field and hue strip, only applied the colour on dragged()/clicked().
egui holds dragged() back until the pointer moves past its click
threshold (~6 pt) or is held a while, so a press picked nothing at
first and small adjustments jumped.

Add widgets::pick_pos, which reads the pointer from the frame the
button goes down (is_pointer_button_down_on), and use it on all four
surfaces. The Color panel now restyles selected type only when the
picked colour changes.

Tests: color_picker_ui::field_and_slider_pick_on_press_and_follow_small_moves,
panels::color_tests::color_panel_field_and_hue_strip_pick_on_press.

* #1 Reverted accidental scoreboard change when regenerating it
#2 Fixed color picker not checking for pointer press, but any mouse click

* Update crates/ui-egui/src/widgets.rs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Color pickers: rustfmt pick_pos

* test(ui): use main's rgb_to_hsb in the colour picker tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 18:34:41 -04:00
Hodd 1d69481349 Guides: draw the drag readout after ruler drags so it is current every frame 2026-10-19 18:54:31 +02:00
Hodd 362bdf135e Guides: show the X or Y position beside the pointer while dragging (#7680) 2026-10-19 17:47:09 +02:00
Hodd 140230b141 Replacing selected type keeps its size, as in Photoshop (#7457)
Typing or pasting over a selection now takes the style of the first selected character instead of the one before it, so retyping a smaller second line no longer takes the first line's size from the line break. Fixes #7413.
2026-10-18 16:56:26 -04:00