Commit graph

252 commits

Author SHA1 Message Date
Olivier Goffart
8361ef4019 Start code egeneration for the two ways binding
This is only meant to include the cases in which the property are optimized.
Does not work yet for the dynamic component
2020-09-24 14:37:16 +02:00
Olivier Goffart
3f0d06b290 Use the ScrollArea in the todo example even if it is ugly 2020-09-22 20:11:43 +02:00
Olivier Goffart
315fd7a881 Start doing a ScrollArea element
Unfortunately something is wrong with the Qt style, it looks like the Qt style
does not respect the rect given for the sub components

Also Input is not handled yet.
2020-09-22 20:05:41 +02:00
Simon Hausmann
b857eb4671 Add an accepted signal to TextInput and LineEdit 2020-09-21 13:18:53 +02:00
Simon Hausmann
93a08c5207 Add a LineEdit widget to the ugly and native style 2020-09-18 18:54:37 +02:00
Simon Hausmann
2da84fee46 Add a boilerplate TextInput item 2020-09-18 16:34:24 +02:00
Olivier Goffart
221bb853d7 Change the exaple to used named struct for models 2020-09-17 14:00:50 +02:00
Olivier Goffart
913d680333 Recactor rust Model after first round of API review
- Remove EmptyModel and use an Option
 - Make ModelRc a type alias
 - Rename ArrayModel into VecModel
2020-09-16 14:25:57 +02:00
Simon Hausmann
625cb6c6b8 Add a constructor to Text and let the color default to black
We really shouldn't require specifying a color for every Text {} element just in order
to see *some* text.

For Rectangle OTOH transparent is a good default (and thus for Color), hence
this change just to Text.

Right now the constructor bit is also a bit repetitive, this could
perhaps be folded into BuiltinItem to generate the ffi, default impl and
forward to an init function if it exists.
2020-09-16 08:20:13 +02:00
Olivier Goffart
2ae4f1757b Rename model method to match the rust API 2020-09-15 14:10:07 +02:00
Simon Hausmann
a10cf5ca9a Add WASM build for the todo app
This makes it easier to test text input also for the wasm build
2020-09-15 12:28:30 +02:00
Olivier Goffart
0d8a38577d Todo example: make the "add todo" button do something 2020-09-14 16:38:45 +02:00
Olivier Goffart
4de2e57175 Use a Model trait in the rust backend 2020-09-14 14:02:34 +02:00
Simon Hausmann
520df89e2c Add the same (a)rgb_(uint8/float) functions in C++ Color as in Rust 2020-09-11 17:55:52 +02:00
Simon Hausmann
f5e221e95b Try to include screenshots of the gallery, tweak the layout a little and update the others
This is far from perfect, but something...
2020-09-11 17:38:35 +02:00
Simon Hausmann
9ecaf11eed Various additions to the Rust Color API
As discussed in the most recent API review.
2020-09-09 18:53:59 +02:00
Olivier Goffart
8761ca80a3 Add SharedArray::push and adjust a bit the API 2020-09-09 18:47:15 +02:00
Simon Hausmann
6b8ccc5ef4 Some touch-ups for the printer demo's settings page 2020-09-09 08:53:15 +02:00
Simon Hausmann
fefa5b9cd4 Ignore the build directory 2020-09-08 22:34:29 +02:00
Simon Hausmann
246a7142ec Fix printerdemo C++ build after API changes 2020-09-08 22:34:22 +02:00
Simon Hausmann
19cce012a0 Add ARGBColor<T> to the color API
As discussed in the last API review, this replaces the as_rgba_f32/u8
"accessor" functions by returning a struct with named fields.
2020-09-08 22:11:23 +02:00
Simon Hausmann
6df29e04c5 Tweak the gallery a bit
Add some text on top and tweak the layout a little.
2020-09-08 15:30:28 +02:00
Simon Hausmann
ec07d6bfe8 Tweaks to the color schemes of the printer demo and ugly style/gallery
The printer demo looks slightly less boring on white background with brighter colors.

In exchange, the controls can become more dull and hopefully easier to see.
2020-09-08 15:30:28 +02:00
Olivier Goffart
e9b63552a7 Skeleton for a TODO app 2020-09-07 14:15:27 +02:00
Olivier Goffart
3f45b545ff C++: Don't return model data by const value
Prevetn warning
2020-09-07 12:50:08 +02:00
Olivier Goffart
a1756ca860 Do not use symbolic link when we don't need to
On windows, symbolic links support is not working out of the box.
So better avoid symbolic links needed for the build.
There is still symbolic links used to build the rust doc, but that's only
in nightly and only for the documentation
2020-09-07 11:10:07 +02:00
Olivier Goffart
c3a53a360f Additions to the building documentation 2020-09-07 10:46:02 +02:00
Olivier Goffart
f6c8ea0f20 Make the Model/Repeater type safe in C++ 2020-09-04 19:02:56 +02:00
Olivier Goffart
0751552068 Printer demo: the ink data now comes from the native code 2020-09-04 15:49:33 +02:00
Simon Hausmann
75baf09eca
Add instructions how to build & run the examples 2020-09-04 14:54:31 +02:00
Simon Hausmann
fd5271f2be Rename the WidgetBox in the gallery to GroupBox
... and place it in the ugly style. Then we can also style it through the native style.
2020-09-02 13:49:14 +02:00
Simon Hausmann
a0e40b814e Place the widgets in the gallery in a simple box each 2020-09-02 09:40:59 +02:00
Simon Hausmann
0972a9289c Apply a default size to the gallery
There's otherwise a lot of whitespace. Also check the checkbox by default for better contrast.
2020-09-02 09:28:16 +02:00
Simon Hausmann
7ca8cf7cdd Change the color scheme of the printer demo a little
To adjust for better contrast in the style changes
2020-09-02 09:25:39 +02:00
Simon Hausmann
704644c752 Reduce use of bright colors in the printer demo
Use slightly aggressive colors for the buttons of the printer demo,
shrink the ink cartridge bars a little and replace the red for the 2000
with a more subtle silver.

Based on privately received feedback ;-)
2020-09-01 15:05:40 +02:00
Olivier Goffart
a36cb2d9b4 Layout: add a padding shorthand property
Also fix a bug in the C++ code generator where two layout have padding
in the same component
2020-09-01 13:29:13 +02:00
Olivier Goffart
9782d85fdb Native style works with C++ 2020-09-01 12:25:11 +02:00
Simon Hausmann
01a85bbbbc Add a bit of padding around the widgets in the gallery
Also removed the width/height/x/y bindings. Since the elements are in a layout, those are not needed.
2020-08-28 16:37:39 +02:00
Olivier Goffart
46b86e023d Exclude the wasm example from the workspace so they do not get built by default
They should only be built for wasm build

Also cleanup their Cargo.toml file: only cdynlib is required and no need to rename the web-sys crate
2020-08-27 14:25:15 +02:00
Olivier Goffart
58cdaeb8dd Update license header to mention that commertial option are available 2020-08-26 13:23:42 +02:00
Olivier Goffart
f0dbd0cc80 node frontend for the printerdemo 2020-08-26 09:11:21 +02:00
Simon Hausmann
04ee36b27e Speed up non-wasm build
Don't build wasm-bindgen-*, js-sys, console_error_panic_hook and web-sys
(and dependencies, total 9 crates) when not building for wasm.
Especially web-sys has a ton of .rs files in its crate and takes a
while.
2020-08-25 14:01:57 +02:00
Olivier Goffart
ea1f215367 Some polishinbg of the .toml files
- Give all the sixtyfps-* create a 0.0.1 version
 - Make sure that the internal dependences are using the exact same version
   (so "=0.0.1")
 - Add the description/homepage/repository fields in the .toml files
 - Set publish=false  to crates that are not meant to be published on crates.io
2020-08-24 16:28:11 +02:00
Olivier Goffart
dcf5e63203 Put the shebang before the license header 2020-08-24 12:28:02 +02:00
Olivier Goffart
725db91878 Fax page 2020-08-24 08:38:30 +02:00
Simon Hausmann
44705a0bf4
Added a new central README for the examples 2020-08-18 15:42:23 +02:00
Simon Hausmann
7f1d9f5252 Commit correct license tags to Cargo.toml
For now that's GPL-3.0 only, but this can be changed :-)
2020-08-18 10:12:59 +02:00
Simon Hausmann
2823f32692 Apply license headers to all non-binary/non-json sources 2020-08-17 17:55:20 +02:00
Simon Hausmann
86b67787a1 More printer demo polish
* Align the images on the main screen buttons
    * Increase the spacing between the images and the button text
2020-08-14 14:27:34 +02:00
Simon Hausmann
85b1ec0ea9 Add a subtle background gradient 2020-08-14 14:20:36 +02:00