on xenial help sign in
Empty file
e2127acAndrea Cimitan
qml/Components/Rating.qml+1−1
@@ -39,7 +39,7 @@ StyledItem {
39 style: RatingStyle {}
39 style: RatingStyle {}
40
40
41 MouseArea {
41 MouseArea {
42− anchors.fill: root
42+ anchors.fill: parent
43 enabled: root.interactive
43 enabled: root.interactive
44 onClicked: root.value = Math.ceil(mouse.x / averageIconWidth) * root.maximumValue / root.size
44 onClicked: root.value = Math.ceil(mouse.x / averageIconWidth) * root.maximumValue / root.size
45
45
qml/Dash/Previews/PreviewRating.qmlnew file+32
@@ -0,0 +1,32 @@
1+/*
2+ * Copyright (C) 2014 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import QtQuick 2.0
18+import Ubuntu.Components 0.1
19+import "../../Components"
20+
21+/*! \brief Preview widget for rating.
22+
23+ This widget shows text contained in widgetData["text"]
24+ along with a title that comes from widgetData["title"].
25+
26+ In case the text does not fit in 7 lines a See More / Less widget is also shown.
27+ */
28+
29+Rectangle {
30+ width: 100
31+ height: 62
32+}