fix: be more precise about tracking active state in scrollbar_v widget
This commit is contained in:
parent
2d65864e74
commit
1fb3a8828a
1 changed files with 3 additions and 3 deletions
|
|
@ -68,17 +68,17 @@ pub fn receive(self: *Self, _: tp.pid_ref, m: tp.message) error{Exit}!bool {
|
||||||
self.active = true;
|
self.active = true;
|
||||||
self.move_to(y, ypx);
|
self.move_to(y, ypx);
|
||||||
return true;
|
return true;
|
||||||
} else if (try m.match(.{ "B", input.event.release, tp.more })) {
|
} else if (try m.match(.{ "B", input.event.release, @intFromEnum(input.mouse.BUTTON1), tp.more })) {
|
||||||
self.active = false;
|
self.active = false;
|
||||||
return true;
|
return true;
|
||||||
} else if (try m.match(.{ "D", input.event.press, @intFromEnum(input.mouse.BUTTON1), tp.any, tp.any, tp.extract(&y), tp.any, tp.extract(&ypx) })) {
|
} else if (try m.match(.{ "D", input.event.press, @intFromEnum(input.mouse.BUTTON1), tp.any, tp.any, tp.extract(&y), tp.any, tp.extract(&ypx) })) {
|
||||||
self.active = true;
|
self.active = true;
|
||||||
self.move_to(y, ypx);
|
self.move_to(y, ypx);
|
||||||
return true;
|
return true;
|
||||||
} else if (try m.match(.{ "B", input.event.release, tp.more })) {
|
} else if (try m.match(.{ "B", input.event.release, @intFromEnum(input.mouse.BUTTON1), tp.more })) {
|
||||||
self.active = false;
|
self.active = false;
|
||||||
return true;
|
return true;
|
||||||
} else if (try m.match(.{ "D", input.event.release, tp.more })) {
|
} else if (try m.match(.{ "D", input.event.release, @intFromEnum(input.mouse.BUTTON1), tp.more })) {
|
||||||
self.active = false;
|
self.active = false;
|
||||||
return true;
|
return true;
|
||||||
} else if (try m.match(.{ "H", tp.extract(&self.hover) })) {
|
} else if (try m.match(.{ "H", tp.extract(&self.hover) })) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue