mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-04 05:09:27 +00:00
34 lines
786 B
QML
34 lines
786 B
QML
import QtQuick 2.7
|
|
|
|
// ===================================================================
|
|
|
|
Row {
|
|
property int selectedButton: 0
|
|
property variant texts
|
|
|
|
signal buttonChanged (int button)
|
|
|
|
spacing: 8
|
|
|
|
Repeater {
|
|
model: texts
|
|
SmallButton {
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
backgroundColor: selectedButton === index
|
|
? '#8E8E8E'
|
|
: (button.down
|
|
? '#FE5E00'
|
|
: '#D1D1D1'
|
|
)
|
|
id: button
|
|
text: modelData
|
|
|
|
onClicked: {
|
|
if (selectedButton !== index) {
|
|
selectedButton = index
|
|
buttonChanged(index)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|