Changeset View
Changeset View
Standalone View
Standalone View
src/activities/magic-hat-minus/StarsBar.qml
Show All 15 Lines | |||||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | 17 | * GNU General Public License for more details. | ||
18 | * | 18 | * | ||
19 | * You should have received a copy of the GNU General Public License | 19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, see <https://www.gnu.org/licenses/>. | 20 | * along with this program; if not, see <https://www.gnu.org/licenses/>. | ||
21 | */ | 21 | */ | ||
22 | import QtQuick 2.6 | 22 | import QtQuick 2.6 | ||
23 | import "magic-hat.js" as Activity | 23 | import "magic-hat.js" as Activity | ||
24 | import "../../core" | ||||
24 | 25 | | |||
25 | Item { | 26 | Item { | ||
26 | id: item | 27 | id: item | ||
27 | height: starsSize | 28 | height: starsSize | ||
28 | property int barGroupIndex | 29 | property int barGroupIndex | ||
29 | property int barIndex | 30 | property int barIndex | ||
30 | property int nbStarsOn: 0 | 31 | property int nbStarsOn: 0 | ||
31 | property bool authorizeClick: false | 32 | property bool authorizeClick: false | ||
33 | property int coefficient: 1 | ||||
34 | property bool coefficientVisible: false | ||||
35 | property var maxRange | ||||
32 | property int starsSize | 36 | property int starsSize | ||
33 | property string backgroundColor | 37 | property string backgroundColor | ||
34 | property string starsColor: "1" | 38 | property string starsColor: "1" | ||
35 | property Item theHat | 39 | property Item theHat | ||
36 | property alias repeaterStars: repeaterStars | 40 | property alias repeaterStars: repeaterStars | ||
37 | 41 | | |||
38 | Row { | 42 | Row { | ||
39 | id: rowlayout | 43 | id: rowlayout | ||
40 | height: item.height | 44 | height: item.height | ||
41 | spacing: 5 | 45 | spacing: 5 | ||
46 | GCText { | ||||
47 | id: text | ||||
48 | visible: item.coefficientVisible | ||||
49 | text: qsTr(item.coefficient.toString() + " x") | ||||
50 | fontSizeMode: Text.HorizontalFit | ||||
51 | width: rowlayout.width / 10 | ||||
52 | color: "white" | ||||
53 | anchors.rightMargin: 20 | ||||
54 | fontSize: tinySize | ||||
55 | } | ||||
42 | Repeater { | 56 | Repeater { | ||
43 | id: repeaterStars | 57 | id: repeaterStars | ||
44 | model: item.opacity == 1 ? 10 : 0 | 58 | model: item.opacity == 1 ? 10 : 0 | ||
45 | Item { | 59 | Item { | ||
46 | id: star | 60 | id: star | ||
47 | width: item.starsSize | 61 | width: item.starsSize | ||
48 | height: item.starsSize | 62 | height: item.starsSize | ||
49 | property alias starFixed: starFixed | 63 | property alias starFixed: starFixed | ||
▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines |