Warning, /plasma/libplasma/tests/dialog_sizeMoreThanMin.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 SPDX-FileCopyrightText: 2014 Vishesh Handa <vhanda@kde.org>
0003 SPDX-FileCopyrightText: 2014 Marco Martin <mart@kde.org>
0004
0005 SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007
0008 import QtQuick
0009
0010 import QtQuick.Controls as Controls
0011 import QtQuick.Layouts
0012
0013 import org.kde.plasma.core as PlasmaCore
0014
0015 Item {
0016 id: root
0017 Layout.minimumWidth: 300
0018 Layout.minimumHeight: 300
0019 Controls.Button {
0020 id: button
0021 anchors.centerIn: parent
0022 text: "Show Dialog"
0023 onClicked: {
0024 //changing the minimumHeight of the mainItem of an hidden dialog
0025 //shouldn't
0026 rect.Layout.minimumHeight = rect.Layout.minimumHeight + 1
0027 rect.Layout.minimumWidth = rect.Layout.minimumWidth + 1
0028 subDialog.visible = !subDialog.visible
0029 }
0030 }
0031 PlasmaCore.Dialog {
0032 id: subDialog
0033 location: PlasmaCore.Types.Floating
0034 visualParent: button
0035 visible: false
0036
0037 Rectangle {
0038 id: rect
0039 width: 500
0040 height: 500
0041 Layout.minimumWidth: 300
0042 Layout.minimumHeight: 300
0043
0044 color: "red"
0045
0046 Rectangle {
0047 anchors.centerIn: parent
0048 width: rect.Layout.minimumWidth
0049 height: rect.Layout.minimumHeight
0050 Text {
0051 anchors.fill: parent
0052 wrapMode: Text.WordWrap
0053 text: "you should see a red border around this white area"
0054 }
0055 }
0056 }
0057 }
0058 }