slint/internal/compiler/tests/syntax/elements/popup3.slint
Olivier Goffart 66652cdc1d Add a warning if a PopupWindow is in a layout
This is not intuitive since the position of the PopupWindow will not be
handled by the Layout
2024-06-04 13:31:36 +02:00

29 lines
No EOL
848 B
Text

// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
import { HorizontalBox } from "std-widgets.slint";
component MyP inherits PopupWindow {}
export component Component {
GridLayout {
p1 := PopupWindow {}
// ^warning{PopupWindow shouldn't be a children of a layout}
Row {
PopupWindow {}
// ^warning{PopupWindow shouldn't be a children of a layout}
}
Rectangle {
PopupWindow {} // no warnings there
}
HorizontalBox { PopupWindow {} }
// ^warning{PopupWindow shouldn't be a children of a layout}
VerticalLayout { MyP {} }
// ^warning{PopupWindow shouldn't be a children of a layout}
}
}