on xenial help sign in
Several fixes requested.
b943b84Diego Sarmentero
Dash/Apps/AppPreview.qml+2−7
@@ -18,10 +18,9 @@ import QtQuick 2.0
18import Ubuntu.Components 0.1
18import Ubuntu.Components 0.1
19import Ubuntu.Components.ListItems 0.1 as ListItem
19import Ubuntu.Components.ListItems 0.1 as ListItem
20import ".."
20import ".."
21−import "../../Applications"
22import "../../Components"
21import "../../Components"
23
22
24−DashBasePreview {
23+DashPreview {
25 id: root
24 id: root
26
25
27 property var previewData
26 property var previewData
@@ -34,10 +33,6 @@ DashBasePreview {
34
33
35 header: AppScreenshotsList {
34 header: AppScreenshotsList {
36 height: units.gu(20)
35 height: units.gu(20)
37− anchors {
38− left: parent.left
39− right: parent.right
40− }
41
36
42 model: 0 // FROM PREVIEW DATA (FIXME: need scope format data)
37 model: 0 // FROM PREVIEW DATA (FIXME: need scope format data)
43 }
38 }
@@ -86,7 +81,7 @@ DashBasePreview {
86 Label {
81 Label {
87 text: "" // FROM PREVIEW DATA (FIXME: need scope format data)
82 text: "" // FROM PREVIEW DATA (FIXME: need scope format data)
88 fontSize: "medium"
83 fontSize: "medium"
89− color: "#f3f3e7"
84+ color: Theme.palette.selected.backgroundText
90 opacity: .6
85 opacity: .6
91 width: parent.width
86 width: parent.width
92 wrapMode: Text.WordWrap
87 wrapMode: Text.WordWrap
Dash/Apps/AppReviews.qml+52−47
@@ -26,7 +26,7 @@ Column {
26
26
27 signal sendReview(string review)
27 signal sendReview(string review)
28
28
29− spacing: units.gu(1)
29+ spacing: units.gu(2)
30 state: ""
30 state: ""
31
31
32 states: [
32 states: [
@@ -74,7 +74,6 @@ Column {
74 id: row
74 id: row
75 spacing: units.gu(1)
75 spacing: units.gu(1)
76 width: root.width
76 width: root.width
77− height: childrenRect.height
78
77
79 TextField {
78 TextField {
80 id: reviewField
79 id: reviewField
@@ -103,62 +102,68 @@ Column {
103
102
104 ListItem.ThinDivider {}
103 ListItem.ThinDivider {}
105
104
106− Column {
107− width: parent.width
108− height: childrenRect.height
109− spacing: units.gu(2)
110−
111− Label {
105+ Label {
112− fontSize: "medium"
106+ fontSize: "medium"
113− color: "white"
107+ color: "white"
114− style: Text.Raised
108+ style: Text.Raised
115− styleColor: "black"
109+ styleColor: "black"
116− opacity: .9
110+ opacity: .9
117− text: i18n.tr("Comments:")
111+ text: i18n.tr("Comments:")
118− }
112+ }
119
113
120− Repeater {
114+ Repeater {
121− model: root.model
115+ model: root.model
116+
117+ Column {
118+ width: parent.width
122
119
123 Column {
120 Column {
124− width: root.width
121+
125− height: childrenRect.height
122+ Label {
126− Column {
123+ text: "" // FROM PREVIEW DATA (FIXME: need scope format data)
124+ fontSize: "medium"
125+ color: "white"
126+ opacity: .8
127+ anchors {
128+ left: parent.left
129+ right: parent.right
130+ }
131+ wrapMode: Text.WordWrap
132+ style: Text.Raised
133+ styleColor: "black"
134+ }
135+
136+ Row {
137+ spacing: units.gu(1)
138+
139+ RatingStars {
140+ maximumRating: 10
141+ rating: 0 // FROM PREVIEW DATA (FIXME: need scope format data)
142+ }
143+
127 Label {
144 Label {
128 text: "" // FROM PREVIEW DATA (FIXME: need scope format data)
145 text: "" // FROM PREVIEW DATA (FIXME: need scope format data)
129 fontSize: "medium"
146 fontSize: "medium"
130− color: "white"
147+ color: Theme.palette.selected.backgroundText
131− opacity: .8
148+ opacity: .6
132− wrapMode: Text.WordWrap
133 style: Text.Raised
149 style: Text.Raised
134 styleColor: "black"
150 styleColor: "black"
135 }
151 }
136− Row {
137− spacing: units.gu(1)
138− RatingStars {
139− maximumRating: 10
140− rating: 0 // FROM PREVIEW DATA (FIXME: need scope format data)
141− }
142− Label {
143− text: "" // FROM PREVIEW DATA (FIXME: need scope format data)
144− fontSize: "medium"
145− color: "#f3f3e7"
146− opacity: .6
147− style: Text.Raised
148− styleColor: "black"
149− }
150− }
151 }
152 }
153+ }
154+
152− Label {
155+ Label {
153− text: "" // FROM PREVIEW DATA (FIXME: need scope format data)
156+ text: "" // FROM PREVIEW DATA (FIXME: need scope format data)
154− fontSize: "medium"
157+ fontSize: "medium"
155− color: "#f3f3e7"
158+ color: Theme.palette.selected.backgroundText
156− opacity: .6
159+ opacity: .6
157− width: root.width
160+ anchors {
158− wrapMode: Text.WordWrap
161+ left: parent.left
159− style: Text.Raised
162+ right: parent.right
160− styleColor: "black"
161 }
163 }
164+ wrapMode: Text.WordWrap
165+ style: Text.Raised
166+ styleColor: "black"
162 }
167 }
163 }
168 }
164 }
169 }
Dash/Apps/AppScreenshotsList.qml−1
@@ -15,7 +15,6 @@
15 */
15 */
16
16
17import QtQuick 2.0
17import QtQuick 2.0
18−import "../../Components"
19
18
20ListView {
19ListView {
21 id: screenshots
20 id: screenshots
Dash/DashApps.qml+2−7
@@ -133,13 +133,8 @@ ScopeView {
133 Qt.binding(function() { return isCurrent; })
133 Qt.binding(function() { return isCurrent; })
134 } else {
134 } else {
135 function activateApplication(index, data) {
135 function activateApplication(index, data) {
136− //Check somehow if the app is not installed
137− // IF NOT INSTALLED:
138−// previewLoader.previewData = data;
136+ previewLoader.previewData = data;
139−// previewLoader.open = true;
137+ previewLoader.open = true;
140−// effect.positionPx = mapToItem(categoryView, 0, itemY).y;
141− // IF INSTALLED:
142− shell.activateApplication(data);
143 }
138 }
144
139
145 item.model = Qt.binding(function() { return categoryModels[modelName]; });
140 item.model = Qt.binding(function() { return categoryModels[modelName]; });
Dash/DashBasePreview.qml → Dash/DashPreview.qmlrenamed

The content is the same.

Dash/Generic/GenericPreview.qml+1−1
@@ -56,7 +56,7 @@ DashPreview {
56 }
56 }
57 focus: false
57 focus: false
58 }
58 }
59− description: Column {
59+ body: Column {
60 spacing: units.gu(2)
60 spacing: units.gu(2)
61
61
62 Label {
62 Label {
Dash/Video/VideoPreview.qml+1−3
@@ -19,13 +19,12 @@ import Ubuntu.Components 0.1
19import ".."
19import ".."
20import "../../Components"
20import "../../Components"
21
21
22−DashBasePreview {
22+DashPreview {
23 id: root
23 id: root
24
24
25 property var item
25 property var item
26 property alias ready: nfo.ready
26 property alias ready: nfo.ready
27 property bool playable: false
27 property bool playable: false
28− property bool forceSquare: false
29 readonly property url fileUri: item ? item.fileUri : ""
28 readonly property url fileUri: item ? item.fileUri : ""
30
29
31 VideoInfo {
30 VideoInfo {
@@ -50,7 +49,6 @@ DashBasePreview {
50 id: urlLoader
49 id: urlLoader
51 anchors.left: parent.left
50 anchors.left: parent.left
52 anchors.right: parent.right
51 anchors.right: parent.right
53− height: root.forceSquare ? width : width * previewImage.sourceSize.height / previewImage.sourceSize.width
54 radius: "medium"
52 radius: "medium"
55 image: Image {
53 image: Image {
56 id: previewImage
54 id: previewImage