mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-23 11:01:59 +01:00
merge-fwf: F4 ruler cursors: read the part's hover before borrowing the press slot
This commit is contained in:
1 parent
0347762847
commit
b27d09d155
1 file changed
+2
-2
@@ -217,9 +217,9 @@ impl Component for RulerOverlay<'_> {
|
||||
let targets = [Target::Point(RulerPart::Protractor), Target::Point(RulerPart::End), Target::Point(RulerPart::Start), Target::Line];
|
||||
for target in targets {
|
||||
let Some(result) = cx.part_if_declared(target.reference()) else { continue };
|
||||
let press = result.press;
|
||||
let (press, hovered) = (result.press, result.hovered);
|
||||
let running = cx.press_slot::<Grab>().is_some_and(|grab| grab.0.is_some());
|
||||
if result.hovered && !press.phase.is_press() && !running {
|
||||
if hovered && !press.phase.is_press() && !running {
|
||||
let arm = press.mods.alt && target.starts_arm(line);
|
||||
cx.cursor(ruler_cursor(space.precise(), arm), CursorPriority::Part);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user