Commit graph

65 commits

Author SHA1 Message Date
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
Olivier Goffart
9bdb793ec1 Rename Window::color to background 2021-02-05 09:38:40 +01:00
Olivier Goffart
265efbbf4f Draw multi-line text with GL backend 2021-01-19 12:10:16 +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
002cfa76af Use PRIVATE in target_link_libraries 2020-12-16 14:29:12 +01:00
Olivier Goffart
d8680c33d0 Port more wasm example to the simplified wasm 2020-12-08 13:01:02 +01:00
Simon Hausmann
7047856d4e Replace FooRc with Foo and without ComponentHandle in examples and tests 2020-12-03 08:13:24 +01:00
Simon Hausmann
08b8a8cb83 Port the examples away from the ComponentHandle based API 2020-12-03 08:13:15 +01:00
Simon Hausmann
a5932c9f88 Remove the outline around the canvas in the wasm demos 2020-11-26 17:31:46 +01:00
Olivier Goffart
d6a440aa4a Change C++ API to use the ComponentHandle 2020-11-10 19:28:34 +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
8729f07199 Fix the spacing of the gallery "head paragraph" 2020-11-04 17:39:51 +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
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
Olivier Goffart
dc98487160 Add a placeholder-text property to LineEdit 2020-10-27 10:55:08 +01:00
Simon Hausmann
0cb54b84f9 Remove dummy Rectangle from Gallery
It's not "needed" anymore AFAICS
2020-10-21 15:09:03 +02:00
Olivier Goffart
1436402999 Change the target name for the C++ example
they were ending by _cpp because corrosion used to add all rust target as target
but that's no longer the case
2020-10-20 18:02:28 +02:00
Olivier Goffart
e4e601de83 Draw the frame properly around the native scrollview 2020-10-16 10:45:17 +02:00
Simon Hausmann
6aa292eac1 Change the names of the logical and physical pixel units
The logical pixels are now just called "px" and the less frequently
used physical pixels have the "phx" suffix.

The existing markup was adapted using the syntax updater and the
following patch:

    +    if node.kind() == SyntaxKind::NumberLiteral {
    +        if node.text().ends_with("lx") {
    +            return write!(
    +                file,
    +                "{}px",
    +                node.text().as_str().split_at(node.text().as_str().len() - 2).0
    +            );
    +        }
    +        if node.text().ends_with("px") {
    +            return write!(
    +                file,
    +                "{}phx",
    +                node.text().as_str().split_at(node.text().as_str().len() - 2).0
    +            );
    +        }
    +    }

Fixes #49
2020-10-16 07:19:40 +02:00
Simon Hausmann
9072d5423c Fix appearance of vertical scrollbar in listview in gallery
By default the listview had very many items that made the scrollbar look very very small.
2020-10-13 23:08:56 +02:00
Olivier Goffart
87ec175166 wasm demo: Don't call non existing fuction
Fixes #85
2020-10-13 12:44:09 +02:00
Olivier Goffart
1138c9dbed Normalize the spelling of SixtyFPS 2020-10-13 07:48:55 +02:00
Simon Hausmann
0752067cab
Fix appearance of the list view in the gallery
By default the window is a little too small (in terms of height), so the list view is squished. We don't propagate the minimum size to the window yet, so bump the height by hand.
2020-10-12 13:27:09 +02:00
Olivier Goffart
9d106c6830 Some changes in the README 2020-10-09 13:49:39 +02:00
Olivier Goffart
2903428072 Add a C++ build of the gallery 2020-10-08 17:18:22 +02:00
Olivier Goffart
3bdd71b36f Start working on the Native ListView
Currently only the interpret part
2020-10-08 15:51:33 +02:00
Simon Hausmann
5695e251b7 Fix wasm builds
We're running into https://github.com/parcel-bundler/parcel/issues/1573
so switch back to webpack.
2020-10-05 11:29:40 +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
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
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
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
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
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
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
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