From c5b0060b29218a0e6b04ff5cb67315db73673419 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 17 Dec 2015 16:23:49 +0100 Subject: testbench: make use of Pane to get "standard" content padding Change-Id: Idcfe1f4b48244c9bb5d57cbaf08f429f631d46e7 Reviewed-by: J-P Nurmi --- tests/manual/testbench/main.qml | 768 ++++++++++++++++++++-------------------- 1 file changed, 384 insertions(+), 384 deletions(-) (limited to 'tests') diff --git a/tests/manual/testbench/main.qml b/tests/manual/testbench/main.qml index 34baece7..d2d05c2f 100644 --- a/tests/manual/testbench/main.qml +++ b/tests/manual/testbench/main.qml @@ -126,499 +126,499 @@ ApplicationWindow { } } - Flickable { + Pane { anchors.fill: parent - topMargin: 30 - leftMargin: 30 - rightMargin: 30 - bottomMargin: 30 - contentHeight: flow.height - - Flow { - id: flow - width: parent.width - spacing: 30 - - RowLayout { - spacing: window.controlSpacing - - Button { - text: "Normal" - } - Button { - text: "Pressed" - pressed: true - } - Button { - text: "Checked" - checked: true - } - Button { - text: "CH + PR" - checked: true - pressed: true - } - Button { - text: "Disabled" - enabled: false - } - Button { - text: "CH + DIS" - enabled: false - checked: true - } - } - RowLayout { - spacing: window.controlSpacing + Flickable { + anchors.fill: parent + contentHeight: flow.height - Button { - text: "HI" - highlighted: true - } - Button { - text: "HI + PR" - highlighted: true - pressed: true - } - Button { - text: "HI + CH" - highlighted: true - checked: true - } - Button { - text: "HI+CH+PR" - highlighted: true - pressed: true - checked: true - } - Button { - text: "HI + DIS" - highlighted: true - enabled: false - } - Button { - text: "HI+CH+DIS" - highlighted: true - enabled: false - checked: true - } - } + Flow { + id: flow + width: parent.width + spacing: 30 - RowLayout { - CheckBox { - text: "Normal" - } - CheckBox { - text: "Pressed" - pressed: true - } - CheckBox { - text: "Checked" - checked: true - } - CheckBox { - text: "CH + PR" - checked: true - pressed: true - } - CheckBox { - text: "Disabled" - enabled: false - } - CheckBox { - text: "CH + DIS" - checked: true - enabled: false - } - } + RowLayout { + spacing: window.controlSpacing - RowLayout { - RadioButton { - text: "Normal" - } - RadioButton { - text: "Pressed" - pressed: true - } - RadioButton { - text: "Checked" - checked: true - } - RadioButton { - text: "CH + PR" - checked: true - pressed: true - } - RadioButton { - text: "Disabled" - enabled: false - } - RadioButton { - text: "CH + DIS" - checked: true - enabled: false - } - } - - RowLayout { - Switch { - text: "Normal" - } - Switch { - text: "Pressed" - pressed: true - } - Switch { - text: "Checked" - checked: true - } - Switch { - text: "CH + PR" - checked: true - pressed: true - } - Switch { - text: "Disabled" - enabled: false - } - } - - RowLayout { - ProgressBar { - value: 0.5 - } - ProgressBar { - value: 0.5 - indeterminate: true - } - ProgressBar { - value: 0.5 - enabled: false + Button { + text: "Normal" + } + Button { + text: "Pressed" + pressed: true + } + Button { + text: "Checked" + checked: true + } + Button { + text: "CH + PR" + checked: true + pressed: true + } + Button { + text: "Disabled" + enabled: false + } + Button { + text: "CH + DIS" + enabled: false + checked: true + } } - } - RowLayout { - Slider { - value: 0.5 - } - Slider { - value: 0.5 - pressed: true - } - Slider { - value: 0.5 - enabled: false - } - } + RowLayout { + spacing: window.controlSpacing - RowLayout { - RangeSlider { - first.value: 0.25 - second.value: 0.75 - } - RangeSlider { - first.value: 0.25 - first.pressed: true - second.value: 0.75 - } - RangeSlider { - first.value: 0.25 - second.value: 0.75 - enabled: false + Button { + text: "HI" + highlighted: true + } + Button { + text: "HI + PR" + highlighted: true + pressed: true + } + Button { + text: "HI + CH" + highlighted: true + checked: true + } + Button { + text: "HI+CH+PR" + highlighted: true + pressed: true + checked: true + } + Button { + text: "HI + DIS" + highlighted: true + enabled: false + } + Button { + text: "HI+CH+DIS" + highlighted: true + enabled: false + checked: true + } } - } - - RowLayout { - Item { - implicitWidth: normalGroupBox.width - implicitHeight: normalTextArea.implicitHeight - TextArea { - id: normalTextArea + RowLayout { + CheckBox { text: "Normal" } - } - Item { - implicitWidth: normalGroupBox.width - implicitHeight: normalTextArea.implicitHeight - - TextArea { - placeholderText: "Placeholder" + CheckBox { + text: "Pressed" + pressed: true } - } - Item { - implicitWidth: normalGroupBox.width - implicitHeight: normalTextArea.implicitHeight - - TextArea { + CheckBox { + text: "Checked" + checked: true + } + CheckBox { + text: "CH + PR" + checked: true + pressed: true + } + CheckBox { text: "Disabled" enabled: false } + CheckBox { + text: "CH + DIS" + checked: true + enabled: false + } } - } - RowLayout { - Item { - implicitWidth: normalGroupBox.implicitWidth - implicitHeight: normalTextField.implicitHeight - - TextField { - id: normalTextField + RowLayout { + RadioButton { text: "Normal" } - } - Item { - implicitWidth: normalGroupBox.implicitWidth - implicitHeight: normalTextField.implicitHeight - - TextField { - placeholderText: "Placeholder" + RadioButton { + text: "Pressed" + pressed: true + } + RadioButton { + text: "Checked" + checked: true + } + RadioButton { + text: "CH + PR" + checked: true + pressed: true + } + RadioButton { + text: "Disabled" + enabled: false + } + RadioButton { + text: "CH + DIS" + checked: true + enabled: false } } - Item { - implicitWidth: normalGroupBox.implicitWidth - implicitHeight: normalTextField.implicitHeight - TextField { + RowLayout { + Switch { + text: "Normal" + } + Switch { + text: "Pressed" + pressed: true + } + Switch { + text: "Checked" + checked: true + } + Switch { + text: "CH + PR" + checked: true + pressed: true + } + Switch { text: "Disabled" enabled: false } } - } - - RowLayout { - Item { - implicitWidth: normalGroupBox.implicitWidth - implicitHeight: normalSpinBox.implicitHeight - SpinBox { - id: normalSpinBox + RowLayout { + ProgressBar { + value: 0.5 + } + ProgressBar { + value: 0.5 + indeterminate: true + } + ProgressBar { + value: 0.5 + enabled: false } } - Item { - implicitWidth: normalGroupBox.implicitWidth - implicitHeight: normalSpinBox.implicitHeight - SpinBox { - up.pressed: true + RowLayout { + Slider { + value: 0.5 + } + Slider { + value: 0.5 + pressed: true + } + Slider { + value: 0.5 + enabled: false } } - Item { - implicitWidth: normalGroupBox.implicitWidth - implicitHeight: normalSpinBox.implicitHeight - SpinBox { + RowLayout { + RangeSlider { + first.value: 0.25 + second.value: 0.75 + } + RangeSlider { + first.value: 0.25 + first.pressed: true + second.value: 0.75 + } + RangeSlider { + first.value: 0.25 + second.value: 0.75 enabled: false } } - } - RowLayout { - Item { - implicitWidth: normalGroupBox.implicitWidth - implicitHeight: normalComboBox.implicitHeight + RowLayout { + Item { + implicitWidth: normalGroupBox.width + implicitHeight: normalTextArea.implicitHeight - ComboBox { - id: normalComboBox - model: 5 + TextArea { + id: normalTextArea + text: "Normal" + } } - } + Item { + implicitWidth: normalGroupBox.width + implicitHeight: normalTextArea.implicitHeight - Item { - implicitWidth: normalGroupBox.implicitWidth - implicitHeight: normalComboBox.implicitHeight + TextArea { + placeholderText: "Placeholder" + } + } + Item { + implicitWidth: normalGroupBox.width + implicitHeight: normalTextArea.implicitHeight - ComboBox { - pressed: true - model: ListModel { - ListElement { text: "Pressed" } + TextArea { + text: "Disabled" + enabled: false } } } - Item { - implicitWidth: normalGroupBox.implicitWidth - implicitHeight: normalComboBox.implicitHeight + RowLayout { + Item { + implicitWidth: normalGroupBox.implicitWidth + implicitHeight: normalTextField.implicitHeight - ComboBox { - enabled: false - model: ["Disabled"] + TextField { + id: normalTextField + text: "Normal" + } + } + Item { + implicitWidth: normalGroupBox.implicitWidth + implicitHeight: normalTextField.implicitHeight + + TextField { + placeholderText: "Placeholder" + } + } + Item { + implicitWidth: normalGroupBox.implicitWidth + implicitHeight: normalTextField.implicitHeight + + TextField { + text: "Disabled" + enabled: false + } } } - } - RowLayout { - GroupBox { - id: normalGroupBox - title: "Normal" + RowLayout { + Item { + implicitWidth: normalGroupBox.implicitWidth + implicitHeight: normalSpinBox.implicitHeight + SpinBox { + id: normalSpinBox + } + } Item { - implicitWidth: 200 - implicitHeight: 100 + implicitWidth: normalGroupBox.implicitWidth + implicitHeight: normalSpinBox.implicitHeight - BusyIndicator { - anchors.centerIn: parent + SpinBox { + up.pressed: true + } + } + Item { + implicitWidth: normalGroupBox.implicitWidth + implicitHeight: normalSpinBox.implicitHeight + + SpinBox { + enabled: false } } } - GroupBox { - enabled: false - title: "Disabled" + RowLayout { Item { - implicitWidth: 200 - implicitHeight: 100 + implicitWidth: normalGroupBox.implicitWidth + implicitHeight: normalComboBox.implicitHeight - BusyIndicator { - anchors.centerIn: parent + ComboBox { + id: normalComboBox + model: 5 + } + } + + Item { + implicitWidth: normalGroupBox.implicitWidth + implicitHeight: normalComboBox.implicitHeight + + ComboBox { + pressed: true + model: ListModel { + ListElement { text: "Pressed" } + } } } - } - GroupBox { - enabled: false - title: "." - label.visible: false Item { - implicitWidth: 200 - implicitHeight: 100 + implicitWidth: normalGroupBox.implicitWidth + implicitHeight: normalComboBox.implicitHeight - PageIndicator { - count: 5 + ComboBox { enabled: false - anchors.bottom: parent.bottom - anchors.horizontalCenter: parent.horizontalCenter + model: ["Disabled"] } } } - } - RowLayout { - Frame { - id: scrollBarFrame + RowLayout { + GroupBox { + id: normalGroupBox + title: "Normal" - Item { - implicitWidth: 200 - implicitHeight: 100 + Item { + implicitWidth: 200 + implicitHeight: 100 - Label { - text: "Normal" - anchors.centerIn: parent + BusyIndicator { + anchors.centerIn: parent + } } + } + GroupBox { + enabled: false + title: "Disabled" - ScrollBar { - size: 0.3 - position: 0.2 - active: true - orientation: Qt.Vertical - height: parent.height - anchors.right: parent.right + Item { + implicitWidth: 200 + implicitHeight: 100 + + BusyIndicator { + anchors.centerIn: parent + } + } + } + GroupBox { + enabled: false + title: "." + label.visible: false + + Item { + implicitWidth: 200 + implicitHeight: 100 + + PageIndicator { + count: 5 + enabled: false + anchors.bottom: parent.bottom + anchors.horizontalCenter: parent.horizontalCenter + } } } } - Frame { - Item { - implicitWidth: 200 - implicitHeight: 100 + RowLayout { + Frame { + id: scrollBarFrame + + Item { + implicitWidth: 200 + implicitHeight: 100 - Label { - text: "Pressed" - anchors.centerIn: parent + Label { + text: "Normal" + anchors.centerIn: parent + } + + ScrollBar { + size: 0.3 + position: 0.2 + active: true + orientation: Qt.Vertical + height: parent.height + anchors.right: parent.right + } } + } - ScrollBar { + Frame { + Item { + implicitWidth: 200 + implicitHeight: 100 + + Label { + text: "Pressed" + anchors.centerIn: parent + } + + ScrollBar { + size: 0.3 + position: 0.2 + active: true + orientation: Qt.Vertical + height: parent.height + anchors.right: parent.right + pressed: true + } + } + } + + Frame { + Item { + implicitWidth: 200 + implicitHeight: 100 + enabled: false + + Label { + text: "Disabled" + anchors.centerIn: parent + } + + ScrollBar { + size: 0.3 + position: 0.2 + active: true + orientation: Qt.Vertical + height: parent.height + anchors.right: parent.right + } + } + } + } + + RowLayout { + Frame { + Layout.preferredWidth: 100 + Layout.preferredHeight: 100 + + ScrollIndicator { size: 0.3 position: 0.2 active: true orientation: Qt.Vertical height: parent.height anchors.right: parent.right - pressed: true } } - } - Frame { - Item { - implicitWidth: 200 - implicitHeight: 100 - enabled: false + Frame { + Layout.preferredWidth: 100 + Layout.preferredHeight: 100 - Label { - text: "Disabled" - anchors.centerIn: parent - } - - ScrollBar { + ScrollIndicator { size: 0.3 position: 0.2 active: true orientation: Qt.Vertical height: parent.height anchors.right: parent.right + enabled: false } } } - } - - RowLayout { - Frame { - Layout.preferredWidth: 100 - Layout.preferredHeight: 100 - ScrollIndicator { - size: 0.3 - position: 0.2 - active: true - orientation: Qt.Vertical - height: parent.height - anchors.right: parent.right + RowLayout { + Frame { + Tumbler { + model: 5 + implicitWidth: 100 + implicitHeight: 100 + } } - } - - Frame { - Layout.preferredWidth: 100 - Layout.preferredHeight: 100 - - ScrollIndicator { - size: 0.3 - position: 0.2 - active: true - orientation: Qt.Vertical - height: parent.height - anchors.right: parent.right - enabled: false + Frame { + Tumbler { + model: 5 + implicitWidth: 100 + implicitHeight: 100 + enabled: false + } } } - } - RowLayout { - Frame { - Tumbler { - model: 5 - implicitWidth: 100 - implicitHeight: 100 + RowLayout { + Dial { } - } - Frame { - Tumbler { - model: 5 - implicitWidth: 100 - implicitHeight: 100 + Dial { enabled: false } } } - - RowLayout { - Dial { - } - Dial { - enabled: false - } - } } } } -- cgit v1.2.3