diff --git a/tests/resources.qrc b/tests/resources.qrc index 6bda8e9d7..88714d77f 100644 --- a/tests/resources.qrc +++ b/tests/resources.qrc @@ -9,9 +9,9 @@ ui/components/dialog/DialogPlus.qml ui/components/form/Collapse.qml ui/components/form/DialogButton.qml - ui/components/form/DialogComboBox.qml ui/components/form/RoundButton.qml ui/components/form/ToolBarButton.qml + ui/components/form/TransparentComboBox.qml ui/views/mainWindow.qml ui/views/manageAccounts.qml diff --git a/tests/ui/components/form/DialogComboBox.qml b/tests/ui/components/form/DialogComboBox.qml deleted file mode 100644 index 4094ffa06..000000000 --- a/tests/ui/components/form/DialogComboBox.qml +++ /dev/null @@ -1,9 +0,0 @@ -import QtQuick 2.7 -import QtQuick.Controls 2.0 - -ComboBox { - background: Rectangle { - color: 'transparent' - } - id: comboBox -} diff --git a/tests/ui/components/form/TransparentComboBox.qml b/tests/ui/components/form/TransparentComboBox.qml new file mode 100644 index 000000000..51a2c2567 --- /dev/null +++ b/tests/ui/components/form/TransparentComboBox.qml @@ -0,0 +1,27 @@ +import QtQuick 2.7 +import QtQuick.Controls 2.0 + +ComboBox { + background: Rectangle { + color: 'transparent' + } + id: comboBox + delegate: ItemDelegate { + background: Rectangle { + color: delegate.down + ? '#FE5E00' + : ( + comboBox.currentIndex === index + ? '#F0F0F0' + : '#FFFFFF' + ) + opacity: enabled ? 1 : 0.3 + } + font.weight: comboBox.currentIndex === index + ? Font.DemiBold + : Font.Normal + id: delegate + text: key || modelData + width: comboBox.width + } +} diff --git a/tests/ui/views/mainWindow.qml b/tests/ui/views/mainWindow.qml index 618257d4b..043c67a09 100644 --- a/tests/ui/views/mainWindow.qml +++ b/tests/ui/views/mainWindow.qml @@ -36,8 +36,7 @@ ApplicationWindow { console.debug('Error:' + component.errorString()) } } else { - var win = component.createObject(mainWindow); - win.show(); + component.createObject(mainWindow).show() } } } diff --git a/tests/ui/views/manageAccounts.qml b/tests/ui/views/manageAccounts.qml index 8bd90add3..9fe617c2b 100644 --- a/tests/ui/views/manageAccounts.qml +++ b/tests/ui/views/manageAccounts.qml @@ -17,7 +17,6 @@ DialogPlus { text: qsTr('validate') } - // Accounts list. Item { id: listViewContainer anchors.fill: parent @@ -136,7 +135,7 @@ DialogPlus { Layout.fillHeight: parent.height Layout.preferredWidth: 160 - DialogComboBox { + TransparentComboBox { anchors.fill: parent model: ListModel { ListElement { key: qsTr('onlinePresence'); value: 1 }