on xenial help sign in
Use anchors instead of sizes.
commit16cbb60cf006adf955cf4f5cc0a74309f96acdff authorMichał Sawicz <michal.sawicz@canonical.com> dateFri 9 Aug 2013, 11:28 (13 years ago) parent2e9d617
1 file changed+6−11
Dash/Apps/AppPreview.qml+6−11
Dash/Apps/AppPreview.qml+6−11
@@ -145,21 +145,21 @@ DashPreview {
145145
146146 AppInfo {
147147 objectName: "appInfo"
148+ anchors { left: parent.left; right: parent.right }
149+
148150 appName: root.previewData.title
149151 icon: IconUtil.from_gicon(root.previewData.appIcon)
150152 rating: root.previewData.infoMap["rating"] ? root.previewData.infoMap["rating"].value : 0
151153 rated: root.previewData.infoMap["rated"] ? root.previewData.infoMap["rated"].value : 0
152154 reviews: root.previewData.infoMap["reviews"] ? root.previewData.infoMap["reviews"].value : 0
153−
154− width: root.width
155155 }
156156
157157 Label {
158+ anchors { left: parent.left; right: parent.right }
158159 text: root.previewData.description
159160 fontSize: "medium"
160161 color: Theme.palette.selected.backgroundText
161162 opacity: .6
162− width: parent.width
163163 wrapMode: Text.WordWrap
164164 style: Text.Raised
165165 styleColor: "black"
@@ -168,10 +168,7 @@ DashPreview {
168168 ListItem.ThinDivider {}
169169
170170 Item {
171− anchors {
172− left: parent.left
173− right: parent.right
174− }
171+ anchors { left: parent.left; right: parent.right }
175172 height: rateLabel.height
176173
177174 Label {
@@ -187,6 +184,7 @@ DashPreview {
187184 anchors.verticalCenter: parent.verticalCenter
188185 }
189186
187+ // FIXME these need to be made interactive and connected to the scope
190188 RatingStars {
191189 anchors.right: parent.right
192190 anchors.verticalCenter: parent.verticalCenter
@@ -197,10 +195,7 @@ DashPreview {
197195
198196 AppReviews {
199197 objectName: "appReviews"
200− anchors {
201− left: parent.left
202− right: parent.right
203− }
198+ anchors { left: parent.left; right: parent.right }
204199
205200 model: root.previewData.infoMap["comments"] ? root.previewData.infoMap["comments"].value : undefined
206201