Olivier Goffart
aabd13b5a9
Adjust the ugly style default stretches
2020-10-27 07:24:04 +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
Simon Hausmann
7be918ec43
Use a GridLayout for the Button in the ugly style
...
The text element is able to convey reasonable constraints, so the hard-coded
minimum sizes should not be needed.
2020-10-13 22:00:33 +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
2b6ba5052d
Fix scrollbar of the ugly theme when the viewport is smaller than the listview
2020-10-02 18:22:46 +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
Simon Hausmann
74900302bd
Fix CheckBox height in the ugly style
...
With the previous grid layout implementation the checkbox minimum/maximum height of 40lx
was ignored in the todo app and instead it was
rendered using 20lx, which looks fine.
With the stretch layout the outer constraint of 20lx and the inner constraint of 40lx
create an impossible situation where eventually the
checkboxes in todo get misplaced.
2020-10-02 14:54:05 +02:00
Olivier Goffart
4cc7677ed2
Implement scrollbar in the ScrollBar for the ugly style
2020-10-01 11:26:35 +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
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
987d43baec
Button in ugly style: fix clicking on the border of the button
2020-09-14 16:57:45 +02:00
Olivier Goffart
b65ea71572
Ugly checkbox: don't animate while it is resized
2020-09-08 16:21:53 +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
1cf6d81169
Impletment GroupBox with the Qt style
2020-09-02 17:05: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
6fa010cd53
Improve slider value indication
...
Do not only use the location of the handle to indicate the value, also
fill the rectangle to the left of it.
2020-09-02 10:37:19 +02:00
Simon Hausmann
4e36567e63
A new color scheme for the ugly widget style
2020-09-02 09:08:49 +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
Simon Hausmann
55764de31d
Fix alignment of text in the spin box buttons
...
Center nicely :-)
2020-08-28 16:41:36 +02:00
Simon Hausmann
a9737d77fc
Fix vertical alignment of spinbox text
...
Same fix as for the checkbox.
2020-08-28 16:36:01 +02:00
Simon Hausmann
d0afe4289e
Fix text alignment of checkbox text
...
Align it vertically
2020-08-28 16:32:51 +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
6ad581f2a0
Move the sixtyfps_widgets.60 to the compiler directory
...
We need to do that because it needs to be in the compiler crates.io package
2020-08-25 12:19:08 +02:00