Warning, /plasma/libplasma/tests/dialog_minWidthHeightRepositioning.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 SPDX-FileCopyrightText: 2014 Vishesh Handa <vhanda@kde.org>
0003
0004 SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006
0007 import QtQuick
0008
0009 import QtQuick.Controls as Controls
0010 import QtQuick.Layouts
0011
0012 import org.kde.plasma.core as PlasmaCore
0013
0014 PlasmaCore.Dialog {
0015 id: root
0016 location: PlasmaCore.Types.Floating
0017
0018 Rectangle {
0019 id: rect
0020 Layout.minimumWidth: 300
0021 Layout.minimumHeight: 300
0022
0023 color: "red"
0024
0025 Rectangle {
0026 width: rect.Layout.minimumWidth
0027 height: rect.Layout.minimumHeight
0028 }
0029 ColumnLayout {
0030 anchors.top: parent.top
0031 Controls.Label {
0032 Layout.maximumWidth: rect.Layout.minimumWidth
0033 text: "Use Alt + Left Click to move the window to a side and then increase the minWidth/Height. The window should reposition itself"
0034 wrapMode: Text.WordWrap
0035 }
0036 Controls.Button {
0037 text: "Increase MinWidth"
0038 onClicked: {
0039 rect.Layout.minimumWidth = rect.Layout.minimumWidth + 10
0040 }
0041 }
0042 Controls.Button {
0043 text: "Increase MinHeight"
0044 onClicked: {
0045 rect.Layout.minimumHeight = rect.Layout.minimumHeight + 10
0046 }
0047 }
0048 Controls.Button {
0049 text: "Increase dialog width"
0050 onClicked: {
0051 root.width = root.width + 10
0052 }
0053 }
0054 Controls.Button {
0055 text: "Increase dialog height"
0056 onClicked: {
0057 root.height = root.height + 10
0058 }
0059 }
0060 }
0061 }
0062 }