Skip to content

Commit e4ab87b

Browse files
committed
feat: touch support to scale widget
1 parent 37b57ae commit e4ab87b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
1919
- `can_shrink` property to image widget.
2020
- `mutations` property to localsignal.
2121
- `eval_ignore` property to all widgets.
22+
- Touch support to scale widget.
2223

2324
### Fixed
2425

crates/ewwii/src/widgets/widget_definitions.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2385,10 +2385,12 @@ pub(super) fn build_gtk_scale(
23852385
scale_dat,
23862386
move |ctrl, event| {
23872387
match event.event_type() {
2388-
gtk4::gdk::EventType::ButtonPress => {
2388+
gtk4::gdk::EventType::ButtonPress
2389+
| gtk4::gdk::EventType::TouchBegin => {
23892390
scale_dat.borrow_mut().is_being_dragged = true;
23902391
}
2391-
gtk4::gdk::EventType::ButtonRelease => {
2392+
gtk4::gdk::EventType::ButtonRelease
2393+
| gtk4::gdk::EventType::TouchEnd => {
23922394
let mut scale_dat_mut = scale_dat.borrow_mut();
23932395
scale_dat_mut.is_being_dragged = false;
23942396

0 commit comments

Comments
 (0)