1
0
Fork 0
flightgear/src/GUI/qml/AircraftRating.qml
James Turner 01f05b5383 Launcher: styling improvements everywhere
Use a standard text component to ensure the base font size can be
controlled centrally.
2018-06-21 22:54:37 +01:00

42 lines
858 B
QML

import QtQuick 2.4
import "."
Item {
id: root
property string title: ""
property int value: 3
implicitWidth: Style.strutSize * 3
implicitHeight: label.height
StyledText {
id: label
anchors.right: ratingRow.left
anchors.rightMargin: Style.margin
anchors.left: parent.left
horizontalAlignment: Text.AlignRight
text: root.title + ":"
}
Row {
id: ratingRow
spacing: 2
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
Repeater {
model: 5
delegate: Rectangle {
color: ((model.index + 1) <= root.value) ? "#3f3f3f" : "#cfcfcf"
width: radius * 2
height: radius * 2
radius: Style.roundRadius
}
}
}
}