-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
QMLDemo: improve OrientationToggleButton touch friendlyness
The previous implementation was hard to use on a touchscreen because the surface where it was touching was very small. The new version makes use of a slider internally which allows the control to be changed more intiutively by swiping.
- Loading branch information
Showing
2 changed files
with
42 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
let previous = undefined; | ||
// primitive function to check whether a value changed | ||
// between invocations | ||
export function hasChanged(value) { | ||
const changed = value != previous; | ||
previous = value; | ||
return changed; | ||
} |