Commit graph

29 commits

Author SHA1 Message Date
Olivier Goffart
1e9e252400 Fluent style: uniformize the height of widgets
Make sure they all have the minimum height based on what is currently
the hardcoded value of the button.
Also inlclude the border top and bottom padding in the layout in case the
font is really big
2022-01-20 10:41:14 +01:00
Olivier Goffart
1ba3e7acd1 Fluent style: Fix LineEdit layout
The LineEditInner has good default, no need to overwrite them

This fixes the placeholder text in the todo demo going over the the
button
2022-01-13 10:40:30 +01:00
Olivier Goffart
6699067351 TabWidget: focus the tab when clicking on it
The Tab currently doesn't do anything with the focus, but this
serves as a workaround for #798 so that inner widget of a tab can't
keep the focus when they are hidden

cc #798
2022-01-12 14:54:04 +01:00
Olivier Goffart
34cc89ced6 Fix fluent Slider when the minimum value is set
Fixes #787
2022-01-03 14:32:33 +01:00
Tobias Hunger
bfca0e3573 Mass update copyright messages to be more REUSE compliant 2021-12-22 10:06:12 +01:00
Olivier Goffart
afde21fdeb Handle the Up and Down arrow keys in the StandardListView
This change the current item, but doesn't scroll the view yet to
make sure it is visible.  We are missing the ability to know the
position of the visible item to be able to do that
2021-12-10 11:28:09 +01:00
Olivier Goffart
a102e9ed8d Fix fluent style's Slider changed callback not being called
Fixes #621
2021-11-01 10:29:51 +01:00
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
2716e4b4dd TouchArea: add the pointer-event callback
... instead of `pressed-changed`

This allows to see what mouse button was pressed.

Closes #535
2021-10-04 14:39:49 +02:00
Olivier Goffart
28fd5a3fc1 Fluent style: The Slider and ScrollBar now updates as the mouse moves
Fixes #494
2021-10-01 14:53:25 +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
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
Tobias Hunger
aea4ecca99 Apply pre-commit hooks to all files 2021-08-17 22:38:16 +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
Simon Hausmann
cb03f1fe8f Prospective fix for updater test
Add the font-size property also to the SpinBox in the fluent style, as the old printer demo expects the style to provide it.

Another way would be to run the test with the ugly style, but
that's just hiding the fact that there's an API difference.
2021-08-10 16:18:19 +02:00
Simon Hausmann
df238d738d Fix build of the old printer demo
It uses a font-size on the Button, which is present in the other styles.
2021-08-10 16:06:35 +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
339ca0dc55 Tiny adjustment to the fluent style 2021-08-07 13:28:30 +02:00
Olivier Goffart
d03c9e3e5d Flient style: small fixup so that cargo-ui can compile with it 2021-08-07 10:17:22 +02:00
Olivier Goffart
84fb18d6cf Add a fluent style 2021-08-06 23:23:26 +02:00