Commit graph

386 commits

Author SHA1 Message Date
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
Olivier Goffart
f8e731ab70 Fix material ComboBox height in layout
It specified a height: 100% which set the layout info to have a
`min_percent: 100.0` which bubbles on other layout.
Arguably that's a bug in layouts but this 100% shouldn't be there.
CC: #3346
2023-08-25 09:57:06 +02:00
Olivier Goffart
7994579c1e Fix Material Slider appearence
regression since 4b9fb89332
2023-08-22 09:21:41 +02:00
Florian Blasius
80407d0375
Added cupertino style for std-widgets (#3301)
* Started with cupertino style
2023-08-21 11:04:18 +02:00
Eric
4b9fb89332
add property for slider to support vertical orientation (#3236) 2023-08-16 09:58:50 +02:00
Florian Blasius
297b55dbdd
Added item-pointer-event to StdListView (#3165) 2023-07-26 14:43:55 +02:00
ogoffart
aebaa7d6c9 Bump version number to 1.2.0 2023-07-25 10:44:53 +00:00
Florian Blasius
d65c8a1774
Added current-item-changed to StdListView and current-row-change to StdTableView (#3135) 2023-07-23 08:42:28 +02:00
Florian Blasius
1ecd36d51a
Fixed enabled in fluent ComboBox (#3127)
* Fixed enabled in fluent ComboBox
* Updated changelog
2023-07-21 07:59:36 +02:00
Aleš Katona
44fb865ad4
add row-pointer-event callback to tableview (#3082) 2023-07-19 08:34:24 +02:00
Florian Blasius
94ce4ebaee
Fixed text input on fluent and material SpinBox (#3101) 2023-07-18 07:43:37 +00:00
Eric
1b0d3b1061
Add edited callback for SpinBox (#3096)
* add edited callback for SpinBox
* fix compile error
* add inline comment for callback definition
2023-07-18 07:53:54 +02:00
Aurindam Jana
5a4a7fee63
Update royalty free license to 1.1 (#2994) 2023-07-10 10:12:11 +02:00