Commit graph

108 commits

Author SHA1 Message Date
Olivier Goffart
19ce555d36 Don't hardcode ScrollArea's viewport size
The Flickable should already have sane default

But we need to make sure that the default binding don't override bindings
set with aliases. So we must use BindingsMap::set_binding_if_not_set which
sets the priority properly

Closes #581
2021-10-15 15:43:44 +02:00
Simon Hausmann
4a26faef9a Add AboutSixtyFPS element 2021-10-05 23:16:46 +02:00
Olivier Goffart
671df0f24f New widget: StandardButton 2021-09-29 16:25:44 +02:00
Simon Hausmann
ec7d9a196d Fix stretch of children of the GroupBox widget
Apply a vertical stretch in the fluent and ugly style, to match the native style.

Fixes #487
2021-09-10 10:38:32 +02:00
Olivier Goffart
e8c1fccbbc Fix the ugly style not compiling 2021-09-07 12:35:19 +02:00
Olivier Goffart
cbf22d494e TextEdit 2021-09-06 21:52:12 +02:00
Olivier Goffart
a28bc7c629 Refactor the way the builtin files are loaded
So that we can share some code accross styles
2021-09-03 22:31:54 +02:00
Olivier Goffart
4f1eacd6d8 LineEdit is now able to scroll to keep the cursor visible 2021-09-02 17:20:44 +02:00
Olivier Goffart
b2392c25c7 Basic support for Multi-line TextInput 2021-09-01 16:52:37 +02:00
Simon Hausmann
cdca921469 Apply the default text color from the style for the color of Text and TextInput elements
We apply a default window background from the palette to all `Window`
elements, and likewise we need to apply the default text color to Text
elements to ensure a readable contrast.

This also fixes the default text color when using Qt/native style in
dark mode on macOS.
2021-08-23 15:03:18 +02:00
Simon Hausmann
d5a969f804 fluent style: make combobox selection slightly more intuitive
Highlight (and select) items when hovering into the background, not just over the text.

This is done by making sure the touch area covers the entire item. The same change
is applied to the ugly style, which however isn't directly affected as it has not padding.
2021-08-19 09:40:46 +02:00
Simon Hausmann
a87fdcb499 Minor cleanup in fluent and ugly style
Use a property alias for the groupbox title
2021-08-19 09:12:18 +02:00
Olivier Goffart
143510b593 Set the width of items in a ListView
Fixes #408
2021-08-13 11:57:56 +02:00
Olivier Goffart
6cb1095e53 Styles: replace all _ by - 2021-08-10 22:21:01 +02:00
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
63db0959f9 Fix the TabWidget's ugly style size constraints 2021-08-06 15:58:13 +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
90cdb5ab5d Add a changed callback to Slider
Closes #125
2021-07-31 15:14:03 +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
6aa6dec9b4 Small simplification on the usages of ListView
Now that the height computation is done properly
2021-07-22 17:29:53 +02:00
Olivier Goffart
cc7242c523 Add a selected callback to ComboBox 2021-07-13 11:42:31 +02:00
Olivier Goffart
13bd828b96 Update license date 2021-07-02 15:55:54 +02:00
Olivier Goffart
c5312fd642 Ugly style: use a layout for the ComboBox
Then it is properly layed out and we can use the auto-wrap in the gallery example
2021-07-02 14:17:15 +02:00
Olivier Goffart
8f4a1c9221 Apply suggestions from code review
Co-authored-by: Simon Hausmann <simon.hausmann@sixtyfps.io>
2021-06-21 14:29:53 +02:00
Olivier Goffart
962dc0075c Layout: Make the default padding and spacing 0
and add Box widgets that have proper defaults

Closes #200
2021-06-21 14:29:53 +02:00
Olivier Goffart
ee00c9eb92 Rename maximum- and minimum- properties to max- and min-
Issue #259
2021-06-14 10:28:30 +02:00
Simon Hausmann
ecaa55832f Use hover for the ugly style combo box as well
This appears to be more consistent with how most combo boxes behave
2021-04-30 15:14:10 +02:00
Olivier Goffart
a677cb7402 Fix the ugly list view 2021-04-27 11:29:43 +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
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
afbb537bc1 Add TouchArea::enabled
and use it in the ugly style
2021-02-05 14:21:20 +01:00
Simon Hausmann
c771bcff45 Print a warning when trying to animate deprecated properties 2021-02-02 22:58:54 +01:00
Simon Hausmann
e61529976e Issue warnings when creating bindings against deprecated properties 2021-02-02 22:42:02 +01:00
Olivier Goffart
b91f945a07 Fix horizontal scrollbar in ugly style
the new rendering backend behavior is different if the border radius is bigger
than the small border
2021-01-29 17:41:39 +01:00
Olivier Goffart
07df517473 Replace $children with @children 2021-01-28 11:55:08 +01:00
Simon Hausmann
a69ce3a397 Remove the 'align-' prefix from TextHorizontal/TextVerticalAlignment 2021-01-25 10:59:18 +01:00
Simon Hausmann
521e15e5b0 Add a forward-focus declaration for LineEdit
This allows calling `focus()` on a `LineEdit`.
2021-01-20 15:52:58 +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
56b67eac8c Complete the last patch to add a minimum/maximum properties to the SpinBox 2020-12-29 09:44:19 +01:00
Seo Sanghyeon
6ec1c2b446 Add minimum to SpinBox 2020-12-29 09:32:56 +01:00
Olivier Goffart
0d2d48be4f Rename "signal" to "callback" 2020-12-18 09:51:01 +01:00
Olivier Goffart
f3a5034344 Style 2020-12-14 12:56:38 +01:00
Olivier Goffart
9d50960c98 More fixes to disabled widgets 2020-12-14 11:43:19 +01:00
Olivier Goffart
26827733ac Fix: disabled slider should not react to click 2020-12-14 09:44:10 +01:00
Olivier Goffart
e895e88e7f Disabled color for the line edit 2020-12-01 12:10:43 +01:00
Olivier Goffart
a973791676 Fix move property inside a popup 2020-11-30 18:39:41 +01:00
Olivier Goffart
7bfa998f00 Popup positioning 2020-11-30 18:39:41 +01:00
Olivier Goffart
b0a9d65f55 More Popup WIP 2020-11-30 18:39:41 +01:00
Olivier Goffart
c37f0ce4c4 Load the cursor width property from the style
Ideally we would put the bindings dirrectly in the builtins.60
But this is unfortunately not possible because the "StyleMetrics" is not
yet available there and that would be a circular dependencies.
2020-11-25 09:58:54 +01:00