mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-23 14:48:15 +00:00
30 lines
837 B
QML
30 lines
837 B
QML
import QtQuick 2.7
|
|
import QtQuick.Controls 2.0
|
|
|
|
// ===================================================================
|
|
// Discrete ComboBox which can be integrated in text.
|
|
// ===================================================================
|
|
|
|
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
|
|
}
|
|
}
|