diff --git a/tests/ui/modules/Common/Collapse.qml b/tests/ui/modules/Common/Collapse.qml index 7bc5ba39a..cdd602771 100644 --- a/tests/ui/modules/Common/Collapse.qml +++ b/tests/ui/modules/Common/Collapse.qml @@ -7,6 +7,10 @@ import Common.Styles 1.0 // =================================================================== Item { + id: collapse + + property var target + property bool _collapsed: false signal collapsed (bool collapsed) @@ -31,22 +35,30 @@ Item { icon: 'collapse' iconSize: CollapseStyle.iconSize - onClicked: collapse() + onClicked: collapse.collapse() } // ----------------------------------------------------------------- - states: [ - State { - name: 'Collapsed' - when: _collapsed + states: State { + name: 'Collapsed' + when: _collapsed - PropertyChanges { - target: button - rotation: 180 - } + PropertyChanges { + target: button + rotation: 180 } - ] + + PropertyChanges { + target: collapse.target + + height: 480 + maximumHeight: 99999 + maximumWidth: 99999 + minimumHeight: 480 + + } + } transitions: Transition { RotationAnimation { diff --git a/tests/ui/modules/Common/Popup/AbstractDropDownMenu.qml b/tests/ui/modules/Common/Popup/AbstractDropDownMenu.qml index 31b2c974a..37a950fcb 100644 --- a/tests/ui/modules/Common/Popup/AbstractDropDownMenu.qml +++ b/tests/ui/modules/Common/Popup/AbstractDropDownMenu.qml @@ -104,7 +104,7 @@ Item { states: [ State { - name: 'Opened' + name: 'opened' when: _isOpen PropertyChanges { @@ -119,7 +119,7 @@ Item { transitions: [ Transition { from: '' - to: 'Opened' + to: 'opened' NumberAnimation { duration: PopupStyle.animation.openingDuration @@ -134,13 +134,13 @@ Item { } ScriptAction { - script: menuOpened() + script: menuopened() } } }, Transition { - from: 'Opened' + from: 'opened' to: '' NumberAnimation { diff --git a/tests/ui/views/MainWindow/MainWindow.qml b/tests/ui/views/MainWindow/MainWindow.qml index 6d558acea..3fc85378f 100644 --- a/tests/ui/views/MainWindow/MainWindow.qml +++ b/tests/ui/views/MainWindow/MainWindow.qml @@ -37,13 +37,11 @@ ApplicationWindow { // Collapse. Collapse { - Layout.preferredWidth: 25 - Layout.fillHeight: parent.height id: collapse - onCollapsed: windowStates.state = collapsed - ? 'collapsed' - : '' + Layout.fillHeight: parent.height + Layout.preferredWidth: 25 + target: window } // User info. @@ -221,22 +219,6 @@ ApplicationWindow { } } - StateGroup { - id: windowStates - - states: State { - name: 'collapsed' - - PropertyChanges { - height: 480 - maximumHeight: 99999 - maximumWidth: 99999 - minimumHeight: 480 - target: window - } - } - } - ListModel { id: model1