Commit graph

43 commits

Author SHA1 Message Date
Enyium
cb2a386c40
Improved GridLayout docs. (#6368)
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
2024-10-02 11:38:32 +02:00
Simon Hausmann
68a4e15cff Fix link to images docs
Fixes #6408
2024-10-01 10:06:36 +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
bcdc3e1cee Timer: make the interval property mandatory
A default of 0 is not a great default because that's way too often
2024-09-18 09:24:39 +02:00
Olivier Goffart
21d60b1050 Fix the documentation of the absolute-position property
It is an `out` property (read-only)

Fixes #6174
2024-09-17 08:52:32 +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
302b23b020
docs: add a note that z needs to be a compile time constant
As mentioned in https://github.com/slint-ui/slint/issues/221#issuecomment-2306360643
2024-08-23 12:05:08 +02:00
Olivier Goffart
48de17f5c6 Update Timer documentation
Apply suggestions from code review

Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
2024-08-16 16:36:38 +02:00
Olivier Goffart
a9f526491a Timer Element
Closes #5724
2024-08-16 16:36:38 +02:00
Kevin Moonen
34f1a990d7 Clarify that generated <kind>_clicked callbacks are aliases
My assumption from reading the docs was that the `StandardButton`s
delegated to the root and that the generated callbacks in the root
were to facilitate that behavior.
2024-07-31 07:25:41 +02:00
Olivier Goffart
7c93c7438b Rename resize-border => resize-border-width 2024-07-05 12:50:16 +02:00
Simon Hausmann
bc458ebb26 Add rotation properties to the Text docs
Amends 7896e645b2
2024-07-03 11:16:58 +02:00
Arnold Loubriat
ce2db77e88
Add the accessible-placeholder-text property (#5464) 2024-06-26 12:59:22 +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
Noah Sweilem
e62f75cfd1 Docs: add info about text stroking 2024-04-26 13:16:19 +02:00
Simon Hausmann
899ed0e1ba Document the impact of clear-focus() 2024-04-26 11:09:11 +02:00
Simon Hausmann
31767eb6ab Add a clear-focus()function on all elements that have a focus() function
This is the counter-part, which removes focus from the element if it's currently focused. The window - if focused - may still be focused towards the windowing system.
2024-04-26 11:09:11 +02:00
Olivier Goffart
0dd8cd257a
Documentation for the accessible-action 2024-04-18 19:17:35 +02:00
Olivier Goffart
74d0dafb9c
docs: delete docs for property that doesn't exist
Discussion on https://github.com/slint-ui/slint/pull/4899#issuecomment-2012072132
2024-03-21 13:01:19 +01:00
Olivier Goffart
255dc59ef4 Rename @image-url(..., 9slice(...)) to @image-url(..., nine-slice(...))
As per API review:
 - In the Rust and C++ API we use `set_nine_slice_edges` because the getter couldn't start with 9
 - in english we spell number less than 10 with letters and this is a name
2024-03-07 17:01:57 +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
192ff07857 Documentation for 9slice 2024-02-13 14:46:27 +01:00
Olivier Goffart
ce6c7f5527 Image: add horizontal and vertical alignment 2024-02-08 18:59:26 +01:00
J-P Nurmi
51457025bf Add BorderRectangle::border_top|bottom_left|right_radius 2024-02-06 18:01:35 +01:00
Simon Hausmann
e619a50601
Clarify TouchArea docs with regards to clicking and touching (#4409)
Mention that clicked is limited to the left mouse button, or any finger of course.

Fixes #4213
2024-01-23 17:45:56 +01:00
Tobias Hunger
ad026d2a4c core: Change double-click to always send clicked first
Change the double-click implementation to send after two click events
were sent first.

This gets rid of the wait when a double-click handler is installed
before delivering the click.
2024-01-10 11:41:55 +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
0ca42445c1 Janitor: fixup markdown typo 2023-12-29 13:54:16 +01:00
Tobias Hunger
9737720cf2 touch-area: Trigger pointer-evnet on mouse move
Trigger the `pointer-event` callback on mouse move. This is of "kind"
Move and the mouse button will always be `Other`, but at least the mappings
will be correct:-)

Closes: #2770
2023-12-11 09:07:44 +01: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
Olivier Goffart
c695869344 Fix typo in docs 2023-11-17 14:31:25 +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
Simon Hausmann
0ff0153462 doc: Add missing period 2023-10-06 14:25:24 +02:00
Simon Hausmann
c061dfc3b7
doc: Attempt to document the algorithm by which the Flickable interpr… (#3572)
Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
2023-09-29 17:21:58 +02:00
Guiguiprim
05cdf88871
Add spacing-horizontal and spacing-vertical to layout (#3532) 2023-09-28 13:49:28 +02:00
Simon Hausmann
2b7aa6ba2d Change doc formatting of arguments in callbacks and functions
- Use a single code fence for the entire signature. Some where uses the one, some the other format. This unifies to the single fence that's easy to read and avoids extra visual boxes.
- Removed names from arguments as that's not valid syntax at the moment.
2023-08-30 16:38:25 +02:00
Simon Hausmann
96d7bb132c reuse: remove glob for markdown files
Instead, place the copyright and license right into the source.

To satisfy reuse, this also removes the unnecessary MIT.txt
symlinks.
2023-08-17 08:55:28 +02:00
Simon Hausmann
e591f8d8ed Fix broken link to EventResult enum
It's an enum, thus in enums.md, not structs.md.
2023-08-15 12:04:43 +02:00
Simon Hausmann
d61a929e34 Move widgets out of builtins/ and into its own section under the language reference 2023-08-15 12:04:43 +02:00
Simon Hausmann
870e0e541d Restructure the Slint reference documentation
- Move the language reference into a sub-section of its own
- Made Reciples & Examples a top-level section

This paves the way for adding more top-level sections, such as advanced topics (with debugging techniques), or the list of supported
platforms.
2023-08-15 10:43:49 +02:00
Renamed from docs/language/src/builtins/elements.md (Browse further)