Florian Blasius
030cf2cd19
Update scroll offset on ScrollView on ScrollBar scroll-event ( #3668 )
2023-10-16 10:41:39 +02:00
Florian Blasius
e83f3c8068
Added SpinBoxBase, use scroll-event to change value. ( #3665 )
2023-10-13 13:37:20 +02:00
Olivier Goffart
0b4bfd3a40
Qt style: Fix GroupBox not being clipped
...
Fixes #3541
2023-09-25 12:35:41 +02:00
Olivier Goffart
9466819421
Qt style: fix enabled state in some widgets
2023-09-25 10:48:51 +02:00
Olivier Goffart
d3ed4dfad0
Qt Widgets: set the preferred-size to the minimum-size
...
Instead of setting it to 0 which cause `widget.preferred-width` ti be 0
Fixes #3527
2023-09-22 14:31:46 +02:00
Thorbjørn Lindeijer
7ee17d0914
Native style: Fixed scroll bar handle size for ScrollView ( #3489 )
...
This reverts commit 07f42afef3
, but applies
the same change specifically to the Slider, without affecting the
ScrollView.
The scaling up by factor 1024.0 of the min, max and value caused problems
for the ScrollView, which needs these values to match the viewport size
in order to correctly calculate the size of the scrollbar handle.
2023-09-19 10:07:25 +02:00
Guilhem Vallat
5cf1a45e41
Remove duplicated geometry properties from items
2023-09-13 16:08:37 +02:00
Olivier Goffart
06fc251729
Remove the geometry on ItemVTable
2023-09-13 16:08:37 +02:00
Olivier Goffart
4920224be0
Rename Slider::vertical to Slider::orientation
2023-08-30 13:43:59 +02:00
Olivier Goffart
c84a89c4ef
Native Style: Fix groupbox with the fusion style
2023-08-17 20:44:51 +02:00
Olivier Goffart
8884ce3565
Native Style: don't call initFrom on QStyleOption
...
This adds the enabled state which we don't need
2023-08-17 20:44:51 +02:00
Eric
4b9fb89332
add property for slider to support vertical orientation ( #3236 )
2023-08-16 09:58:50 +02:00
Tobias Hunger
d47d52bf52
ItemVTable::init(...): Take an ItemRc so that the itan can know where in the Item Tree it is located
2023-07-27 12:04:16 +02: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
Simon Hausmann
64f1504ab9
Fix rendering of QStyle animations
...
Allocate a widget per NativeXXX. This way QStyleAnimation objects
created by Qt aren't shared among style options.
Fixes #2045
Fixes #2987
2023-07-14 13:09:45 +02:00
Aurindam Jana
5a4a7fee63
Update royalty free license to 1.1 ( #2994 )
2023-07-10 10:12:11 +02:00
Simon Hausmann
07f42afef3
Fix support normalized ranges for Slider with Qt style
...
The OpenGL Texture import example uses a Slider in the range 0..1. That doesn't work with
QStyleOptionSlider out of the box because it's
using integer values.
2023-06-28 17:42:34 +02:00
Tobias Hunger
e02c360000
Clippy polish
2023-06-28 14:22:30 +02:00
Tobias Hunger
8345c6cd79
Do automatic clippy fixes
2023-06-28 14:22:30 +02:00
Olivier Goffart
1b9e245b4e
Remove the NativeSwitch
...
It is identical to the NativeCheckBox (Qt don't have a switch widget)
2023-06-23 11:02:46 +02:00
Olivier Goffart
d5fe68443f
Native ProgressIndicator: initialize the state properly
2023-06-22 14:23:56 +02:00
Olivier Goffart
d5784811c7
Native style: Fix indeterminate ProgressIndicator
...
We need to pass a styleObject for the animation to work
The state will be shared accross all progressbar, but that's ok
2023-06-21 06:37:34 +02:00
Olivier Goffart
08e20c8586
Don't emit clicked when the pointer did not press the area
...
eg: releasing the pointer over a button that wasn't pressed shouldn't
click it
Fixes #2918
2023-06-20 16:06:12 +02:00
Florian Blasius
2656dfad7d
Refactor ProgressIndicator api according to api review. ( #2937 )
...
* Refactor ProgressIndicator api according to api review.
* Update docs/language/src/builtins/widgets.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Capping progress also for native.
---------
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
2023-06-20 12:27:48 +02:00
Olivier Goffart
11dea135f7
Domain: slint-ui.com -> slint.dev
2023-06-16 10:55:08 +02:00
Tobias Hunger
04d1229685
Fix licnese information using xtask
2023-06-16 09:14:20 +02:00
Olivier Goffart
033263127b
Qt Combobox: make it look proper when the style show the comobox in popup mode
...
As discusseed in https://github.com/slint-ui/slint/discussions/2893
Also initialize the current item the same way as fluent and material
2023-06-15 17:14:28 +02:00
Aurindam Jana
039e54a5de
Add royalty free license to files except examples and docs ( #2888 )
2023-06-15 11:20:50 +02:00
Simon Hausmann
01b00d26eb
Rust: Allocate the window adapter lazily
...
This will be needed for embedding - to avoid creating two window
adapters - and it will be needed for the API to allow creating a
component from an existing window.
2023-06-10 11:41:04 +02:00
Florian Blasius
94a0327af6
Add primary flag toButton
( #2820 )
...
* Add default flag to button
* Code review feedback
* Update CHANGELOG.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update examples/gallery/ui/pages/controls_page.slint
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Code review feedback
---------
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
2023-06-06 15:41:23 +02:00
Florian Blasius
b4472b9118
Added switch widget ( #2798 )
...
* Add material Switch
* Add fluent switch
* Add native Switch and cleanup
* Rebase fix
* Update internal/compiler/widgets/fluent-base/std-widgets-impl.slint
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Code review
* Update docs/language/src/builtins/widgets.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update docs/language/src/builtins/widgets.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Code review
* Update docs/language/src/builtins/widgets.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update examples/gallery/ui/pages/controls_page.slint
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Code review tweak on gallery layout
* Code review tweak on gallery layout
---------
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
2023-05-31 14:57:23 +02:00
Florian Blasius
9e267bcc94
Add ProgressIndicator widgets ( #2792 )
...
* Add material ProgressIndicator and documentation
* Add fluent ProgressIndicator
* Add native ProgressIndicator
* Update docs/language/src/builtins/widgets.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update docs/language/src/builtins/widgets.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update docs/language/src/builtins/widgets.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update docs/language/src/builtins/widgets.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Code review
* Update internal/compiler/widgets/fluent-base/std-widgets-base.slint
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update changelog
---------
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
2023-05-31 09:57:12 +02:00
Tobias Hunger
3ac01c3f07
clippy: Fix clippy warnings
2023-03-09 09:35:29 +01:00
Olivier Goffart
ca7b2e0bb8
Harmonize style properties
2023-02-10 16:49:25 +01:00
Florian Blasius
d84de623b4
TextEdit select text with double and dribble click ( #2088 )
...
* Select word in `TextEdit` by double click
* Select paragraph in `TextEdit` by dribble click
2023-01-31 15:04:19 +01:00
Olivier Goffart
0aeb4d2aec
Qt: fix clipping of itemview when not using the Qt backend
...
In that case, the clip is null which means no clip (as opposed as "clip
everything")
2023-01-23 16:26:49 +01:00
Olivier Goffart
66b848227b
StandardTableView resizable columns
2023-01-23 16:26:49 +01:00
Olivier Goffart
fabebaa009
Adjust the look of the native StandatdTableView
...
- The header should be within the frame
- Use the NativeStandardListViewItem so we have the right alternative
row coloring and hover
2023-01-23 16:26:49 +01:00
Olivier Goffart
dab95b4220
Native button: highlight on mouse over
2023-01-16 03:12:35 -08:00
Florian Blasius
f2aab576f4
Add StandardTableView widget ( #2032 )
...
* Text only StandardTableView with column and rows
* Text editing of cells
* Sort by column ascending and descending
* Variants of the TableView for native, fluent and material
2023-01-12 19:41:12 +01:00
Simon Hausmann
39121994ca
Always set Window.default-font-size
...
Permit the style metrics to provide a `default-font-size` and bind that
to the `Window` if set. If not provided, then the backend can set a
`default-font-size`. By ensuring that the value is non-zero at run-time,
we can later introduce a rem unit that can act as factor relative to
this non-zero font size.
2022-11-03 17:15:44 +01:00
Simon Hausmann
c16253d29f
Use Property<LogicalLength> instead of Property<Coord>
...
This removes the special code for the generated property getters and
ensures type safety in the run-time library for property value setting.
In the Rust generated code we continue to do arithmetic on the scalar
values, that means we immediately extract the scalar, do arithmetic and
rely on the compiler to only allow compatible units.
Danger zone alert: In the interpreter Value::Number can now be converted
to LogicalLength as-is.
2022-10-24 12:49:37 +02:00
Florian Blasius
c58c704f16
Change type of Window
background
from color
to brush
( #1755 )
2022-10-21 16:17:22 +02:00
Olivier Goffart
6ee932883a
Rename stark-style to dark-color-scheme
...
That's the term used by CSS
2022-10-19 15:23:41 +02:00
Olivier Goffart
0ba468c236
Use a builtin function to access the dark-style
...
instead of a property on NativeStyleMetrics
2022-10-19 15:23:41 +02:00
Olivier Goffart
eb879a80b5
Ensure that the Qt's NativeStyleMetrics don't crash when called from different threads
...
The test system may run tests in threads using the fluent style and the
testing backend. But because the Qt backend is compiled in, the
NativeStyleMetrics is going to be Qt's and it will potentially be
constructed several times in parallel from different thread, causing
warnings and crashes within Qt.
So don't initialize the StyleMetrics, it is only used for the dark style
anyway
2022-10-18 15:54:57 +02:00
Simon Hausmann
c11b4305c1
Change Item::geometry() to return a LogicalRect
2022-10-13 17:02:18 +02:00
Simon Hausmann
8cba0622f5
Initial input method support for the winit backend and the FemtoVG/Skia renderers
...
Known caveats:
- winit doesn't forward mouse events to the IME, so clicking
with the mouse while composing results in funny effects such
as the pre-edit text following the cursor.
- With FemtoVG there's no text decoration support, thus no underlining
of the preedit area.
2022-10-07 11:16:36 +02:00
Simon Hausmann
c40b82c509
Add ItemRc to focus_event and key_event
...
This will be needed to compute the cursor rectangle in window coordinates, by
traversal of the parent chain.
2022-10-07 11:16:36 +02:00
Simon Hausmann
7967bf1ab0
Replace the internal WindowHandleAccess
trait with a helper function on WindowInner
...
The reversal of ownership removes the need for the glue trait in the
publicly visible API.
2022-09-06 16:17:06 +02:00