on xenial help sign in
Empty file
commite2127ac8b192bb7c53b7de2f757dbceaaf975531 authorAndrea Cimitan <andrea.cimitan@gmail.com> dateFri 7 Feb 2014, 16:30 (13 years ago) parentce161c0
2 files changed+33−1
qml/Components/Rating.qml+1−1 qml/Dash/Previews/PreviewRating.qml+32
qml/Components/Rating.qml+1−1
@@ -39,7 +39,7 @@ StyledItem {
3939 style: RatingStyle {}
4040
4141 MouseArea {
42− anchors.fill: root
42+ anchors.fill: parent
4343 enabled: root.interactive
4444 onClicked: root.value = Math.ceil(mouse.x / averageIconWidth) * root.maximumValue / root.size
4545
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+}