Olivier Goffart
459fad7528
Janitor: fix comments in builtins.slint
...
The compiler is using StyleMetrics
2024-12-02 11:08:35 +01:00
FloVanGH
712f930897
windows: added skip_taskbar ( #6911 )
...
* Update internal/backends/winit/winitwindowadapter.rs
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update internal/backends/winit/winitwindowadapter.rs
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update docs/src/content/docs/reference/window/window.mdx
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
2024-11-27 09:55:11 +00:00
Olivier Goffart
6e91b9bc91
Give name to the builtin element's callback argument
2024-11-21 09:53:17 +01:00
Olivier Goffart
f225f79d49
compiler: Put the argument names in the Type
...
That simplifies things a bit and will allow to have names for builtin callback and functions
2024-11-21 09:53:17 +01:00
Olivier Goffart
5bd20def0e
Experimental support for MenuBar
...
Introduces `MenuBar{ ... }` that can be put in a Window
2024-11-20 09:25:37 +01:00
FloVanGH
5ea05e18af
std-widgets: added horizontal-alignment to SpinBox ( #6778 )
2024-11-15 08:05:57 +00:00
Arnold Loubriat
97219c21bf
Add the accessible-size-of-set
property
2024-10-30 15:54:01 +08:00
Ryan Naddy
58efd5312b
Added rejected to TextInput ( #6649 )
2024-10-25 17:24:47 +02:00
FloVanGH
14c7910d49
PopupWindow: added close-policy property ( #6614 )
...
* Update api/cpp/include/slint_window.h
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update docs/reference/src/language/builtins/elements.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
* Update internal/core/window.rs
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update internal/interpreter/eval.rs
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
* Update internal/backends/qt/qt_window.rs
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update internal/interpreter/dynamic_item_tree.rs
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update internal/compiler/passes/materialize_fake_properties.rs
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
2024-10-24 09:27:39 +00:00
Renato Araujo Oliveira Filho
1e4de3fe0c
Implement ScrollBarPolicy property for ScrollView ( #6442 )
...
ChangeLog: ScrollView: added vertical-bar-policy and horizontal-bar-policy
Fixes : #3552
Fixes : #5578
2024-10-08 17:02:17 +02:00
FloVanGH
fd9807515f
TextInput: use selection colors from palette ( #6381 )
...
* Update internal/compiler/builtins.slint
Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
---------
Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
2024-09-30 10:56:22 +00:00
Florian Blasius
71d1d814ce
Revert "TextInput: use selection colors from palette"
...
This reverts commit 044518ee81
.
2024-09-30 08:43:41 +02:00
Florian Blasius
044518ee81
TextInput: use selection colors from palette
2024-09-30 08:41:41 +02:00
Josh Wood
6a131e2648
Added PropertyAnimation.direction
property for controlling animation direction ( #6261 )
...
Closes #6260
ChangeLog: Added property for controlling animation direction
2024-09-24 19:55:24 +02:00
Simon Hausmann
cd2b738c7a
Rename SwipeGestureRecognizer to SwipeGestureHandler
...
The origin of this proposal is the name of the `swipe-left`, etc.
directional, boolean properties. They're missing another verb in their
name. In principle the right choice would be "recognize". That is what
the type name suggests, that's the term the documentation uses, so the
code should read `recognize-swipe-left: true;`. However that is a long
word. "Handle" is a verb that's simpler. It's also more generic (that's
a downside), but it's otherwise short enough to make things look
"right":
```
SwipeGestureHandler {
handle-swipe-left: true;
swiped => { something.naviate-left(); }
}
```
Therefore this patch proposes to rename the type to SwipeGestureHandler
and prefixes the boolean directional properties with "handle".
2024-09-18 16:37:27 +02:00
Olivier Goffart
0c8a9fcefb
Fix compiler panic when accessing path.commands in expressions
...
Fixes #5564
2024-09-10 13:36:09 +02:00
Olivier Goffart
5663ddd9cc
SwipeGestureRecognizer ( #6005 )
2024-09-09 14:40:55 +02:00
Olivier Goffart
a9f526491a
Timer Element
...
Closes #5724
2024-08-16 16:36:38 +02:00
Olivier Goffart
35a6e7bde5
Split Text item into SimpleText and ComplexText
...
SimpleText has all the most common properties and is half the size
2024-07-05 12:51:25 +02:00
Olivier Goffart
7c93c7438b
Rename resize-border => resize-border-width
2024-07-05 12:50:16 +02:00
Luc Fauvel
44a537d902
Implemented resizing for non-decorated winit windows ( #5026 )
...
Fixes #5023
* Implemented resizing for non-decorated winit windows
* Fixed formatting
* Changed direction match to use a tuple, reduced resize border size, returned after handling resize
* Added is resizable check for before resizing winit window
* Added resize-border property to window
* Formatted code
* Change resize-border from float to length
2024-06-06 11:17:05 +02:00
Simon Hausmann
d183498c4e
Add support for step-size to SpinBox rendered by the Qt style
...
Fixes #5325
2024-05-31 09:45:29 -07:00
Aurindam Jana
3523e86359
Simplify commercial license ( #3063 )
...
Base the commercial license on the Royalty-free license adding clauses pertaining to the fees.
2024-05-31 14:06:17 +02:00
Aurindam Jana
9a3aa265d5
Update Royalty-free license ( #5257 )
...
Add clarification that Application may not expose Slint APIs.
2024-05-31 10:53:19 +02:00
Noah Sweilem
6ede27a364
Add text stroke properties to Text
element
2024-04-26 13:16:19 +02:00
notfirefox
e2aeb56263
Show focus for NativeComboBox
2024-04-15 15:25:23 +02:00
Aurindam Jana
0cfeec1a31
Update Slint Community License ( #4994 )
...
Updated the version from 1.1 to 1.2
Renamed the header to "Slint Royalty-free Desktop, Mobile, and Web Applications License"
Added definition of "Mobile Application" and grant of right
Moved "Limitations" to 3rd section and "License Conditions - Attributions" to 2nd section
Added flexibility to choose between showing "MadeWithSlint" as a dialog/splash screen or on a public webpage
Moved the para on copyright notices to section under "Limitations"
2024-04-15 15:18:55 +02:00
Simon Hausmann
68083243b2
Add an in-out boolean color-scheme property to Palette ( #4701 )
...
This allows applications to force dark/light mode, as well as determine
which mode is active.
2024-03-26 15:44:22 +01:00
Simon Hausmann
f27c185daf
Add a released callback to Slider ( #4821 )
...
The released callback is invoked when the user finished changing the value, for example
when the arrow key is released.
As a bonus, for the Qt implementation this fixes a few bugs in the keyboard handling:
- Handle orientation
- Implement click-to-focus
- Emit released also on key release
Co-authored-by: Luke D. Jones <luke@ljones.dev>
2024-03-26 14:15:52 +01:00
Olivier Goffart
5c381fd73e
Fix clipping and border-radius
...
Fix #4854
2024-03-14 23:48:16 +01:00
Paul Zinselmeyer
73e05aebdb
Added flicked
-Callback on Flickable
...
As requested in #1462 , I've added a `flicked`-Callback that gets
triggered when the `viewport_x`- or `viewport_y` -Properties are changed
by a mouse drag or mouse wheel movement.
2024-02-26 12:17:31 +01:00
Olivier Goffart
5e7ddf3a19
Image Tiling
...
(Doesn't work yet with 9slice)
2024-02-26 12:16:41 +01:00
Olivier Goffart
ce6c7f5527
Image: add horizontal and vertical alignment
2024-02-08 18:59:26 +01:00
J-P Nurmi
cc5d2b24e5
Add BasicBorderRectangle to avoid unnecessary xxx-border-radius bindings
2024-02-06 18:01:35 +01:00
J-P Nurmi
031742246c
Implement clipping
2024-02-06 18:01:35 +01:00
J-P Nurmi
51457025bf
Add BorderRectangle::border_top|bottom_left|right_radius
2024-02-06 18:01:35 +01:00
Simon Hausmann
6fefe75a1c
Don't require components that use forward-focus to be inlined
...
Achieve this by generating a `focus()` function for such components
and call it from the outside.
This replaces the previous focus handling with what should be cleaner:
- Any `forward-focus: some-element;` is basically syntactic sugar for
`public function focus() { some-element.focus(); }`.
- The init code gets simplified to calling focus() on the root, if it's
available.
Since the `focus()` functions are now generated in the imports pass,
they become visible in the style checker. That means the checker
requires consistent focus handling between the styles.
2024-01-26 12:16:09 +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
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
Olivier Goffart
5d4c390b0f
Compiler: Error when assigning to compile time properties
...
Some property need to be known at compile time. We already had checks
that the binding is a compile time constant, but there was no check to
prevent, say
self.row = 42;
which wouldn't work or could even cause panic or miscompilation of
generated code
Closes #4037
2023-12-12 21:51:56 +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
Tobias Hunger
2bdcbc8e9f
core: Add a double-click
callback to the TouchArea
( #4060 )
...
Co-authored-by: Simon Hausmann <hausmann@gmail.com>
Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
2023-12-08 12:12:41 +01: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
Tobias Hunger
2ad9e07225
component_container: Add has-component
property
...
... that returns a bool when a component is set up in the
ComponentContainer.
2023-11-28 10:38:46 +01:00
Tobias Hunger
83e37f7c51
component_container: Do not auto-match the parent's size
...
This fixes the widget having the right size and sifes some strange
issues I had been wondering about for a while now!
Pass own size to children instead, so that they will always have
matching sizes.
2023-11-01 17:25:42 +01:00
Florian Blasius
3e3dd03566
Added focus-changed-event callback to FocusScope ( #3650 )
2023-10-17 17:30:19 +02:00
Olivier Goffart
4c0a435196
Implement TouchArea::scroll-event
...
Closes #1280
2023-10-07 07:59:53 +02:00
Guiguiprim
05cdf88871
Add spacing-horizontal and spacing-vertical to layout ( #3532 )
2023-09-28 13:49:28 +02:00
Guilhem Vallat
5cf1a45e41
Remove duplicated geometry properties from items
2023-09-13 16:08:37 +02:00
Olivier Goffart
2a8ebb9752
Flickable: don't make the viewport special
...
Instead: add the viewport propety directly in the Flickable
Simplifies the compiler's code generation a bit
2023-09-13 16:08:37 +02:00