on xenial help sign in
Several fixes requested.
commitb943b84ba8bea23490ae52c17e3a0b280ad4e978 authorDiego Sarmentero <diego.sarmentero@gmail.com> dateThu 18 Jul 2013, 17:30 (13 years ago) parent8f4c32d
7 files changed+58−66
Dash/Apps/AppPreview.qml+2−7 Dash/Apps/AppReviews.qml+52−47 Dash/Apps/AppScreenshotsList.qml−1 Dash/DashApps.qml+2−7 Dash/DashBasePreview.qml → Dash/DashPreview.qml Dash/Generic/GenericPreview.qml+1−1 Dash/Video/VideoPreview.qml+1−3
Dash/Apps/AppPreview.qml+2−7
@@ -18,10 +18,9 @@ import QtQuick 2.0
1818import Ubuntu.Components 0.1
1919import Ubuntu.Components.ListItems 0.1 as ListItem
2020import ".."
21−import "../../Applications"
2221import "../../Components"
2322
24−DashBasePreview {
23+DashPreview {
2524 id: root
2625
2726 property var previewData
@@ -34,10 +33,6 @@ DashBasePreview {
3433
3534 header: AppScreenshotsList {
3635 height: units.gu(20)
37− anchors {
38− left: parent.left
39− right: parent.right
40− }
4136
4237 model: 0 // FROM PREVIEW DATA (FIXME: need scope format data)
4338 }
@@ -86,7 +81,7 @@ DashBasePreview {
8681 Label {
8782 text: "" // FROM PREVIEW DATA (FIXME: need scope format data)
8883 fontSize: "medium"
89− color: "#f3f3e7"
84+ color: Theme.palette.selected.backgroundText
9085 opacity: .6
9186 width: parent.width
9287 wrapMode: Text.WordWrap
Dash/Apps/AppReviews.qml+52−47
@@ -26,7 +26,7 @@ Column {
2626
2727 signal sendReview(string review)
2828
29− spacing: units.gu(1)
29+ spacing: units.gu(2)
3030 state: ""
3131
3232 states: [
@@ -74,7 +74,6 @@ Column {
7474 id: row
7575 spacing: units.gu(1)
7676 width: root.width
77− height: childrenRect.height
7877
7978 TextField {
8079 id: reviewField
@@ -103,62 +102,68 @@ Column {
103102
104103 ListItem.ThinDivider {}
105104
106− Column {
107− width: parent.width
108− height: childrenRect.height
109− spacing: units.gu(2)
110−
111− Label {
112− fontSize: "medium"
113− color: "white"
114− style: Text.Raised
115− styleColor: "black"
116− opacity: .9
117− text: i18n.tr("Comments:")
118− }
105+ Label {
106+ fontSize: "medium"
107+ color: "white"
108+ style: Text.Raised
109+ styleColor: "black"
110+ opacity: .9
111+ text: i18n.tr("Comments:")
112+ }
119113
120− Repeater {
121− model: root.model
114+ Repeater {
115+ model: root.model
116+
117+ Column {
118+ width: parent.width
122119
123120 Column {
124− width: root.width
125− height: childrenRect.height
126− Column {
121+
122+ Label {
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+
127144 Label {
128145 text: "" // FROM PREVIEW DATA (FIXME: need scope format data)
129146 fontSize: "medium"
130− color: "white"
131− opacity: .8
132− wrapMode: Text.WordWrap
147+ color: Theme.palette.selected.backgroundText
148+ opacity: .6
133149 style: Text.Raised
134150 styleColor: "black"
135151 }
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− }
151152 }
152− Label {
153− text: "" // FROM PREVIEW DATA (FIXME: need scope format data)
154− fontSize: "medium"
155− color: "#f3f3e7"
156− opacity: .6
157− width: root.width
158− wrapMode: Text.WordWrap
159− style: Text.Raised
160− styleColor: "black"
153+ }
154+
155+ Label {
156+ text: "" // FROM PREVIEW DATA (FIXME: need scope format data)
157+ fontSize: "medium"
158+ color: Theme.palette.selected.backgroundText
159+ opacity: .6
160+ anchors {
161+ left: parent.left
162+ right: parent.right
161163 }
164+ wrapMode: Text.WordWrap
165+ style: Text.Raised
166+ styleColor: "black"
162167 }
163168 }
164169 }
Dash/Apps/AppScreenshotsList.qml−1
@@ -15,7 +15,6 @@
1515 */
1616
1717import QtQuick 2.0
18−import "../../Components"
1918
2019ListView {
2120 id: screenshots
Dash/DashApps.qml+2−7
@@ -133,13 +133,8 @@ ScopeView {
133133 Qt.binding(function() { return isCurrent; })
134134 } else {
135135 function activateApplication(index, data) {
136− //Check somehow if the app is not installed
137− // IF NOT INSTALLED:
138−// previewLoader.previewData = data;
139−// previewLoader.open = true;
140−// effect.positionPx = mapToItem(categoryView, 0, itemY).y;
141− // IF INSTALLED:
142− shell.activateApplication(data);
136+ previewLoader.previewData = data;
137+ previewLoader.open = true;
143138 }
144139
145140 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 {
5656 }
5757 focus: false
5858 }
59− description: Column {
59+ body: Column {
6060 spacing: units.gu(2)
6161
6262 Label {
Dash/Video/VideoPreview.qml+1−3
@@ -19,13 +19,12 @@ import Ubuntu.Components 0.1
1919import ".."
2020import "../../Components"
2121
22−DashBasePreview {
22+DashPreview {
2323 id: root
2424
2525 property var item
2626 property alias ready: nfo.ready
2727 property bool playable: false
28− property bool forceSquare: false
2928 readonly property url fileUri: item ? item.fileUri : ""
3029
3130 VideoInfo {
@@ -50,7 +49,6 @@ DashBasePreview {
5049 id: urlLoader
5150 anchors.left: parent.left
5251 anchors.right: parent.right
53− height: root.forceSquare ? width : width * previewImage.sourceSize.height / previewImage.sourceSize.width
5452 radius: "medium"
5553 image: Image {
5654 id: previewImage