mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-29 09:49:20 +00:00
38 lines
872 B
QML
38 lines
872 B
QML
import QtQuick 2.7
|
|
|
|
// ===================================================================
|
|
|
|
Row {
|
|
property int selectedButton: 0
|
|
property variant texts
|
|
|
|
signal clicked (int button)
|
|
|
|
spacing: 8
|
|
|
|
Repeater {
|
|
model: texts
|
|
|
|
SmallButton {
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
backgroundColor: selectedButton === index
|
|
? '#8E8E8E'
|
|
: (button.down
|
|
? '#FE5E00'
|
|
: (button.hovered
|
|
? '#C0C0C0'
|
|
: '#D1D1D1'
|
|
)
|
|
)
|
|
id: button
|
|
text: modelData
|
|
|
|
onClicked: {
|
|
if (selectedButton !== index) {
|
|
selectedButton = index
|
|
clicked(index)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|