fix(ComboBox): use TransparentCombobox in manageAccounts

This commit is contained in:
Ronan Abhamon 2016-09-09 12:05:40 +02:00
parent f41720a15d
commit 7c3ae4a668
5 changed files with 30 additions and 14 deletions

View file

@ -9,9 +9,9 @@
<file>ui/components/dialog/DialogPlus.qml</file>
<file>ui/components/form/Collapse.qml</file>
<file>ui/components/form/DialogButton.qml</file>
<file>ui/components/form/DialogComboBox.qml</file>
<file>ui/components/form/RoundButton.qml</file>
<file>ui/components/form/ToolBarButton.qml</file>
<file>ui/components/form/TransparentComboBox.qml</file>
<file>ui/views/mainWindow.qml</file>
<file>ui/views/manageAccounts.qml</file>

View file

@ -1,9 +0,0 @@
import QtQuick 2.7
import QtQuick.Controls 2.0
ComboBox {
background: Rectangle {
color: 'transparent'
}
id: comboBox
}

View file

@ -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
}
}

View file

@ -36,8 +36,7 @@ ApplicationWindow {
console.debug('Error:' + component.errorString())
}
} else {
var win = component.createObject(mainWindow);
win.show();
component.createObject(mainWindow).show()
}
}
}

View file

@ -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 }