Skip to content

Commit

Permalink
Easing: add changelog entry and remove rectangle with hardcoded backg…
Browse files Browse the repository at this point in the history
…round in gallery
  • Loading branch information
ogoffart committed Nov 3, 2023
1 parent b205361 commit c70f203
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 50 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ All notable changes to this project are documented in this file.
- `ComboBox` selection can now be changed by scroll event
- `SpinBox` value can now be incremented and decremented by scroll event
- Added `focus-changed-event` callback to `FocusScope`
- Added many new easing curves.

### Rust

Expand Down
95 changes: 45 additions & 50 deletions examples/gallery/ui/pages/easings_page.slint
Original file line number Diff line number Diff line change
Expand Up @@ -55,58 +55,53 @@ export component EasingsPage inherits Page {
// Swap to the line below to crash the Rust code generator
// private property <int> curr-duration: slider.value;

Rectangle {
border-radius: 8px;
background: #F4F4F4;

VerticalLayout {
padding: 10px;
spacing: 10px;

Button {
text: "Animate All!";
clicked => {
linear-test.animate();
ease-in-quad-test.animate();
ease-out-quad-test.animate();
ease-in-out-quad-test.animate();
ease-test.animate();
ease-in-test.animate();
ease-out-test.animate();
ease-in-out-test.animate();
ease-in-quart-test.animate();
ease-out-quart-test.animate();
ease-in-out-quart-test.animate();
ease-in-quint-test.animate();
ease-out-quint-test.animate();
ease-in-out-quint-test.animate();
ease-in-expo-test.animate();
ease-out-expo-test.animate();
ease-in-out-expo-test.animate();
ease-in-sine-test.animate();
ease-out-sine-test.animate();
ease-in-out-sine-test.animate();
ease-in-back-test.animate();
ease-out-back-test.animate();
ease-in-out-back-test.animate();
ease-in-circ-test.animate();
ease-out-circ-test.animate();
ease-in-out-circ-test.animate();
ease-in-elastic-test.animate();
ease-out-elastic-test.animate();
ease-in-out-elastic-test.animate();
ease-in-bounce-test.animate();
ease-out-bounce-test.animate();
ease-in-out-bounce-test.animate();
}
VerticalLayout {
padding: 10px;
spacing: 10px;

Button {
text: "Animate All!";
clicked => {
linear-test.animate();
ease-in-quad-test.animate();
ease-out-quad-test.animate();
ease-in-out-quad-test.animate();
ease-test.animate();
ease-in-test.animate();
ease-out-test.animate();
ease-in-out-test.animate();
ease-in-quart-test.animate();
ease-out-quart-test.animate();
ease-in-out-quart-test.animate();
ease-in-quint-test.animate();
ease-out-quint-test.animate();
ease-in-out-quint-test.animate();
ease-in-expo-test.animate();
ease-out-expo-test.animate();
ease-in-out-expo-test.animate();
ease-in-sine-test.animate();
ease-out-sine-test.animate();
ease-in-out-sine-test.animate();
ease-in-back-test.animate();
ease-out-back-test.animate();
ease-in-out-back-test.animate();
ease-in-circ-test.animate();
ease-out-circ-test.animate();
ease-in-out-circ-test.animate();
ease-in-elastic-test.animate();
ease-out-elastic-test.animate();
ease-in-out-elastic-test.animate();
ease-in-bounce-test.animate();
ease-out-bounce-test.animate();
ease-in-out-bounce-test.animate();
}
}

HorizontalLayout {
spacing: 10px;
Text { text: "Duration"; }
slider := Slider { minimum: 100; maximum: 5000; value: 1000; }
Text { text: "" + round(slider.value) + "ms"; }
}
HorizontalLayout {
spacing: 10px;
Text { text: "Duration"; }
slider := Slider { minimum: 100; maximum: 5000; value: 1000; }
Text { text: "" + round(slider.value) + "ms"; }
}
}

Expand Down

0 comments on commit c70f203

Please sign in to comment.