Olivier Goffart
a0a8cc3bc9
Mark the TabWidget as internal and re-export it from the style
2021-08-09 12:41:03 +02:00
Olivier Goffart
d41839abe3
Compiler pass for the TabWidget
...
it will lower the TabWidget into a TabWidgetImpl and the tabs into TabImpl
2021-08-06 15:58:13 +02:00
Olivier Goffart
29e0ae913c
TabBar: implement something in the ugly style
...
and change the TabImpl API
2021-08-06 15:58:13 +02:00
Olivier Goffart
18572fbaa3
WIP: More TabWidget work in progress
2021-08-06 15:58:13 +02:00
Olivier Goffart
9d40779d69
WIP work for TabWidget
2021-08-06 15:58:13 +02:00
Olivier Goffart
90cdb5ab5d
Add a changed
callback to Slider
...
Closes #125
2021-07-31 15:14:03 +02:00
Olivier Goffart
bd52f4d444
Allow the clip property to be a dynamic property
2021-07-29 15:02:25 +02:00
Simon Hausmann
14c6819791
Add support for icons in the Button widget
...
The icon in the gallery example was generated via https://emoji.aranja.com
2021-07-27 19:37:06 +02:00
Olivier Goffart
ff8f7930d2
ListView: fix default height of items
2021-07-22 17:13:36 +02:00
Simon Hausmann
492af0f67c
Rename the implementation of the Window
item to WindowItem
...
If we were to add `sixtyfps:🪟 :Window` to the re_exports, then
this clashes. We might rename the former, but this is a cleaner naming
in any case.
Relates to #333
2021-07-20 17:50:17 +02:00
Olivier Goffart
1360f1e26e
Added icon property to the Window element
2021-07-20 16:34:19 +02:00
Olivier Goffart
13bd828b96
Update license date
2021-07-02 15:55:54 +02:00
Olivier Goffart
ae114cf79d
C++: don't re-export private symbol in the public API
...
Use the cbindgen_private namespace dirrectly from the generated code
2021-06-28 12:03:49 +02:00
Olivier Goffart
16ba23ae47
Move StateInfo to the private namespace
2021-06-28 11:23:44 +02:00
Simon Hausmann
66299437f0
Fix C++ build
...
The path types are now all in the private_api namespace
2021-06-21 15:50:58 +02:00
Olivier Goffart
4584c40544
Rename items::Image to ImageItem
...
Because there will be soon a sixtyfps::Image and the names
can't clash
2021-05-28 17:05:16 +02:00
Simon Hausmann
cc9d5e09f0
Add support for clip on Path elements
...
This allows clipping the viewbox conveniently.
2021-05-21 19:51:00 +02:00
Simon Hausmann
e7bc91c804
Add support for specifying the viewbox of path elements
2021-05-21 19:51:00 +02:00
Olivier Goffart
54be5f3a84
Some ground work to make more binding analysis
...
- Mark builtin properties that are modified by the native code as output
- Record wether the property is set by code in the .60
- Add a field that will tell us if a property binding is constant
2021-05-20 13:40:51 +02:00
Simon Hausmann
bb7b301b10
GL backend: new box drop shadow implementation
...
This replaces the box gradient with a new implementation that
behaves like the HTML Canvas element, by applying a gaussian
blur to the alpha of the rectangle to shadow.
The drop-shadow-blur property is changed to be now just a "level", like
the HTML Canvas shadowBlur property, which is defined to be half of the
standard deviation of the gaussian blur to be applied.
2021-05-20 08:50:02 +02:00
Olivier Goffart
847f3b26e4
Hide internal type in auto-completions
2021-04-23 15:06:37 +02:00
Olivier Goffart
91ed04a72c
Make length
(still the default for all property) be the logical length
...
And a new `physical_length` is now the physical_length unit
Note: this does not change the runtime part yet
2021-04-21 17:15:19 +02:00
Olivier Goffart
3bf3761450
Implement the Opacity filter.
...
Notice that the GL implementation currently don't combine the opacity
2021-04-15 10:17:52 +02:00
Olivier Goffart
ba2f2d5719
Add an Opacity element that does nothing
2021-04-15 10:17:52 +02:00
Simon Hausmann
48e6d2f48b
Fix handling of non-zero border width in clip-enabled Rectangles
...
The border should be visible (as in the included test case), which this
patch fixes for Qt by subtracting the border width just like when drawing.
2021-04-14 13:34:51 +02:00
Simon Hausmann
6a1191c5a5
Add Window.default-font-weight
...
This completes the font properties that can be set as default.
2021-04-14 11:16:22 +02:00
Olivier Goffart
1773f9143b
Add a border-radius property to the Clip
...
So that `clip: true` used on a Rectangle with border radius can be clipped
with that radius
Only the Qt backend is implemented for now
2021-04-12 19:47:18 +02:00
Olivier Goffart
c840b046ae
Rename the "resource" type to "image"
2021-03-10 17:24:31 +01:00
Simon Hausmann
b591f7de2c
Add Window.default-font-size
...
This allows getting rid of the `DemoText` element in the printer demo
2021-03-02 13:33:43 +01:00
Simon Hausmann
27bdb4d481
Added Window.default-font-family
...
One step towards getting rid of `DemoText` in the printer demo
2021-03-02 13:25:21 +01:00
Simon Hausmann
7cea088a2c
Add support for letter-spacing in text
...
This is conveniently supported by femtovg and Qt
2021-02-16 22:14:50 +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
500919745e
Add an internal Rotate element
...
This is just a starting point, to be turned into a real Transform
element later, along with syntactic sugar to turn rotation, etc. into a
transform matrix in the generated output.
2021-02-12 17:31:06 +01:00
Simon Hausmann
2dd5ea61bb
Add support for Path.fill-rule
...
For some reason it's not working with the Qt renderer though
2021-02-10 14:08:32 +01:00
Olivier Goffart
afbb537bc1
Add TouchArea::enabled
...
and use it in the ugly style
2021-02-05 14:21:20 +01:00
Olivier Goffart
9bdb793ec1
Rename Window::color to background
2021-02-05 09:38:40 +01:00
Olivier Goffart
0e2471f76b
Image::colorize support
...
(Qt only)
2021-02-04 17:44:01 +01:00
Simon Hausmann
3f541972ef
Change Rectangle::border-color
to be a brush
...
This allows things like filling a thick border with a gradient.
2021-02-04 17:05:00 +01:00
Simon Hausmann
1a9419638d
Change the type of the color property for Text
and TextInput
to be a brush
...
This allows filling glyphs with gradients. However femtovg
appears to apply the start/end position per-glyph
instead of globally - resulting in a different result than Qt.
2021-02-04 11:54:57 +01:00
Simon Hausmann
66df71a3ca
Convert Path
to support brushes
...
* Rename `fill-color` to `fill`
* Rename `stroke-colo` to `stroke`
* Support using a brush for both properties
2021-02-03 15:45:33 +01:00
Simon Hausmann
7982325da4
Change Rectangle::background's type to be a brush
...
This also introduces the brush type in the compiler and generators. At the
moment only conversion from Color is implemented.
2021-02-03 12:49:44 +01:00
Simon Hausmann
1f091cb1c0
Rename Rectangle.color to Rectangle.background
...
Add support for built-in property aliases and rename `color` to
`background` - in preparation for it also changing to type brush.
Right now the alias is silent, a deprecation and overall change
will come in a subsequent change.
2021-02-02 17:01:12 +01:00
Simon Hausmann
6a4f2aa572
Added the two missing path sub-elements for quadratic and cubic curves
2021-01-28 14:14:24 +01:00
Simon Hausmann
a6fbc4c05d
Add missing MoveTo
sub-element for Path
2021-01-28 13:16:25 +01:00
Simon Hausmann
e14c0df231
Fix unit of path stroke width property
2021-01-28 09:10:07 +01:00
Simon Hausmann
680995432e
Minor fixes to the BoxShadow
element
...
* Use the same property names as `Rectangle`
* Use the same sizing behavior
Also added a "manual" test.
2021-01-27 15:34:27 +01:00
Olivier Goffart
647f7effcd
Add TextWrap and TextOverflow enum and corresponding property in Text
...
Although they ar enot working yet
2021-01-27 11:40:09 +01:00
Olivier Goffart
9de5af75ce
Allow FocusScope to reject the events
2021-01-26 17:05:31 +01:00
Simon Hausmann
628e6fdb38
Add a BoxShadow element
...
This intends to provide a configurable rectangular "drop shadow". The
API is modeled after CSS/HTML5 Canvas where the element can be "bound"
to an existing rectangular shape (geometry and radius), the offset can
be used to place the shadow and color and blur configure the shadow.
The shadow's color fades into transparent.
TODO (in subsequent changes):
* Documentation
* Qt implementation
2021-01-26 13:56:12 +01:00
Simon Hausmann
2801e82658
Changed the KeyEvent in .60 to be an object
...
This exposes the text as well as the keyboard modifiers and is a little
more extensible.
2021-01-22 18:05:34 +01:00