Commit graph

747 commits

Author SHA1 Message Date
Olivier Goffart
2d6751a87a Puzzle: stop the auto-play when resetting 2020-11-23 13:41:48 +01:00
Olivier Goffart
807dbb3c00 Puzzle: Kick animation
Also support timer that can be cancelled from the timer event
2020-11-23 13:38:44 +01:00
Olivier Goffart
4383566db9 slide puzzle: Animation on checkbox 2020-11-20 17:14:04 +01:00
Olivier Goffart
781e92941c Slide puzzle: move the checkbox to its own component 2020-11-20 17:14:04 +01:00
Simon Hausmann
9283a43d3e Small typo fixes 2020-11-20 16:19:00 +01:00
Olivier Goffart
08fe5f6c72 Add a Clip 2020-11-20 15:45:45 +01:00
Olivier Goffart
2cc1070b7b Slide puzzle circle animation 2020-11-20 15:15:42 +01:00
Olivier Goffart
57cf4e0988 Use transitions in the printer demo for the color level 2020-11-20 12:40:09 +01:00
Olivier Goffart
fd45f575d7 Some improvement of the main screen of the printer demo
Apply some of the hints from the reddit thread

 - make sure the icons are centered
 - make sure the spacing and padding of the main buttons are the same
 - make the color slightly lighter
 - align the title ind controls in the top bar
2020-11-16 17:23:56 +01:00
Olivier Goffart
280414b556 slide_puzzle: Thumb up icon when winning 2020-11-16 13:30:48 +01:00
Olivier Goffart
0672f4b3cd Expose Timer API to rust API
And use it in the puzzle demo to implement the auto play mode
2020-11-16 12:17:02 +01:00
Olivier Goffart
eadfdbe5fb Add README to the slide_puzzle 2020-11-15 11:20:37 +01:00
Olivier Goffart
69aa4cb03b Make the puzzle solvable 2020-11-13 16:52:40 +01:00
Olivier Goffart
6ca7c85eab Implement min and max 2020-11-13 15:30:07 +01:00
Olivier Goffart
b8d9373edd Slide Puzzle: add an image 2020-11-13 14:13:51 +01:00
Olivier Goffart
d499e86640 Implement cubic-bezier 2020-11-13 13:36:32 +01:00
Simon Hausmann
3cf02e57f4 Fix sliding puzzle on wasm
Activate the wasm-bindgen feature on the rand crate
2020-11-12 15:33:19 +01:00
Olivier Goffart
3c79488637 Wasm build for the slide_puzzle 2020-11-12 13:14:16 +01:00
Olivier Goffart
01356bde33 Some more logic got the sliding puzzle 2020-11-12 12:59:18 +01:00
Olivier Goffart
06a3baf3e7 Slide puzzle: add some themes 2020-11-11 17:39:24 +01:00
Simon Hausmann
94ed0ae1d1 Fix printer speed
Enable the turbo mode by default!
2020-11-11 15:10:07 +01:00
Simon Hausmann
9d9f5f5462 Simplify the settings page a bit
Use horizontal and vertical layouts to reduce the amount of nesting.
The resolution slider is a bit wider now, but that one needs a bit of extra work anyway :)
2020-11-11 15:10:07 +01:00
Simon Hausmann
1c787d2cb3 Use font-size instead of font_size 2020-11-11 09:38:01 +01:00
Simon Hausmann
c85aa9a758 Use dashed properties for text alignment 2020-11-11 09:35:09 +01:00
Olivier Goffart
d6a440aa4a Change C++ API to use the ComponentHandle 2020-11-10 19:28:34 +01:00
Olivier Goffart
8f362ead43 Missing license header 2020-11-10 15:12:25 +01:00
Olivier Goffart
270e1b3e5b Start experimenting with the sliding puzzle example 2020-11-10 14:30:36 +01:00
Simon Hausmann
f5eb39562f Shrink the default height of the gallery a little 2020-11-06 13:29:27 +01:00
Simon Hausmann
07a728ef8b Improve gallery layout slightly
Place the Button next to the CheckBox
2020-11-06 13:24:45 +01:00
Simon Hausmann
fb8a0b1b5c Add disabling to the spinbox 2020-11-06 11:09:40 +01:00
Simon Hausmann
851c376d67 Add disabling to the Slider 2020-11-06 11:09:40 +01:00
Simon Hausmann
9f5ea10e49 Add support for disabling some widgets 2020-11-06 11:09:23 +01:00
Simon Hausmann
78f94a1316 Add a common toggle for disabling widgets 2020-11-06 11:09:22 +01:00
Simon Hausmann
e87913634a Use layout alignment
That allows removing a FIXME
2020-11-06 11:09:22 +01:00
Simon Hausmann
8729f07199 Fix the spacing of the gallery "head paragraph" 2020-11-04 17:39:51 +01:00
Simon Hausmann
9df18a3747 Apply default layout spacing and padding from the style
Extract the StyleMetrics from the style and pass it to the layout
lowering pass for application.

The tests were adjusted to explicitly specify the padding/spacing to
override the ugly style default.
2020-11-04 15:20:43 +01:00
Olivier Goffart
8a95b806c7 Strawman implementation of a combo box 2020-11-03 17:55:49 +01:00
Olivier Goffart
9bf686db29 Use layout alignment in the example 2020-11-03 12:25:55 +01:00
Olivier Goffart
5b4a974c72 Split each page of the printer demo in its own file 2020-11-02 21:39:14 +01:00
Olivier Goffart
72f22c8aad Make a StyleMetrics global in the style and use it from todo just to test 2020-11-02 17:19:57 +01:00
Simon Hausmann
a2ae00ee92 Begin splitting up the printer demo into multiple files 2020-11-02 13:40:34 +01:00
Olivier Goffart
2ece3817cc Make ModelHandle a struct
Last commit broke for structures containing models, because models are not PartialEq.
So we need to implement PartialEq for ModelHandle. Which means a struct needs to
be created
2020-10-31 13:32:19 +01:00
Olivier Goffart
b89e7bd3d3 Printer demo: Remove workaround now that for is supported in layout 2020-10-31 11:33:12 +01:00
Simon Hausmann
cd75556ab1 Minor clean up in the todo app
* Show a placeholder text for the todo entry
* Disable the "Add Entry" button if there's nothing to be added
2020-10-30 15:55:19 +01:00
Simon Hausmann
6b7630963f Add support for disabling a Button
This also removes the funny binding on the button in the gallery.
UI wise it's confusing that a button changes its size when pressed, and we can
show off bindings somewhere else :-)
2020-10-30 15:55:18 +01:00
Simon Hausmann
a7abfea961 Fix gallery layout
The layout before this patch resulted in constraints where the maximum
width was less than the calculated minimum width.
To avoid this situation, this patch rewrites the layout to use a central
vertical layout and places the items that we don't want to stretch into
horizontal boxes with a spacer.
2020-10-30 14:23:54 +01:00
Olivier Goffart
263df7dc63 Remove the www from all sixtyfps.io URL 2020-10-29 11:06:06 +01:00
Simon Hausmann
8bb6f58deb Minor ui fix in printer demo settings page
Don't let the slider "touch" the "Resolution" text label.
2020-10-27 19:33:37 +01:00
Olivier Goffart
d3801e26d3 Change the syntax of structures to require the struct keyword 2020-10-27 16:09:05 +01:00
Olivier Goffart
dc98487160 Add a placeholder-text property to LineEdit 2020-10-27 10:55:08 +01:00