slint/examples/dial/README.md
Tasuku Suzuki 95d29e9b90
dial example: Restrict angle to the defined range and refine angle calculation (#7181)
- Enforce that the angle stays within the specified start and end angles.
- Transition from using the initial touch angle as a reference to using the previous angle.
2024-12-20 19:39:28 +02:00

17 lines
825 B
Markdown

<!-- Copyright © SixtyFPS GmbH <info@slint.dev> ; SPDX-License-Identifier: MIT -->
[![Dial Demo Video](https://github.com/user-attachments/assets/f9a4835d-5567-4fc2-bd4d-30b2e979f491)](https://github.com/user-attachments/assets/83fb39b3-a26e-4878-ba92-b27b4c3beb36)
# Slint dial example
Dial example. Uses Math.atan2 to calculate the angle and let the user rotate a dial.
[Online Preview](https://slint.dev/snapshots/master/editor/preview.html?load_url=https://raw.githubusercontent.com/slint-ui/slint/master/examples/dial/dial.slint)
[Online code editor](https://slint.dev/snapshots/master/editor/index.html?load_url=https://raw.githubusercontent.com/slint-ui/slint/master/examples/dial/dial.slint)
# Planned changes
- [ ] Update the graphics slightly. They are 10 years old and would benefit from a small polish.