Commit graph

747 commits

Author SHA1 Message Date
Simon Hausmann
58167e6281 Work around rendering issue with the ink SVG
Pre-render the SVG
2021-02-22 11:17:38 +01:00
Simon Hausmann
ba14486788 Fix side bar layout padding 2021-02-22 11:17:38 +01:00
Simon Hausmann
08bb6c0828 Provide space for the main view
This also allows getting rid of the intermediate fake rectangle
2021-02-22 11:17:38 +01:00
Simon Hausmann
1592866661 Start working on the new printer demo design 2021-02-22 11:17:38 +01:00
Olivier Goffart
5c6e84fa54 Copy the printerdemo to printerdemo_old
We're about to redo the printerdemo so copy the old one as we will
re-use the path for the new one
2021-02-22 11:16:40 +01:00
Simon Hausmann
445ddd58d5 API cleanup
Remove the `application` infix from `register_application_font`, to
reduce the changes that it might be interpreted to be a function that
also changes the default font in all text elements.
2021-02-17 14:37:31 +01:00
Olivier Goffart
ed1fc31b84 Put the window background color in the StyleMetrics
And make use of Window::background in Qt
2021-02-15 15:57:58 +01:00
Simon Hausmann
bb97fdd2a2 Use SVG images in the printer demo 2021-02-12 19:04:36 +01:00
Olivier Goffart
f7a76dc352 Add ImageFit::cover, and fix ImageFit::contain 2021-02-09 10:52:04 +01:00
Olivier Goffart
9bdb793ec1 Rename Window::color to background 2021-02-05 09:38:40 +01:00
Simon Hausmann
c771bcff45 Print a warning when trying to animate deprecated properties 2021-02-02 22:58:54 +01:00
Simon Hausmann
e61529976e Issue warnings when creating bindings against deprecated properties 2021-02-02 22:42:02 +01:00
Simon Hausmann
90cdfc9066 Fix memory node tutorial to run with older node versions
The node on my Ubuntu 20.04 installation doesn't have Array.prototype.flatMap.
2021-01-29 11:47:33 +01:00
Simon Hausmann
b98fa87e0e Simplify memory nodejs run
Don't use the "hidden" component to call `run`.
2021-01-29 11:16:44 +01:00
Simon Hausmann
c22bc79ee7 Fix running the todo node version
Use `run()` instead of just `run()` to spin the event loop.

Amends commit 5f265ffc09
2021-01-29 11:10:48 +01:00
Simon Hausmann
03664b8f01 Fix Cargo.toml
Fix up commit 5df6c99f4f that accidentally removed the wasm markers
2021-01-28 22:12:48 +01:00
Simon Hausmann
5df6c99f4f Improve application font support for WASM and simplify font handling
We can use fontdb on all platforms, which gives consistent font query
behavior of application fonts. And then we also don't need our hand-made
"db" anymore for the wasm build and the included DejaVu font.
2021-01-28 21:47:52 +01:00
Olivier Goffart
c48743eb4d
Add the memory to the examples/README 2021-01-28 19:17:31 +01:00
Simon Hausmann
1d6a0b0b9c Improve drop shadow visual in the slide puzzle
Re-apply d03da6b57b to give the shadow
a round corner -- the clip doesn't have one.
2021-01-28 16:23:37 +01:00
Olivier Goffart
9edf60a178 Fix wasm example using rand 2021-01-28 16:03:57 +01:00
Olivier Goffart
17eaffb6e1 Update rand dependency in the examples 2021-01-28 15:43:38 +01:00
Olivier Goffart
23a511b380 Replace img!"..." by @image-url("...") 2021-01-28 11:49:24 +01:00
Simon Hausmann
f8eec03296 Allow drop-shadow on Clip
Commit d03da6b57b illustrates how this
would be rather convenient. Eventually perhaps `Clip` can turn into a
boolean `clip: true` property.
2021-01-28 08:40:09 +01:00
Simon Hausmann
d03da6b57b Add a drop shadow to the pieces puzzle tiles
If `clip` were a similarly created property, then
this would probably look a little nicer in the source code.
The `Clip` element is a little in the way.
2021-01-27 19:19:17 +01:00
Simon Hausmann
a69ce3a397 Remove the 'align-' prefix from TextHorizontal/TextVerticalAlignment 2021-01-25 10:59:18 +01:00
Olivier Goffart
265efbbf4f Draw multi-line text with GL backend 2021-01-19 12:10:16 +01:00
Simon Hausmann
5f265ffc09 Split up ComponentWindow::run() into show(), hide() and sixtyfps::run_event_loop()
This allows creating multiple windows for example, and it will allow for
showing windows in those tests that require a mapped window.

As a bonus, the run() function on generated components is not consuming
anymore.
2021-01-19 09:50:22 +01:00
Olivier Goffart
23486d94f5 Fix MSVC warning 2021-01-14 12:23:59 +01:00
Simon Hausmann
727c9a19f7 Add basic text item support
This needs more work, but gets something onto the screen at least.
2021-01-14 08:53:13 +01:00
Olivier Goffart
f0d323006c Slider max was renamed to maximum 2020-12-30 10:28:05 +01:00
gondolyr
4c1d35967e Update memory example to use row and column props
Using row and column count properties improves the readability,
extensibility, and maintainability by removing the magic numbers for the
other calculated properties. Previously, it took me some time to
understand what these numbers represented and this change should remove
this difficulty.
2020-12-24 17:25:22 +01:00
Olivier Goffart
b42c16851a Use the color property of the window as a background 2020-12-18 16:54:19 +01:00
Olivier Goffart
61399e566a Add a title to the Window
also add a color, but not yet implemented
2020-12-18 16:47:14 +01:00
Olivier Goffart
0d2d48be4f Rename "signal" to "callback" 2020-12-18 09:51:01 +01:00
Olivier Goffart
002cfa76af Use PRIVATE in target_link_libraries 2020-12-16 14:29:12 +01:00
Simon Hausmann
e249260435 Add another ninja use 2020-12-15 19:46:02 +01:00
Simon Hausmann
625978fe1a WIP: Add an image-fit property to Image/ClippedImage 2020-12-15 10:26:54 +01:00
Simon Hausmann
c2a0cd7000 Added a node version of the memory puzzle game
This also implements a basic single shot timer support, which has
one caveat: it leaks the closures right now.
2020-12-11 17:17:28 +01:00
Olivier Goffart
261b2cb533 Make the link to the source point to the directory instead of the .60 2020-12-11 09:20:01 +01:00
Simon Hausmann
cfe7455305 Switch the memory example to the simpler .60 import mechanism 2020-12-10 15:10:30 +01:00
Simon Hausmann
d2ecd539bd Style edits
Use longer but perhaps more descriptive names for the first tile of the
pair.
2020-12-10 15:02:41 +01:00
Olivier Goffart
c53f69d332 memory game in C++ 2020-12-10 13:09:21 +01:00
Simon Hausmann
21c5ddaf61 Synchronize code with the tutorial 2020-12-10 09:37:33 +01:00
Simon Hausmann
0b84f2c40e Unify the tile arrays
There's no "restart" etc. so for now the code is much simpler by having just one array.
2020-12-10 08:56:15 +01:00
Simon Hausmann
a366744f28 Sync code with tutorial 2020-12-09 15:04:40 +01:00
Simon Hausmann
ce2cfa022d Flip the boolean expression for the base memory tile color
Subjectively it's easier to read :)
2020-12-09 14:01:56 +01:00
Simon Hausmann
2398d00e6f Apply the wasm init simplifcation from the tutorial
The await wrapper is not needed
2020-12-09 13:52:20 +01:00
Olivier Goffart
d3a79e49f6 memory: attempt to simplify the logic slightly 2020-12-09 13:35:57 +01:00
Olivier Goffart
060dd655a5 Memory game: add the logo on the hidden tile 2020-12-08 20:21:56 +01:00
Olivier Goffart
0a1c9aa206 Fix the aspect ratio of images by keeping them square 2020-12-08 16:40:17 +01:00