plasma-framework/tests/components/combobox.qml
David Edmundson c546f314be Use the same text colour for comboboxes as buttons
Given comboboxes use the same background as buttons they should use the
same text colour too.

This prevents a situation in Breeze where a ComboBox could get white
text on a white background when using a colourscope with complementary
colours.

Change-Id: I21502186178a32ce480cd3e838335451bf644c3e
2014-12-11 15:06:54 +01:00

41 lines
898 B
QML

import QtQuick 2.0
import org.kde.plasma.components 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
Rectangle {
id: root
color: "white"
width: 800
height: 300
ListModel {
id: demoModel
ListElement { text: "Banana"; color: "Yellow" }
ListElement { text: "Apple"; color: "Green" }
ListElement { text: "Coconut"; color: "Brown" }
}
Flow {
anchors.fill: parent
anchors.margins: 20
spacing: 20
ComboBox {
model:demoModel
}
ComboBox {
editable: true
model: demoModel
}
PlasmaCore.ColorScope {
implicitWidth: childrenRect.width
implicitHeight: childrenRect.width
colorGroup: PlasmaCore.Theme.ComplementaryColorGroup
ComboBox {
model:demoModel
}
}
}
}