mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
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
This commit is contained in:
parent
bc5a468513
commit
4cd6f92013
9 changed files with 53 additions and 15 deletions
|
@ -219,8 +219,11 @@ component ContextMenu inherits Empty {
|
|||
callback activated(entry: MenuEntry);
|
||||
callback sub-menu(entry: MenuEntry) -> [MenuEntry];
|
||||
callback show(position: Point);
|
||||
function close() {}
|
||||
function is-open() -> bool {}
|
||||
function close() {
|
||||
}
|
||||
function is-open() -> bool {
|
||||
}
|
||||
in property <bool> enabled: true;
|
||||
}
|
||||
|
||||
// Lowered in lower_menus pass.
|
||||
|
@ -236,11 +239,13 @@ export component ContextMenuInternal inherits ContextMenu {
|
|||
export component ContextMenuArea inherits Empty {
|
||||
// This is actually function as part of out interface, but a callback as much is the runtime concerned
|
||||
callback show(position: Point);
|
||||
function close() {}
|
||||
function close() {
|
||||
}
|
||||
//-default_size_binding:expands_to_parent_geometry
|
||||
Menu {}
|
||||
}
|
||||
Menu { }
|
||||
|
||||
in property <bool> enabled: true;
|
||||
}
|
||||
|
||||
component WindowItem {
|
||||
in-out property <length> width;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue