yacreader/YACReaderLibrary/qml/InfoRating.qml
Anon789 dd381df7b7 yacreader_ru.ts
Correcting errors in words and their meanings. Update the Russian language. Now look better.
2018-02-24 18:11:53 +00:00

51 lines
1.1 KiB
QML

import QtQuick 2.6
import QtGraphicalEffects 1.0
Row {
spacing: 0
property int rating : 0
property int mouseIndex : 0
signal ratingChangedByUser(int rating)
Repeater {
id: rating_compact
model: 5
Item {
width: 25
height: 20
Image {
id: star
source: "info-rating.png"
}
ColorOverlay {
anchors.fill: star
source: star
color: index < (mouseIndex > 0 ? mouseIndex : rating) ? ratingSelectedColor : ratingUnselectedColor
}
MouseArea {
anchors.fill: parent
hoverEnabled: true
onPositionChanged: {
mouseIndex = index + 1;
}
onClicked: {
ratingChangedByUser(mouseIndex);
}
onExited: {
mouseIndex = 0;
}
}
}
}
}