mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-28 12:54:45 +00:00

This patch adds a `close()` function that can be called to close a popup window, and a `close-to-click` boolean that can be set to false to disable the default behavior.
14 lines
408 B
Text
14 lines
408 B
Text
// Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
|
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
|
|
|
|
|
export Bar := Rectangle {
|
|
in property <bool> external;
|
|
PopupWindow {
|
|
close-on-click: true;
|
|
}
|
|
PopupWindow {
|
|
close-on-click: root.external;
|
|
// ^error{The close-on-click property only supports constants at the moment}
|
|
}
|
|
}
|