Commit graph

18 commits

Author SHA1 Message Date
Montel Laurent
4cd6f92013
Hide action when widget is disabled
ChangeLog: TextEdit/LineEdit : disable context menu action when the widget is disabled or read-only
ChangeLog: Added ContextMenuArea::enabled
2025-05-02 13:20:46 +02:00
Laurent Montel
706bd3e984 Disable cut/paste action in lineedit when disabled 2025-04-19 10:12:45 +02:00
Arnold Loubriat
615be362b2 Disable built-in TextInput accessibility for Spinbox 2025-03-17 14:27:08 +01:00
Olivier Goffart
39191e5acd
Menu API changes
`ContextMenu` -> `ContextMenuArea`

`ContextMenu` must have a `Menu` child.
`MenuItem` can no longer be put dirrectly in `MenuBar` and can no longer
have children
`Menu` is used now for sub menus
2025-02-21 16:03:47 +01:00
Simon Hausmann
368ec3459b
Improve default accessibility of TextInput elements
Apply similar logic as to LineEdit and TextEdit, so that when folks build their own text input widgets, they're accessible by default. Also fixed the docs while at it to mention default applications.

Amends #7669
2025-02-20 13:44:16 +01:00
Olivier Goffart
c85b20d431 ContextMenu on the LineEdit and TextEdit
With usual copy/paste entries

We need to make sure that showing the popup window don't clear the
selection in the TextInput which happens if the TextInput gets a
FocusOut event.
2025-02-11 10:30:11 +01:00
FloVanGH
e0ad561c86
widgets: added key-pressed and key-released callbacks to all text input components (#7081)
* widgets: removed rejected event
* widgets: added key-pressed, key-released callbacks to text input components
* Update docs/astro/src/content/docs/reference/std-widgets/lineedit.mdx
Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>

---------

Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
2024-12-12 16:20:45 +00:00
Olivier Goffart
929e71e6b0 Widgets: add callback arg names to some callback
The ones that have a comment already.

Tests that the name is consistent accross the styles.
2024-11-04 17:09:57 +01:00
Ryan Naddy
58efd5312b
Added rejected to TextInput (#6649) 2024-10-25 17:24:47 +02:00
FloVanGH
b3f19e446e
LineEdit: fixes cursor draws out of bounds (#6382) 2024-10-09 14:31:42 +00:00
Olivier Goffart
d6706494a5
Binding between a read only property to input-output is deprecated (#6419)
ChangeLog: deprecated two way binding between `in` and `in-out` property

Fixes #6400
2024-10-01 16:00:06 +02: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
Olivier Goffart
4856f387ee C++ Todo example: add test 2024-04-22 13:54:28 +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
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
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