Commit graph

198 commits

Author SHA1 Message Date
Florian Blasius
866300c34b
Improved Slider drag and click behaviour (#4406) 2024-01-24 13:12:36 +01:00
Olivier Goffart
a19a2cfc8d Material style: make the ScrollView pan with the mouse
Other style are more desktop oriented, but this is important on android
to pan with the finger
2024-01-23 17:44:16 +01:00
Florian Blasius
2871fadd5c
Added SliderBase and use it in non qt styles. (#4384) 2024-01-19 13:14:17 +01:00
Florian Blasius
c8f58be7c9
Reject events on disabled ComboBox (#4359) 2024-01-17 15:41:32 +01:00
Florian Blasius
0a2147c6a8 Revert "Disable keyboard input on disabled ComboBox"
This reverts commit 33578d8898.
2024-01-16 15:21:55 +01:00
Florian Blasius
33578d8898 Disable keyboard input on disabled ComboBox 2024-01-16 15:18:07 +01:00
Florian Blasius
2cf2a36b1d Fix style issues on the cosmic style 2024-01-16 15:16:04 +01:00
Florian Blasius
1ca8ff517e
Added cosmic style for std-widgets. (#4350) 2024-01-16 13:21:17 +01:00
Brandon Fowler
3e8940660b
Add set-selection-offsets function to TextInput, TextEdit, and LineEdit (#4197)
The function accepts two arguments that specify the start and the end of the text to select.

Fixes #4164
2024-01-06 11:12:53 +01:00
Olivier Goffart
6ca9a9b884 SpinBox: enabled by default 2024-01-02 12:11:41 +01:00
Simon Hausmann
617d0921ca Fix Switch element in Cupertino & Fluent style not showing text when font size is large
Take the minimum height of the layout into account, like in the material style implementation.

Fixes #4201
2024-01-02 10:07:03 +01:00
Florian Blasius
e587c09d9c
Added colorize-icon to Button (#4152)
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
2023-12-14 12:07:55 +01:00
Florian Blasius
6da8120dfa
added palette global (#3984)
* Update docs/reference/src/language/builtins/globals.md

Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>

* Update docs/reference/src/language/builtins/globals.md

Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>

* Update docs/reference/src/language/builtins/globals.md

Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>

* Update docs/reference/src/language/builtins/globals.md

Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>

* Update docs/reference/src/language/builtins/globals.md

Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>


---------

Co-authored-by: Florian Blasius <florian.blasius@slint-ui.com>
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
Co-authored-by: Florian Blasius <flovansl@fedora.fritz.box>
2023-12-11 14:44:05 +00:00
ogoffart
b081c489d6 Bump version number to 1.4.0 2023-12-11 11:21:37 +00:00
Florian Blasius
6d6b18300a
added focus state to StandardLIstView (#4086)
* added focus state to StandardLIstView

* (wip) focus handling for qt style

* Update CHANGELOG.md

Co-authored-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>

* Share StandardListView between all styles

* Update internal/compiler/widgets/material-base/combobox.slint

Co-authored-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>

* code review feedback

---------

Co-authored-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
2023-12-08 10:58:58 +01:00
Florian Blasius
c53a70db8d
fixed cupertino spinbox, move more code to base (#4083) 2023-12-07 14:53:31 +01:00
Florian Blasius
5d34c8307b
combobox fix mouse wheel selection direction (#4091) 2023-12-07 14:53:02 +01:00
ogoffart
b9255ab8e2 Bump version number to 1.3.2 2023-12-01 08:05:15 +00:00
Olivier Goffart
41f7275c35 Fluent: fix disabled LineEdit
The `color` is the Rectangle's deprecated alias to background. I wonder why we don't get a warning though.
It was meant to change the text-color
2023-12-01 07:25:00 +01:00
Florian Blasius
e55bde4c97
fix lineedit callbacks (#4028) 2023-11-29 06:13:23 +01:00
Florian Blasius
6963aefb7b make fluent scrollbar bigger 2023-11-27 22:21:52 +01:00
Olivier Goffart
017448893a
Fix LineEdit with right alignment (#4016)
* Fix LineEdit with right alignement

 - Align the placeholder the same way
 - Make sure the cursor is visible to the right (it is drawn outside of
   the TextInput, so some size need to be accounted for

(Discussed in https://github.com/slint-ui/slint/discussions/3996 )
2023-11-27 18:52:54 +01:00
Florian Blasius
c00a21d651
make use of textinputbase (#4014) 2023-11-27 08:50:29 +01:00
Olivier Goffart
e27a662019 Revert "Clip button texts"
This reverts commit 19e1cd8ac2.

This caused regressions as the button no longer have the proper minimum
size.

Fixes #3985
Reverts #3977
2023-11-23 08:53:12 +01:00
ogoffart
0a5bf6c37b Bump version number to 1.3.1 2023-11-23 07:47:07 +00:00
George Hopkins
19e1cd8ac2 Clip button texts 2023-11-22 06:49:33 +01:00
Florian Blasius
62e5fb43bf
align styling resources (#3973) 2023-11-21 14:45:07 +01:00
Florian Blasius
aeace4c4ed
fluent: fixed scrollbar width / height (#3939) 2023-11-16 06:49:34 +01:00
Florian Blasius
95582e6794
fluent: make scrollbars overlay (#3932) 2023-11-15 19:04:02 +01:00
Olivier Goffart
7a04b9a643 Qt Spinner: different design without hardcoded strong colors 2023-11-08 12:04:18 +01:00
Florian Blasius
110689bad1
Added Spinner widget (#3871) 2023-11-07 15:04:24 +01:00
Simon Hausmann
a5c3692fbc Add progress-indicator accessible role 2023-11-07 13:37:12 +01:00
Olivier Goffart
34ea148c48 Fluent combobox: always put the first item on top
Currently it's always the second, but that's not great.
Ideally it should be the current active element, but that's hard to
compute

This becomes extra-relevent when our preview UI has a combobox on the
top and that it is clipped to the window by winit

Fixes https://github.com/slint-ui/slint/issues/3345
2023-11-07 11:12:27 +01:00
Simon Hausmann
1e579eeb4e Make it possible to focus Cupertino and Fluent buttons
The Material button already has the forward-focus.
2023-11-02 07:24:42 +01:00
Florian Blasius
10066c5eef
cleanup widgets according to upcoming code guidelines (#3771) 2023-10-30 10:45:25 +01:00
Florian Blasius
74219f833c
Make fluent light scroll bars more visible (#3759) 2023-10-25 09:30:23 +02:00
Florian Blasius
030cf2cd19
Update scroll offset on ScrollView on ScrollBar scroll-event (#3668) 2023-10-16 10:41:39 +02:00
Tobias Hunger
b12575a4c4 janitor: Go over our spell checking setup
* Extend the cspell word list
* Remove those extensions from individual source files
* white-list licenses and such as we should not meddle with those
* Fix spelling
2023-10-16 09:01:51 +02:00
Florian Blasius
e83f3c8068
Added SpinBoxBase, use scroll-event to change value. (#3665) 2023-10-13 13:37:20 +02:00
Florian Blasius
caecbb98ac
Introduce ComboboxBase and in/decrement selection by scroll event (#3648) 2023-10-11 12:55:49 +02:00
Olivier Goffart
08b6393af9 material style todo demo polish
- Remove extra padding from the todo demo. Box in Box causes the
   padding to be added twice otherwise. And the Box have extra big
   padding with the material style.

 - Fixup the combobox size to be consistant with fluent wrt sizing

 - Use the proper color for the checkbox border, following the
   style specification
2023-09-26 08:42:31 +02:00
Olivier Goffart
4398a64add Fluent: fix selection foreground color
When selecting text, the foreground color is inverted
2023-09-26 07:25:59 +02:00
Olivier Goffart
834068a20e Rename "native" style to "qt", make "native" an alias
First step of https://github.com/slint-ui/slint/issues/3431
2023-09-25 09:06:47 +02:00
J-P Nurmi
123406338d
StandardTableView: prevent internal FocusScope from eating the first press (#3495)
* TableView: prevent internal FocusScope from eating the first press

Fixes: #3436

* Restore keyboard navigation
2023-09-19 09:45:19 +02:00
Florian Blasius
9af3d6a546 Fix two visual issues in cupertino TextEdit. 2023-09-14 19:20:02 +02:00
Florian Blasius
493f3bd236
Finish state visuals of cupertino style. (#3462) 2023-09-14 11:05:03 +02:00
Aurindam Jana
e01e9685be
Update Slint logo folder with new design (#3432)
This PR updates the logos and branding guideline of Slint to match the new website design. The new logos are a 1:1 replacement of the old logos except for the circular logo. In the new logo design, there isn't a separate circular logo, as the square logo with circular crop can be used. Further, the logo folder also contains logos in CMYK for use in printed materials. The PMS is just the color value in the naming and can be used where Pantome colors are required. The README has been updated to explain which logos to use when as well as the Slint "blue" color.
2023-09-11 16:41:06 +02:00
Thorbjørn Lindeijer
74b37df4db
Optimize StandardTableView in Fluent, Material and Native styles (#3425)
* Optimize StandardTableView in Fluent and Material styles

By using a ListView instead of a ScrollView + VerticalLayout, we trigger
the optimization where only visible children are being instantiated.

For the Fluent style, this was making the rows more compact, so I've
added additional padding to the TableViewCell to compensate. I don't
know where the padding used to come from.

I didn't touch Cupertino style since it's currently work-in-progress.
This optimization can be done there as well.

For the Native style, this optimization isn't as straight-forward
because it uses a NativeScrollView + Flickable directly rather than a
the ScrollView.

* Optimize StandardTableView for Native style

Using the ListView makes it possible to only instantiate the visible
items, which makes the StandardTableView a lot faster for larger models
(already very noticeably in the gallery example).

When using a ListView, StandardTableView lost access to the
NativeScrollView.native-padding-top/left properties, which are now
exposed through the ScrollView item.

It could also no longer position the Flickable below the header (or in
doing so, would take the scrollbar along with it), so a property was
added to ScrollView for that purpose as well.

* Introduced InternalScrollView

This avoids exposing additional properties on the ScrollView for just
the native style.

* Fix missing default values for Native style ScrollView

Added minimum size, preferred size and stretch factors (they were not
present before introducing InternalScrollView either, but are added now
for consistency with the other styles).
2023-09-08 08:23:03 +02:00
tronical
b8b9db4e42 Bump version number to 1.3.0 2023-09-05 15:46:36 +02:00
Olivier Goffart
4920224be0
Rename Slider::vertical to Slider::orientation 2023-08-30 13:43:59 +02:00