Merge lp:~qqworini/ubuntu-rssreader-app/fix-gridview-bug into lp:~ubuntu-shorts-dev/ubuntu-rssreader-app/trunk

Proposed by Joey Chan
Status: Merged
Approved by: Roman Shchekin
Approved revision: 177
Merged at revision: 177
Proposed branch: lp:~qqworini/ubuntu-rssreader-app/fix-gridview-bug
Merge into: lp:~ubuntu-shorts-dev/ubuntu-rssreader-app/trunk
Diff against target: 73 lines (+28/-16)
2 files modified
OrganicGrid.qml (+16/-16)
shorts-app.qml (+12/-0)
To merge this branch: bzr merge lp:~qqworini/ubuntu-rssreader-app/fix-gridview-bug
Reviewer Review Type Date Requested Status
Roman Shchekin Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+207234@code.launchpad.net

Commit message

update gridview to fix bug #1282002

Description of the change

update gridview to fix bug #1282002

also add a very important signal to mainView to tell others that App's size changed

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Roman Shchekin (mrqtros) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'OrganicGrid.qml'
--- OrganicGrid.qml 2014-02-14 08:27:12 +0000
+++ OrganicGrid.qml 2014-02-19 15:43:07 +0000
@@ -9,30 +9,30 @@
99
10 anchors.fill: parent10 anchors.fill: parent
1111
12 // comment 000 start12 // comment organicGridRoot_0 start
13 // below property and slot are used for expanding app window in desktop mode13 // below property and slot are used for expanding app window in desktop mode
14 property bool canReload: false14 property bool canReload: false
15 onHeightChanged: {
16 if (canReload) {
17 canReload = false
18 clear()
19 reload()
20 }
21 }
2215
23 // this value will be changed if the app's width changed16 // this value will be changed if the app's width changed
24 property int numberAddMore: 1217 property int numberAddMore: 12
25 onWidthChanged: {18
26 var num = 12 * (1 + width / height)19 // connect to MainView's sizeChanged signal
27 numberAddMore = num > 12 ? num : 1220 Connections{
28 if (canReload) {21 id: connMainview
29 canReload = false22 target: mainView
30 clear()23
31 reload()24 onSizeChanged: {
25 var num = 12 * (1 + width / height)
26 numberAddMore = num > 12 ? num : 12
27 if (canReload) {
28 canReload = false
29 clear()
30 reload()
31 }
32 }32 }
33 }33 }
3434
35 // comment 000 end35 // comment organicGridRoot_0 end
3636
37 property var rectangleList: []37 property var rectangleList: []
38 property var articleModel: gridViewModel38 property var articleModel: gridViewModel
3939
=== modified file 'shorts-app.qml'
--- shorts-app.qml 2014-02-13 03:55:55 +0000
+++ shorts-app.qml 2014-02-19 15:43:07 +0000
@@ -20,6 +20,18 @@
20 width: units.gu(50)20 width: units.gu(50)
21 height: units.gu(75)21 height: units.gu(75)
2222
23 // comment mainview_0 start
24 // this signal will be triggered when size changed
25 // PS: onSizeChanged slot doesn't work
26 signal sizeChanged()
27 onHeightChanged: {
28 sizeChanged()
29 }
30 onWidthChanged: {
31 sizeChanged()
32 }
33 // comment mainview_0 end
34
23 headerColor: "#3a2c32"35 headerColor: "#3a2c32"
24 backgroundColor: "#875864"36 backgroundColor: "#875864"
25 footerColor: "#9b616c"37 footerColor: "#9b616c"

Subscribers

People subscribed via source and target branches