Changeset View
Changeset View
Standalone View
Standalone View
src/qml/RatingStar.qml
Show All 22 Lines | |||||
23 | 23 | | |||
24 | RowLayout { | 24 | RowLayout { | ||
25 | property int starSize | 25 | property int starSize | ||
26 | property int starRating | 26 | property int starRating | ||
27 | property bool readOnly: true | 27 | property bool readOnly: true | ||
28 | 28 | | |||
29 | property double hoverBrightness: 0.5 | 29 | property double hoverBrightness: 0.5 | ||
30 | property double hoverContrast: 0.5 | 30 | property double hoverContrast: 0.5 | ||
31 | property double hoverWidgetOpacity: 0 | ||||
31 | 32 | | |||
32 | property int hoveredRating: 0 | 33 | property int hoveredRating: 0 | ||
33 | 34 | | |||
34 | spacing: 0 | 35 | spacing: 0 | ||
36 | opacity: starRating > 0 ? 1 : (readOnly ? 0 : hoverWidgetOpacity) | ||||
35 | 37 | | |||
36 | Repeater { | 38 | Repeater { | ||
37 | model: 5 | 39 | model: 5 | ||
38 | 40 | | |||
39 | Item { | 41 | Item { | ||
40 | property int ratingThreshold: 2 + index * 2 | 42 | property int ratingThreshold: 2 + index * 2 | ||
41 | Layout.preferredHeight: starSize | 43 | Layout.preferredHeight: starSize | ||
42 | Layout.preferredWidth: starSize | 44 | Layout.preferredWidth: starSize | ||
▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines |