on xenial help sign in
adding fixes before the tests
commit64239263a94db70c784d405fea249766f7d14631 authorDiego Sarmentero <diego.sarmentero@gmail.com> dateFri 19 Jul 2013, 09:18 (13 years ago) parent8e12b36
5 files changed+27−15
Dash/Apps/AppInfo.qml+8−8 Dash/Apps/AppPreview.qml+2−1 Dash/Apps/AppReviews.qml+8−1 Dash/Apps/ApplicationsFilterGrid.qml+3−2 Dash/DashApps.qml+6−3
Dash/Apps/AppInfo.qml+8−8
@@ -20,8 +20,8 @@ import "../../Components"
2020
2121Row {
2222 id: root
23− property alias icon: imgIcon.source
24− property alias appName: lblAppName.text
23+ property alias icon: image.source
24+ property alias appName: appNameLabel.text
2525 property alias rating: ratingStars.rating
2626 property int rated: 0
2727 property int reviews: 0
@@ -29,12 +29,12 @@ Row {
2929 spacing: units.gu(2)
3030
3131 UbuntuShape {
32− id: imgShape
32+ id: imageShape
3333 width: units.gu(6)
3434 height: units.gu(6)
3535 image: Image {
36− id: imgIcon
37− sourceSize { width: imgShape.width; height: imgShape.height }
36+ id: image
37+ sourceSize { width: imageShape.width; height: imageShape.height }
3838 asynchronous: true
3939 fillMode: Image.PreserveAspectFit
4040 }
@@ -44,7 +44,7 @@ Row {
4444 spacing: units.gu(1)
4545
4646 Label {
47− id: lblAppName
47+ id: appNameLabel
4848 fontSize: "large"
4949 color: "white"
5050 style: Text.Raised
@@ -61,7 +61,7 @@ Row {
6161 }
6262
6363 Label {
64− id: lblRated
64+ id: ratedLabel
6565 fontSize: "medium"
6666 color: "white"
6767 style: Text.Raised
@@ -72,7 +72,7 @@ Row {
7272 }
7373
7474 Label {
75− id: lblReviews
75+ id: reviewsLabel
7676 fontSize: "medium"
7777 color: "white"
7878 style: Text.Raised
Dash/Apps/AppPreview.qml+2−1
@@ -94,9 +94,10 @@ DashPreview {
9494 left: parent.left
9595 right: parent.right
9696 }
97− height: childrenRect.height
97+ height: rateLabel.height
9898
9999 Label {
100+ id: rateLabel
100101 fontSize: "medium"
101102 color: "white"
102103 style: Text.Raised
Dash/Apps/AppReviews.qml+8−1
@@ -75,7 +75,7 @@ Column {
7575 spacing: units.gu(1)
7676 width: root.width
7777
78− TextField {
78+ TextArea {
7979 id: reviewField
8080 placeholderText: i18n.tr("Review")
8181 width: parent.width
@@ -84,6 +84,12 @@ Column {
8484 onFocusChanged: {
8585 root.state = "editing";
8686 }
87+
88+ onTextChanged: {
89+ if (reviewField.text == "") {
90+ reviewField.focus = false;
91+ }
92+ }
8793 }
8894
8995 Button {
@@ -96,6 +102,7 @@ Column {
96102 onClicked: {
97103 root.sendReview(reviewField.text);
98104 root.state = "";
105+ reviewField.text = "";
99106 }
100107 }
101108 }
Dash/Apps/ApplicationsFilterGrid.qml+3−2
@@ -30,9 +30,10 @@ FilterGrid {
3030 delegateHeight: units.gu(9.5)
3131 verticalSpacing: units.gu(2)
3232
33− signal clicked(int index, variant data)
33+ signal clicked(int index, variant data, real itemY)
3434
3535 delegate: Tile {
36+ id: tile
3637 objectName: "delegate" + index
3738 Application {
3839 id: application
@@ -52,6 +53,6 @@ FilterGrid {
5253 imageWidth: units.gu(8)
5354 imageHeight: units.gu(7.5)
5455 source: IconUtil.from_gicon(icon)
55− onClicked: filterGrid.clicked(index, application.desktopFile);
56+ onClicked: filterGrid.clicked(index, application.desktopFile, tile.y);
5657 }
5758}
Dash/DashApps.qml+6−3
@@ -132,9 +132,12 @@ ScopeView {
132132 item.canEnableTerminationMode =
133133 Qt.binding(function() { return isCurrent; })
134134 } else {
135− function activateApplication(index, data) {
136− previewLoader.previewData = data;
137− previewLoader.open = true;
135+ function activateApplication(index, data, itemY) {
136+ // FOR NEXT BRANCH
137+// effect.positionPx = mapToItem(categoryView, 0, itemY).y
138+// previewLoader.previewData = data;
139+// previewLoader.open = true;
140+ shell.activateApplication(data);
138141 }
139142
140143 item.model = Qt.binding(function() { return categoryModels[modelName]; });