From a1662adead64c796de5c744eee22e443052b73cd Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Fri, 23 Jul 2021 11:44:38 +0200 Subject: [PATCH] chore(sandbox): introduce StatusInputPage --- sandbox/Controls.qml | 30 +--------------------------- sandbox/StatusInputPage.qml | 39 +++++++++++++++++++++++++++++++++++++ sandbox/main.qml | 10 ++++++++++ sandbox/qml.qrc | 1 + 4 files changed, 51 insertions(+), 29 deletions(-) create mode 100644 sandbox/StatusInputPage.qml diff --git a/sandbox/Controls.qml b/sandbox/Controls.qml index 0cd2c78a..f7885f38 100644 --- a/sandbox/Controls.qml +++ b/sandbox/Controls.qml @@ -8,7 +8,7 @@ import StatusQ.Controls 0.1 import Sandbox 0.1 GridLayout { - columns: 6 + columns: 1 columnSpacing: 5 rowSpacing: 5 @@ -143,32 +143,4 @@ GridLayout { to: 100 value: 40 } - - StatusBaseInput { - placeholderText: "One line" - } - - StatusBaseInput { - multiline: true - placeholderText: "Multiline" - } - - StatusBaseInput { - multiline: true - placeholderText: "Multiline with static height" - implicitHeight: 100 - } - - Item { - implicitHeight: 300 - implicitWidth: 300 - - StatusBaseInput { - anchors.centerIn: parent - multiline: true - placeholderText: "Multiline with max/min" - minimumHeight: 80 - maximumHeight: 200 - } - } } diff --git a/sandbox/StatusInputPage.qml b/sandbox/StatusInputPage.qml new file mode 100644 index 00000000..715b7ee2 --- /dev/null +++ b/sandbox/StatusInputPage.qml @@ -0,0 +1,39 @@ +import QtQuick 2.14 +import QtQuick.Controls 2.14 +import QtQuick.Layouts 1.14 +import StatusQ.Core 0.1 +import StatusQ.Core.Theme 0.1 +import StatusQ.Controls 0.1 + +import Sandbox 0.1 + +Column { + spacing: 8 + + StatusBaseInput { + placeholderText: "Placeholder" + } + + StatusBaseInput { + placeholderText: "Disabled" + enabled: false + } + + StatusBaseInput { + multiline: true + placeholderText: "Multiline" + } + + StatusBaseInput { + multiline: true + placeholderText: "Multiline with static height" + implicitHeight: 100 + } + + StatusBaseInput { + multiline: true + placeholderText: "Multiline with max/min" + minimumHeight: 80 + maximumHeight: 200 + } +} diff --git a/sandbox/main.qml b/sandbox/main.qml index ddb8f241..9c1c5bee 100644 --- a/sandbox/main.qml +++ b/sandbox/main.qml @@ -143,6 +143,11 @@ StatusWindow { selected: page.sourceComponent == controlsComponent onClicked: page.sourceComponent = controlsComponent } + StatusNavigationListItem { + title: "StatusInput" + selected: page.sourceComponent == statusInputPageComponent + onClicked: page.sourceComponent = statusInputPageComponent + } StatusListSectionHeadline { text: "StatusQ.Components" } StatusNavigationListItem { title: "List Items" @@ -236,6 +241,11 @@ StatusWindow { Controls {} } + Component { + id: statusInputPageComponent + StatusInputPage {} + } + Component { id: listItemsComponent ListItems {} diff --git a/sandbox/qml.qrc b/sandbox/qml.qrc index eba10cc4..319941aa 100644 --- a/sandbox/qml.qrc +++ b/sandbox/qml.qrc @@ -9,6 +9,7 @@ ListItems.qml StatusChatInfoToolBarPage.qml StatusPopupMenuPage.qml + StatusInputPage.qml ThemeSwitch.qml Layout.qml Popups.qml