feat: touch support to scale widget
This commit is contained in:
@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
|
|||||||
- `can_shrink` property to image widget.
|
- `can_shrink` property to image widget.
|
||||||
- `mutations` property to localsignal.
|
- `mutations` property to localsignal.
|
||||||
- `eval_ignore` property to all widgets.
|
- `eval_ignore` property to all widgets.
|
||||||
|
- Touch support to scale widget.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|||||||
@@ -2385,10 +2385,12 @@ pub(super) fn build_gtk_scale(
|
|||||||
scale_dat,
|
scale_dat,
|
||||||
move |ctrl, event| {
|
move |ctrl, event| {
|
||||||
match event.event_type() {
|
match event.event_type() {
|
||||||
gtk4::gdk::EventType::ButtonPress => {
|
gtk4::gdk::EventType::ButtonPress
|
||||||
|
| gtk4::gdk::EventType::TouchBegin => {
|
||||||
scale_dat.borrow_mut().is_being_dragged = true;
|
scale_dat.borrow_mut().is_being_dragged = true;
|
||||||
}
|
}
|
||||||
gtk4::gdk::EventType::ButtonRelease => {
|
gtk4::gdk::EventType::ButtonRelease
|
||||||
|
| gtk4::gdk::EventType::TouchEnd => {
|
||||||
let mut scale_dat_mut = scale_dat.borrow_mut();
|
let mut scale_dat_mut = scale_dat.borrow_mut();
|
||||||
scale_dat_mut.is_being_dragged = false;
|
scale_dat_mut.is_being_dragged = false;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user