Commit graph

36 commits

Author SHA1 Message Date
Simon Hausmann
e61529976e Issue warnings when creating bindings against deprecated properties 2021-02-02 22:42:02 +01:00
Olivier Goffart
07df517473 Replace $children with @children 2021-01-28 11:55:08 +01:00
Olivier Goffart
3636c76848 Also forward the LineEdit focus in the native style
Just like in the ugly style
2021-01-21 13:21:09 +01:00
Olivier Goffart
8797f6512d Rename Slider min/max property
For consistency with the SpinBox

Fixes https://github.com/sixtyfpsui/sixtyfps/issues/138
2020-12-30 10:02:38 +01:00
Olivier Goffart
0d2d48be4f Rename "signal" to "callback" 2020-12-18 09:51:01 +01:00
Olivier Goffart
5bdb9befb5 Use the PopupWindow in the native style combobox
Note: the background is not styled yet
2020-11-30 18:39:41 +01:00
Simon Hausmann
1c787d2cb3 Use font-size instead of font_size 2020-11-11 09:38:01 +01:00
Olivier Goffart
183f300a85 Implement the temperature converter in the .60 code
A edited signal was required on the line edit
2020-11-03 18:23:37 +01:00
Olivier Goffart
8a95b806c7 Strawman implementation of a combo box 2020-11-03 17:55:49 +01:00
Olivier Goffart
59707f068c add a enabled property on the line edit 2020-11-02 18:20:01 +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
c3ba5a0808 Clean up NativeButton
Eliminate native_button_enabled
2020-10-30 16:28:06 +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
Olivier Goffart
dc98487160 Add a placeholder-text property to LineEdit 2020-10-27 10:55:08 +01:00
Olivier Goffart
9f08492258 Make sure that the ListView is not scrolled when there is enough room for all contents
Fixes #93
2020-10-21 09:47:33 +02:00
Olivier Goffart
7984e45a1f Fix ListView snapping to the bottom instead of the top
When there are not enough elements to fill the viewport
2020-10-16 11:21:59 +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
Olivier Goffart
e0e2a63b15 Draw the frame around the ScrollView 2020-10-14 18:03:37 +02:00
Olivier Goffart
e48f0b7621 Add a current item to the StandardListView 2020-10-14 14:32:18 +02:00
Olivier Goffart
8f1c5a96c1 Fix ListView being scrollable when it shouldn't
Relates to #86
2020-10-13 13:45:18 +02:00
Olivier Goffart
3bdd71b36f Start working on the Native ListView
Currently only the interpret part
2020-10-08 15:51:33 +02:00
Olivier Goffart
f10c2bfd7c More ListView WIP 2020-10-02 18:07:39 +02:00
Olivier Goffart
dec06be70c WIP ListView 2020-10-02 18:07:39 +02:00
Olivier Goffart
6662e1ff00 Proper Scrollbar on the native style 2020-09-28 18:13:13 +02:00
Olivier Goffart
6dd0d178a0 Rename ScrollArea to ScrollView 2020-09-28 10:52:29 +02:00
Olivier Goffart
5caeb601ff Remove the accepted_text workaround now that we have the two way bindings 2020-09-25 16:47:24 +02:00
Simon Hausmann
b7299af5d9 Attempt to make the focus ring of line edits also visible for the native style
On macOS that's not visible though due to the margins not being included in the rendering somehow.
2020-09-25 11:23:43 +02:00
Simon Hausmann
acb6eddeaf Expose the focused property on TextInput correctly
As per #55 introduce a has_focus property on the TextInput.
2020-09-25 11:22:32 +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
86d54ba2a7 Fix workaround for add_todo not working
To work around the lack of a two-way binding, we must binding to the text input, not the root :)
2020-09-21 15:31:32 +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
Olivier Goffart
1cf6d81169 Impletment GroupBox with the Qt style 2020-09-02 17:05:28 +02:00
Olivier Goffart
9782d85fdb Native style works with C++ 2020-09-01 12:25:11 +02:00
Olivier Goffart
f1ad78bc25 Qt style support for the rust backend
Need to set the SIXTYFPS_STYLE=native env variable while compiling
2020-09-01 12:25:11 +02:00