Merge lp:~qqworini/ubuntu-rssreader-app/new-gridview2 into lp:~ubuntu-shorts-dev/ubuntu-rssreader-app/trunk

Proposed by Joey Chan
Status: Merged
Approved by: Roman Shchekin
Approved revision: 56
Merged at revision: 56
Proposed branch: lp:~qqworini/ubuntu-rssreader-app/new-gridview2
Merge into: lp:~ubuntu-shorts-dev/ubuntu-rssreader-app/trunk
Diff against target: 1673 lines (+318/-1074)
12 files modified
ListColumnDelegate.qml (+0/-62)
ListColumnView.qml (+0/-119)
OrganicGrid.qml (+227/-0)
RssFeedPage.qml (+3/-3)
TopicTab.qml (+3/-3)
addDelegate.js (+0/-153)
article_items/ArticleFullImg.qml (+31/-91)
article_items/ArticleOneImgA.qml (+25/-85)
article_items/ArticleOneImgB.qml (+0/-180)
article_items/ArticleTextA.qml (+15/-59)
article_items/ArticleTextB.qml (+14/-63)
article_items/ArticleTwoImgA.qml (+0/-256)
To merge this branch: bzr merge lp:~qqworini/ubuntu-rssreader-app/new-gridview2
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Roman Shchekin Approve
Review via email: mp+183377@code.launchpad.net

Commit message

what's new:
1. new grid view with new layout algorithm;
2. article items updated;

to do:
1. memory management of the new grid view;
2. read and unread indicate (need to modify the database first);
3. order articles;

Description of the change

what's new:
1. new grid view with new layout algorithm;
2. article items updated;

to do:
1. memory management of the new grid view;
2. read and unread indicate (need to modify the database first);
3. order articles;

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: Needs Fixing (continuous-integration)
Revision history for this message
David Planella (dpm) wrote :

Hi Joey, really nice work!

Just two quick comments:

- There is an autopilot test that is failing. I believe either the test or Jenkins needs updating to clear the database on each run, as looking at the autopilot video [1] it seems it fails trying to create a topic that it already exists
- To make your life easier for next time, there is no need to create a new branch and a new merge proposal when you fix conflicts. The procedure is simply.
  1. bzr merge lp:ubuntu-rss-reader-app to merge the latest trunk
  2. Fix any merge conflicts, either automatically or manually
  3. Commit and push the new revisions
  4. Then the merge proposal is automatically updated for you

[1] http://91.189.93.70:8080/job/generic-mediumtests/132/artifact/ubuntu_rssreader_app.tests.test_rssreader.TestMainWindow.test_add_remove_feed_and_topic%20(with%20mouse).ogv

Revision history for this message
Joey Chan (qqworini) wrote :

Hi David,
1. do I need to do something for the autopilot test?
2. I did try to fix conflicts in that branch, but I got some errors from "Bazaar Explorer", a bzr GUI client. then, I uploaded it to a new branch. Maybe my revision is too old to merge :P

> Hi Joey, really nice work!
>
> Just two quick comments:
>
> - There is an autopilot test that is failing. I believe either the test or
> Jenkins needs updating to clear the database on each run, as looking at the
> autopilot video [1] it seems it fails trying to create a topic that it already
> exists
> - To make your life easier for next time, there is no need to create a new
> branch and a new merge proposal when you fix conflicts. The procedure is
> simply.
> 1. bzr merge lp:ubuntu-rss-reader-app to merge the latest trunk
> 2. Fix any merge conflicts, either automatically or manually
> 3. Commit and push the new revisions
> 4. Then the merge proposal is automatically updated for you
>
> [1] http://91.189.93.70:8080/job/generic-mediumtests/132/artifact/ubuntu_rssre
> ader_app.tests.test_rssreader.TestMainWindow.test_add_remove_feed_and_topic%20
> (with%20mouse).ogv

Revision history for this message
Joey Chan (qqworini) wrote :

Could someone take a time to review?

Revision history for this message
Roman Shchekin (mrqtros) wrote :

I can review today, little but later! =)

03.09.13 17:05 Joey Chan написал(а):

Could someone take a time to review?

--
https://code.launchpad.net/~qqworini/ubuntu-rssreader-app/new-gridview2/+merge/183377

Your team Ubuntu RSS Feed Reader Developers is requested to review the proposed merge of lp:~qqworini/ubuntu-rssreader-app/new-gridview2 into lp:ubuntu-rssreader-app.

Revision history for this message
Roman Shchekin (mrqtros) wrote :

Looks like you are on the right way :)

review: Approve
Revision history for this message
David Planella (dpm) wrote :

On Mon, Sep 2, 2013 at 10:11 AM, Joey Chan <email address hidden> wrote:

> Hi David,
> 1. do I need to do something for the autopilot test?
>

Hi Joey,

I've ask Nick Skaggs, our QA Comunity Coordinator to help you on this. You
can also find him on IRC as 'balloons' in the #ubuntu-app-devel channel on
Freenode.

> 2. I did try to fix conflicts in that branch, but I got some errors from
> "Bazaar Explorer", a bzr GUI client. then, I uploaded it to a new branch.
> Maybe my revision is too old to merge :P
>

No worries, no need to change anything now, I just thought I'd mention it
to make your life easier.

Roman, if you're happy with the code after your review, please feel free to
top-approve so that the merge proposal can land (to top-approve, just click
on the Needs Review link at the top of the merge proposal's page).

>
> > Hi Joey, really nice work!
> >
> > Just two quick comments:
> >
> > - There is an autopilot test that is failing. I believe either the test
> or
> > Jenkins needs updating to clear the database on each run, as looking at
> the
> > autopilot video [1] it seems it fails trying to create a topic that it
> already
> > exists
> > - To make your life easier for next time, there is no need to create a
> new
> > branch and a new merge proposal when you fix conflicts. The procedure is
> > simply.
> > 1. bzr merge lp:ubuntu-rss-reader-app to merge the latest trunk
> > 2. Fix any merge conflicts, either automatically or manually
> > 3. Commit and push the new revisions
> > 4. Then the merge proposal is automatically updated for you
> >
> > [1]
> http://91.189.93.70:8080/job/generic-mediumtests/132/artifact/ubuntu_rssre
> >
> ader_app.tests.test_rssreader.TestMainWindow.test_add_remove_feed_and_topic%20
> > (with%20mouse).ogv
> --
>
> https://code.launchpad.net/~qqworini/ubuntu-rssreader-app/new-gridview2/+merge/183377
> Your team Ubuntu RSS Feed Reader Developers is requested to review the
> proposed merge of lp:~qqworini/ubuntu-rssreader-app/new-gridview2 into
> lp:ubuntu-rssreader-app.
>

Revision history for this message
Roman Shchekin (mrqtros) wrote :

Hi, David!

Thanks for your tips ;)

2013/9/3 David Planella <email address hidden>

> On Mon, Sep 2, 2013 at 10:11 AM, Joey Chan <email address hidden> wrote:
>
> > Hi David,
> > 1. do I need to do something for the autopilot test?
> >
>
> Hi Joey,
>
> I've ask Nick Skaggs, our QA Comunity Coordinator to help you on this. You
> can also find him on IRC as 'balloons' in the #ubuntu-app-devel channel on
> Freenode.
>
>
> > 2. I did try to fix conflicts in that branch, but I got some errors from
> > "Bazaar Explorer", a bzr GUI client. then, I uploaded it to a new branch.
> > Maybe my revision is too old to merge :P
> >
>
> No worries, no need to change anything now, I just thought I'd mention it
> to make your life easier.
>
> Roman, if you're happy with the code after your review, please feel free to
> top-approve so that the merge proposal can land (to top-approve, just click
> on the Needs Review link at the top of the merge proposal's page).
>
>
> >
> > > Hi Joey, really nice work!
> > >
> > > Just two quick comments:
> > >
> > > - There is an autopilot test that is failing. I believe either the test
> > or
> > > Jenkins needs updating to clear the database on each run, as looking at
> > the
> > > autopilot video [1] it seems it fails trying to create a topic that it
> > already
> > > exists
> > > - To make your life easier for next time, there is no need to create a
> > new
> > > branch and a new merge proposal when you fix conflicts. The procedure
> is
> > > simply.
> > > 1. bzr merge lp:ubuntu-rss-reader-app to merge the latest trunk
> > > 2. Fix any merge conflicts, either automatically or manually
> > > 3. Commit and push the new revisions
> > > 4. Then the merge proposal is automatically updated for you
> > >
> > > [1]
> >
> http://91.189.93.70:8080/job/generic-mediumtests/132/artifact/ubuntu_rssre
> > >
> >
> ader_app.tests.test_rssreader.TestMainWindow.test_add_remove_feed_and_topic%20
> > > (with%20mouse).ogv
> > --
> >
> >
> https://code.launchpad.net/~qqworini/ubuntu-rssreader-app/new-gridview2/+merge/183377
> > Your team Ubuntu RSS Feed Reader Developers is requested to review the
> > proposed merge of lp:~qqworini/ubuntu-rssreader-app/new-gridview2 into
> > lp:ubuntu-rssreader-app.
> >
>
> --
>
> https://code.launchpad.net/~qqworini/ubuntu-rssreader-app/new-gridview2/+merge/183377
> You are reviewing the proposed merge of
> lp:~qqworini/ubuntu-rssreader-app/new-gridview2 into
> lp:ubuntu-rssreader-app.
>

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file 'ListColumnDelegate.qml'
2--- ListColumnDelegate.qml 2013-08-03 10:06:36 +0000
3+++ ListColumnDelegate.qml 1970-01-01 00:00:00 +0000
4@@ -1,62 +0,0 @@
5-import QtQuick 2.0
6-
7-import Ubuntu.Components 0.1
8-import Ubuntu.Components.ListItems 0.1 as ListItem
9-import Ubuntu.Components.Popups 0.1
10-
11-import "./addDelegate.js" as AddD
12-import "./imgSeparator.js" as ImgS
13-//import "./article_items"
14-
15-Column {
16- id: rss_item_delegate
17-// width: units.gu(50)
18-// height: units.gu(75)
19-
20-// height: parent.height
21- spacing: units.gu(2)
22-
23- property bool isFull: false
24- property real childrenSumHeight: 0
25- property real childrenMaxWidth: 0
26- property int modelIndex
27-
28- function addItem(rss_item, rss_description, model, index)
29- {
30- var newD = AddD.addDelegate(rss_item, ImgS.separate(rss_description), model, index, rss_item_delegate);
31- getChildrenRect() ;
32- rss_item_delegate.width = childrenMaxWidth ;
33-// console.log("childrenSumHeight, column.height: ", childrenSumHeight, rss_item_delegate.childrenRect.height)
34- //console.log("children list: ", rss_item_delegate.children.length)
35- if (childrenSumHeight > rss_item_delegate.height + units.gu(2))
36- {
37- isFull = true ;
38- newD.destroy() ;
39- getChildrenRect() ;
40- rss_item_delegate.width = childrenMaxWidth ;
41-// rss_item_delegate.children[rss_item_delegate.children.length-1].destroy() ;
42-// rss_item_delegate.spacing = (childrenSumHeight - rss_item_delegate.height) / (rss_item_delegate.children.length + 2)
43- return false ;
44- }
45- else
46- {
47- isFull = false ;
48- return true ;
49- }
50- }
51-
52- function getChildrenRect()
53- {
54- childrenSumHeight = 0 ;
55- childrenMaxWidth = 0 ;
56- var length = rss_item_delegate.children.length ;
57- for (var i=0; i<length; i++)
58- {
59- childrenSumHeight += (rss_item_delegate.children[i].height + units.gu(2) * length) ;
60- if (rss_item_delegate.children[i].width > childrenMaxWidth)
61- {
62- childrenMaxWidth = rss_item_delegate.children[i].width
63- }
64- }
65- }
66-}
67
68=== removed file 'ListColumnView.qml'
69--- ListColumnView.qml 2013-08-16 16:22:59 +0000
70+++ ListColumnView.qml 1970-01-01 00:00:00 +0000
71@@ -1,119 +0,0 @@
72-import QtQuick 2.0
73-import QtQuick.XmlListModel 2.0
74-import Ubuntu.Components 0.1
75-import Ubuntu.Components.ListItems 0.1 as ListItem
76-import Ubuntu.Components.Popups 0.1
77-
78-import "databasemodule_v2.js" as DB
79-
80-Item {
81-
82- property int tag_id
83- property bool isAll: false
84- property variant feedArray: []
85- property alias rss_model: tempmodel
86-
87- anchors.fill: parent
88- anchors.bottomMargin: units.gu(7)
89-
90- function reload() {
91- tempmodel.clear();
92- if (!isAll)
93- {
94- for (var j=0; j < feedArray.length ; j++)
95- {
96- var articles = DB.loadArticles({"isAll": false, "feedId": feedArray[j].id});
97- var temp
98- for (var i=0; i < articles.rows.length; i++)
99- {
100- temp =
101- {
102- "id": articles.rows[i].id
103- ,"title": articles.rows[i].title
104- ,"content": articles.rows[i].content
105- ,"link": articles.rows[i].link
106- ,"description": articles.rows[i].description
107- ,"pubdate": articles.rows[i].pubdate
108- ,"status": articles.rows[i].status
109- ,"favourite": articles.rows[i].favourite
110- ,"image": articles.rows[i].image
111- ,"guid": articles.rows[i].guid
112- ,"feed_id": articles.rows[i].feed_id
113- ,"count": articles.rows[i].count
114- ,"feed_name": articles.rows[i].feed_name
115- }
116- tempmodel.append(temp);
117- }
118- }
119- }
120- else
121- {
122- var articles = DB.loadArticles({"isAll": true});
123- var temp
124- for (var i=0; i < articles.rows.length; i++)
125- {
126- temp =
127- {
128- "id": articles.rows[i].id
129- ,"title": articles.rows[i].title
130- ,"content": articles.rows[i].content
131- ,"link": articles.rows[i].link
132- ,"description": articles.rows[i].description
133- ,"pubdate": articles.rows[i].pubdate
134- ,"status": articles.rows[i].status
135- ,"favourite": articles.rows[i].favourite
136- ,"image": articles.rows[i].image
137- ,"guid": articles.rows[i].guid
138- ,"feed_id": articles.rows[i].feed_id
139- ,"count": articles.rows[i].count
140- ,"feed_name": articles.rows[i].feed_name
141- }
142- tempmodel.append(temp);
143- }
144- }
145-
146-// console.timeEnd("model append");
147- list_column.loadArticles();
148- }
149-
150-
151- ListView {
152- id: list_column
153-
154- anchors.fill: parent
155- anchors.margins: units.gu(2)
156- orientation: ListView.Horizontal
157- spacing: units.gu(3)
158- cacheBuffer: 99999
159-
160- function loadArticles(/*temp_model*/) {
161- console.time("loadArticles: ");
162- column_model.clear() ;
163- column_model.append( { "nothing": "nothing" } ) ;
164- currentIndex = 0 ;
165-
166- for (var i=0; i< tempmodel.count; i++)
167- {
168- while (!currentItem.addItem(tempmodel.get(i), tempmodel.get(i).content, tempmodel, i))
169- {
170- column_model.append( { "nothing": "nothing" } ) ;
171- currentIndex = column_model.count - 1 ;
172- }
173- }
174-
175- positionViewAtBeginning() ;
176- console.timeEnd("loadArticles: ");
177- }
178-
179- model: ListModel { id: column_model }
180-
181- delegate: ListColumnDelegate {
182- height: list_column.height
183- modelIndex: index
184- }
185- }
186-
187- ListModel {
188- id: tempmodel
189- }
190-}
191
192=== added file 'OrganicGrid.qml'
193--- OrganicGrid.qml 1970-01-01 00:00:00 +0000
194+++ OrganicGrid.qml 2013-09-02 04:22:41 +0000
195@@ -0,0 +1,227 @@
196+import QtQuick 2.0
197+import QtGraphicalEffects 1.0
198+import Ubuntu.Components 0.1
199+import "databasemodule_v2.js" as DB
200+import "./imgSeparator.js" as ImageSeparator
201+
202+Item {
203+ id: organicGridRoot
204+
205+ anchors.fill: parent
206+
207+ property variant rectangleList: []
208+ property int tag_id
209+ property bool isAll: false
210+ property variant feedArray: []
211+
212+ /*!
213+ * \brief check collision of two article items
214+ *
215+ */
216+ function checkCollision(rect1, rect2) {
217+ return !((rect1.y + rect1.height <= rect2.y) ||
218+ (rect2.y + rect2.height <= rect1.y) ||
219+ (rect1.x >= rect2.x + rect2.width) ||
220+ (rect2.x >= rect1.x + rect1.width))
221+ }
222+
223+ /*!
224+ * \brief Returns a margin within given numbers. Used to make the view
225+ * look more organic.
226+ */
227+ function randomMargin() {
228+ return units.gu(2 /*3 + Math.random() * 4*/);
229+ }
230+
231+ /*!
232+ * Adds a given article to the model. Also adds metadata about the
233+ * model to the article.
234+ */
235+ function addArticleToModel(article) {
236+ article.model = articleModel
237+ article.modelIndex = articleModel.count
238+ articleModel.append(article)
239+ }
240+
241+
242+ /*!
243+ * Clears all articles from the model and the view.
244+ */
245+ function clear() {
246+ for(var i in rectangleList) {
247+ rectangleList[i].destroy()
248+ }
249+
250+ articleModel.clear()
251+ rectangleList = []
252+ }
253+
254+ /*!
255+ * Reloads the organic view. See inline comments for details.
256+ */
257+ function reload() {
258+ clear()
259+ // Decide if we should load all articles in our database or a subset.
260+ if (!isAll)
261+ {
262+ for (var j=0; j < feedArray.length ; j++)
263+ {
264+ var feedArticles = DB.loadArticles({"isAll": false, "feedId": feedArray[j].id});
265+ for(var i = 0; i < feedArticles.rows.length; i++) {
266+ addArticleToModel(feedArticles.rows[i])
267+ }
268+ }
269+ } else {
270+ var feedArticles = DB.loadArticles({"isAll": true});
271+ for (var i=0; i < feedArticles.rows.length; i++)
272+ {
273+ addArticleToModel(feedArticles.rows[i])
274+ }
275+ }
276+
277+ // Initial values for the starting column of items
278+ var xEdge = 0;
279+ var lastColumnX = 0;
280+ var y = randomMargin();
281+ // A hard-coded sequence that gives an organic look, but is not
282+ // completely random
283+ var sequence = [0,1,0,1,2,1,0,0,2,1,0,1,0,0];
284+ // TODO: Remove hard limit on 300 items
285+ for(var i = 0; i < articleModel.count; i++) {
286+ var article = articleModel.get(i);
287+// var imageArray = ImageSeparator.separate(article.content)
288+ var imageArray = [article.image]
289+// console.log("imageArray: ", imageArray)
290+ var hasImage = (article.image !== "");
291+
292+ // Pick the type of size we will use for this item from the sequence
293+ var sizeType = sequence[i % sequence.length];
294+ var alignType = parseInt(Math.random() * 2)
295+// if(hasImage) {
296+// alignType = parseInt(Math.random() * 4);
297+// } else {
298+// alignType = parseInt(Math.random() * 2);
299+// }
300+
301+ var alignName
302+
303+ // Name of the QML file to be used
304+ var componentName
305+ var noImageName = ""
306+ if(!hasImage) {
307+ switch(alignType) {
308+ case 0:
309+ alignName = "TextA"
310+ break;
311+ case 1:
312+ alignName = "TextB"
313+ break;
314+ }
315+ noImageName += "NoImage";
316+ sizeType = 0;
317+ }
318+ else {
319+ switch(alignType) {
320+ case 0:
321+ alignName = "OneImgA"
322+ break;
323+ case 1:
324+ alignName = "FullImg"
325+ break;
326+ }
327+ }
328+ componentName = "article_items/" + "Article" + alignName + ".qml";
329+
330+ // create component for an article
331+ var component = Qt.createComponent(componentName);
332+ if(component.status !== Component.Ready) {
333+ console.log("Error loading component:", component.errorString());
334+ continue; // Skip if we for some reason could not create this component
335+ }
336+
337+ var properties = {
338+ "rss_item": article,
339+ "imageArray": imageArray,
340+ "rss_model": articleModel,
341+ "model_index": article.modelIndex
342+ }
343+
344+ // This is the actual item that will be on display
345+ var articleItem = component.createObject(itemContainer /*organicFlickable.contentItem*/, properties);
346+
347+ if(y + articleItem.height > organicGridRoot.height) {
348+ y = randomMargin();
349+ xEdge = lastColumnX;
350+ }
351+
352+ // The xEdge is where the last "column" of items were placed last
353+ // This keeps us moving forward in x-direction
354+ var x = xEdge + randomMargin();
355+
356+ // We add some extra random margin to make it look a bit more organic
357+ x += randomMargin();
358+
359+ articleItem.x = x
360+ articleItem.y = y
361+
362+ // Check for collisions with all other items
363+ // TODO: See if this may be limited to only the previous two colums
364+ for(var j = 0; j < rectangleList.length; j++) {
365+ var rect2 = rectangleList[j]
366+ if(checkCollision(articleItem, rect2)) {
367+ articleItem.x = rect2.x + rect2.width + randomMargin();
368+ }
369+ }
370+
371+ // Did we move the x-edge value further to the right than before?
372+ lastColumnX = Math.max(articleItem.x, lastColumnX);
373+
374+ // Push this item to all lists and all that stuff
375+ var list = rectangleList
376+ list.push(articleItem)
377+ rectangleList = list
378+
379+ // Increment y for the next item
380+ y += articleItem.height + randomMargin();
381+ }
382+ organicFlickable.scrollToStart()
383+ }
384+
385+ /*!
386+ * use Flickable as articles container
387+ */
388+ Flickable {
389+ id: organicFlickable
390+ anchors.fill: parent
391+ contentWidth: itemContainer.width /*contentItem.childrenRect.width*/
392+ contentHeight: parent.height
393+
394+ Item {
395+ id: itemContainer
396+ // color: "white"
397+ anchors {
398+ left: parent.left
399+ top: parent.top
400+ }
401+
402+ width: childrenRect.width + units.gu(6)
403+ height: parent.height
404+ }
405+
406+// Behavior on contentX {
407+// NumberAnimation {
408+// duration: 600
409+// easing.type: Easing.InOutQuart
410+// }
411+// }
412+
413+ function scrollToStart() {
414+ contentX = 0
415+ }
416+ }
417+
418+ ListModel
419+ {
420+ id: articleModel
421+ }
422+}
423
424=== modified file 'RssFeedPage.qml'
425--- RssFeedPage.qml 2013-09-01 09:07:30 +0000
426+++ RssFeedPage.qml 2013-09-02 04:22:41 +0000
427@@ -98,7 +98,7 @@
428
429 Label {
430 id: label_time
431- text: DateUtils.formatRelativeTime(i18n, model.pubdate)
432+ text: DateUtils.formatRelativeTime(i18n, pubdate)
433 fontSize: "small"
434 anchors.horizontalCenter: parent.horizontalCenter
435 width: parent.width - units.gu(4)
436@@ -106,14 +106,14 @@
437
438 Label {
439 fontSize: "large"
440- text: model.title
441+ text: title
442 anchors.horizontalCenter: parent.horizontalCenter
443 width: parent.width - units.gu(4)
444 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
445 }
446
447 Label {
448- text: model.content
449+ text: content
450 linkColor: UbuntuColors.orange // Temporary. Mb bad color, but better than dark blue.
451 anchors.horizontalCenter: parent.horizontalCenter
452 width: parent.width - units.gu(4)
453
454=== modified file 'TopicTab.qml'
455--- TopicTab.qml 2013-09-01 14:35:33 +0000
456+++ TopicTab.qml 2013-09-02 04:22:41 +0000
457@@ -63,11 +63,11 @@
458 feeds.push(feedTags.rows.item(i))
459 }
460 feedArray = feeds
461- listColumnView.reload()
462+ organicGridView.reload()
463 }
464
465- ListColumnView {
466- id: listColumnView
467+ OrganicGrid {
468+ id: organicGridView
469
470 tag_id: topicTab.topicId
471 isAll: topicTab.isAll
472
473=== removed file 'addDelegate.js'
474--- addDelegate.js 2013-08-03 10:06:36 +0000
475+++ addDelegate.js 1970-01-01 00:00:00 +0000
476@@ -1,153 +0,0 @@
477-//var component;
478-//var sprite;
479-
480-//var mob_component;
481-//var mob_sprite;
482-
483-function addDelegate(rss_item, imageArray, model, index, parentItem)
484-{
485-// console.log("add delegate start")
486-// component = undefined ;
487-// sprite = undefined ;
488-
489-// console.time("add delegate");
490- var rand = Math.random() ;
491- rand = Math.round(rand * 100)
492- var newD
493- if (imageArray.length == 1)
494- {
495-
496-// console.log("rand value: ", rand)
497- /*else*/ if (rand < 35)
498- {
499- // component = Qt.createComponent("./ArticledelegateOneImgB.qml");
500- // sprite = component.createObject(rss_item_delegate, {"rss_title": rss_title, "imageArray": imageArray});
501- // console.log("delegate BBBBB")
502- newD = delegateOneImgA (rss_item, imageArray, model, index, parentItem)
503- }
504- else if (rand > 70)
505- {
506- // component = Qt.createComponent("./ArticledelegateOneImgA.qml");
507- // sprite = component.createObject(rss_item_delegate, {"rss_title": rss_title, "imageArray": imageArray});
508- // console.log("delegate AAAAA")
509- newD = delegateOneImgB (rss_item, imageArray, model, index, parentItem)
510- }
511- else
512- {
513- newD = delegateFullImg (rss_item, imageArray, model, index, parentItem)
514- }
515-
516- }
517- else if (imageArray.length < 1)
518- {
519- if (rand > 50)
520- {
521- newD = delegateTextA (rss_item/*, imageArray*/, model, index, parentItem) ;
522- }
523- else
524- {
525- newD = delegateTextB (rss_item/*, imageArray*/, model, index, parentItem) ;
526- }
527- }
528- else
529- {
530- newD = delegateTwoImgA (rss_item, imageArray, model, index, parentItem)
531- }
532-
533- return newD ;
534-}
535-
536-function delegateOneImgA (rss_item, imageArray, model, index, parentItem)
537-{
538- var component;
539- var sprite;
540- component = Qt.createComponent("./article_items/ArticleOneImgA.qml");
541- sprite = component.createObject(parentItem, {"rss_item": rss_item, "imageArray": imageArray, "rss_model": model, "model_index": index});
542-// console.log("delegate AAAAA")
543-
544- if (sprite == null) {
545- // Error Handling
546- console.log("Error creating delegate object delegateOneImgA");
547- return
548- }
549- return sprite
550-}
551-
552-function delegateOneImgB (rss_item, imageArray, model, index, parentItem)
553-{
554- var component;
555- var sprite;
556- component = Qt.createComponent("./article_items/ArticleOneImgB.qml");
557- sprite = component.createObject(parentItem, {"rss_item": rss_item, "imageArray": imageArray, "rss_model": model, "model_index": index});
558-// console.log("delegate BBBBB")
559-
560- if (sprite == null) {
561- // Error Handling
562- console.log("Error creating delegate object delegateOneImgB");
563- return
564- }
565- return sprite
566-}
567-
568-function delegateTextA (rss_item, model, index, parentItem)
569-{
570- var component;
571- var sprite;
572- component = Qt.createComponent("./article_items/ArticleTextA.qml");
573- sprite = component.createObject(parentItem, {"rss_item": rss_item, "rss_model": model, "model_index": index});
574-// console.log("delegate CCCCC")
575-
576- if (sprite == null) {
577- // Error Handling
578- console.log("Error creating delegate object delegateTextA");
579- return
580- }
581- return sprite
582-}
583-
584-function delegateTextB (rss_item, model, index, parentItem)
585-{
586- var component;
587- var sprite;
588- component = Qt.createComponent("./article_items/ArticleTextB.qml");
589- sprite = component.createObject(parentItem, {"rss_item": rss_item, "rss_model": model, "model_index": index});
590-// console.log("delegate CCCCC")
591-
592- if (sprite == null) {
593- // Error Handling
594- console.log("Error creating delegate object delegateTextB");
595- return
596- }
597- return sprite
598-}
599-
600-function delegateFullImg (rss_item, imageArray, model, index, parentItem)
601-{
602- var component;
603- var sprite;
604- component = Qt.createComponent("./article_items/ArticleFullImg.qml");
605- sprite = component.createObject(parentItem, {"rss_item": rss_item, "imageArray": imageArray, "rss_model": model, "model_index": index});
606-// console.log("delegate DDDDD")
607-
608- if (sprite == null) {
609- // Error Handling
610- console.log("Error creating delegate object delegateFullImg");
611- return
612- }
613- return sprite
614-}
615-
616-function delegateTwoImgA (rss_item, imageArray, model, index, parentItem)
617-{
618- var component;
619- var sprite;
620- component = Qt.createComponent("./article_items/ArticleTwoImgA.qml");
621- sprite = component.createObject(parentItem, {"rss_item": rss_item, "imageArray": imageArray, "rss_model": model, "model_index": index});
622-
623- if (sprite == null) {
624- // Error Handling
625- console.log("Error creating delegate object delegateTwoImgA");
626- return
627- }
628- return sprite
629-}
630
631=== modified file 'article_items/ArticleFullImg.qml'
632--- article_items/ArticleFullImg.qml 2013-08-29 21:22:17 +0000
633+++ article_items/ArticleFullImg.qml 2013-09-02 04:22:41 +0000
634@@ -7,46 +7,56 @@
635 {
636 id: articleFullImg
637 width: units.gu(24)
638- height: units.gu(19)
639+ height: units.gu(20)
640 radius: "medium"
641- // anchors.fill: parent
642+ color: "#3E2930"
643+
644 property variant rss_item
645 property variant imageArray: []
646 property variant rss_model
647 property int model_index
648
649- image: Image {
650- id: pic
651- width: articleFullImg.width
652-// anchors.top: articleFullImg.top
653- fillMode: Image.PreserveAspectCrop
654- source: imageArray[0]
655+ UbuntuShape
656+ {
657+ id: u_pic
658+ width: parent.width
659+ height: pic.height > (parent.height - units.gu(1.5)) ? (parent.height - units.gu(1.5)) : pic.height
660+ radius: "medium"
661+ image: Image {
662+ id: pic
663+ width: u_pic.width
664+ source: imageArray[0]
665+ }
666 }
667
668 Rectangle
669 {
670 id: rec_label_bg
671- color: "black"
672+ color: "#3E2930"
673 anchors.top: content.top
674 anchors.bottom: content.bottom
675 width: parent.width
676- opacity: 0.7
677+ opacity: 1
678 }
679
680 Column
681 {
682 id: content
683 anchors.bottom: parent.bottom
684- anchors.bottomMargin: units.gu(1)
685+ anchors.bottomMargin: units.gu(1.5)
686 anchors.horizontalCenter: parent.horizontalCenter
687- width: parent.width - units.gu(1)
688- spacing: units.gu(1)
689+ width: parent.width - units.gu(2)
690+ height: parent.height / 2.3
691+ spacing: units.gu(0.8)
692
693 Label
694 {
695 id: label_time
696 text: DateUtils.formatRelativeTime(i18n, rss_item.pubdate)
697- fontSize: "small"
698+ fontSize: "x-small"
699+ width: parent.width
700+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
701+ opacity: 0.6
702 }
703
704 Label
705@@ -54,20 +64,23 @@
706 id: label_title
707 text: rss_item.title
708 width: parent.width
709+ height: parent.height - parent.spacing * 2 - label_time.paintedHeight - label_feedname.paintedHeight
710 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
711- // color: "white"
712- fontSize: "medium"
713- textFormat: Text.StyledText
714+ fontSize: "small"
715+ textFormat: Text.PlainText
716 font.weight: Font.DemiBold
717+ elide: Text.ElideRight
718+ opacity: 0.8
719 }
720
721 Label
722 {
723 id: label_feedname
724 text: rss_item.feed_name
725- fontSize: "small"
726+ fontSize: "x-small"
727 width: parent.width
728 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
729+ opacity: 0.6
730 }
731 }
732
733@@ -81,76 +94,3 @@
734 }
735 }
736 }
737-
738-//Column {
739-// width: units.gu(26)
740-// height: units.gu(20)
741-// // anchors.fill: parent
742-// property variant rss_item
743-// property variant imageArray: []
744-// property variant rss_model
745-// property int model_index
746-
747-// // Row
748-// // {
749-// // spacing: units.gu(1)
750-// // anchors.fill: parent
751-// //// layoutDirection: Qt.RightToLeft
752-
753-// UbuntuShape
754-// {
755-// id: u_pic
756-// width: units.gu(24)
757-// height: units.gu(17)
758-// image: Image {
759-// id: pic
760-// width: units.gu(24)
761-// fillMode: Image.PreserveAspectCrop
762-// source: imageArray[0]
763-// }
764-
765-// Rectangle
766-// {
767-// id: rec_label_bg
768-//// color: "black"
769-// anchors.top: label_title.top
770-// anchors.bottom: label_title.bottom
771-// width: parent.width
772-// opacity: 0.5
773-// }
774-
775-// Label
776-// {
777-// id: label_title
778-// text: rss_item.title
779-// anchors.bottom: parent.bottom
780-// anchors.bottomMargin: units.gu(1)
781-// anchors.horizontalCenter: parent.horizontalCenter
782-// width: parent.width - units.gu(1)
783-// wrapMode: Text.WrapAtWordBoundaryOrAnywhere
784-//// color: "white"
785-// fontSize: "medium"
786-// textFormat: Text.StyledText
787-// }
788-
789-// MouseArea
790-// {
791-// anchors.fill: parent
792-
793-// onClicked:
794-// {
795-// mainView.toRssPage(rss_model, model_index) ;
796-// }
797-// }
798-// }
799-
800-// Label
801-// {
802-// id: label_time
803-// text: DateUtils.formatRelativeTime(i18n, rss_item.pubdate)
804-//// color: "black"
805-// fontSize: "medium"
806-// }
807-
808-// // }
809-//}
810
811=== modified file 'article_items/ArticleOneImgA.qml'
812--- article_items/ArticleOneImgA.qml 2013-08-29 21:22:17 +0000
813+++ article_items/ArticleOneImgA.qml 2013-09-02 04:22:41 +0000
814@@ -5,27 +5,27 @@
815
816 UbuntuShape
817 {
818- width: units.gu(20)
819- height: content.height + units.gu(1.5)
820+ width: units.gu(18)
821+ height: units.gu(33) /*content.height + units.gu(1.5)*/
822 radius: "medium"
823- color: "#3D3028"
824+ color: "#5C3B42"
825
826 property variant rss_item
827 property variant imageArray: []
828 property variant rss_model
829 property int model_index
830
831- Column
832- {
833- id: content
834- anchors{ left: parent.left; right: parent.right }
835- spacing: units.gu(1)
836+// Column
837+// {
838+// id: content
839+// anchors{ left: parent.left; right: parent.right }
840+// spacing: units.gu(1)
841
842 UbuntuShape
843 {
844 id: u_pic
845 width: parent.width
846- height: pic.height > units.gu(12) ? pic.height : units.gu(12)
847+ height: pic.height /*> units.gu(12) ? pic.height : units.gu(12)*/
848 radius: "medium"
849 image: Image {
850 id: pic
851@@ -37,41 +37,49 @@
852
853 Column
854 {
855- anchors{ left: parent.left; right: parent.right; margins: units.gu(2) }
856+ anchors {
857+ left: parent.left; right: parent.right;
858+ top: u_pic.bottom; bottom: parent.bottom
859+ topMargin: units.gu(2); bottomMargin: units.gu(1.5);
860+ leftMargin: units.gu(1); rightMargin: units.gu(1.5)
861+ }
862 spacing: units.gu(1)
863
864 Label
865 {
866 id: label_time
867 text: DateUtils.formatRelativeTime(i18n, rss_item.pubdate)
868- fontSize: "small"
869- // horizontalAlignment: Text.AlignRight
870+ fontSize: "x-small"
871 width: parent.width
872+ wrapMode: Text.WrapAtWordBoundaryOrAnywhere
873+ opacity: 0.6
874 }
875
876 Label
877 {
878 id: label_title
879 text: rss_item.title
880- // anchors.horizontalCenter: parent.horizontalCenter
881 width: parent.width
882+ height: parent.height - parent.spacing * 2 - label_time.paintedHeight - label_feedname.paintedHeight
883 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
884- fontSize: "medium"
885+ fontSize: "small"
886 textFormat: Text.PlainText
887- // horizontalAlignment: Text.AlignRight
888 font.weight: Font.DemiBold
889+ elide: Text.ElideRight
890+ opacity: 0.8
891 }
892
893 Label
894 {
895 id: label_feedname
896 text: rss_item.feed_name
897- fontSize: "small"
898+ fontSize: "x-small"
899 width: parent.width
900 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
901+ opacity: 0.6
902 }
903 }
904- }
905+// }
906
907 MouseArea
908 {
909@@ -83,71 +91,3 @@
910 }
911 }
912 }
913-
914-//Column {
915-// id: delegate_item
916-// width: units.gu(34)
917-//// height: units.gu(16)
918-//// anchors.fill: parent
919-// property variant rss_item
920-// property variant imageArray: []
921-// property variant rss_model
922-// property int model_index
923-
924-// Row
925-// {
926-// id: row
927-// spacing: units.gu(1)
928-//// anchors.fill: parent
929-
930-// Label
931-// {
932-// id: label_title
933-// text: rss_item.title
934-//// anchors.horizontalCenter: parent.horizontalCenter
935-// width: units.gu(14)
936-// wrapMode: Text.WrapAtWordBoundaryOrAnywhere
937-//// color: "black"
938-// fontSize: "medium"
939-// textFormat: Text.PlainText
940-// horizontalAlignment: Text.AlignRight
941-
942-
943-// }
944-
945-// UbuntuShape
946-// {
947-// id: u_pic
948-// width: units.gu(18)
949-// height: pic.height
950-// image: Image {
951-// id: pic
952-// width: units.gu(18)
953-// fillMode: Image.PreserveAspectFit
954-// source: imageArray[0]
955-//// {
956-//// if (imageArray == 0)
957-//// {
958-//// label_title.width = units.gu(30)
959-//// label_title.fontSize = "large"
960-//// return ""
961-//// }
962-//// else if (imageArray.length > 0)
963-//// return imageArray[0]
964-//// }
965-// }
966-// }
967-
968-
969-// }
970-
971-// Label
972-// {
973-// id: label_time
974-// text: DateUtils.formatRelativeTime(i18n, rss_item.pubdate)
975-//// color: "black"
976-// fontSize: "medium"
977-// horizontalAlignment: Text.AlignRight
978-// width: parent.width
979-// }
980-//}
981
982=== removed file 'article_items/ArticleOneImgB.qml'
983--- article_items/ArticleOneImgB.qml 2013-08-29 21:22:17 +0000
984+++ article_items/ArticleOneImgB.qml 1970-01-01 00:00:00 +0000
985@@ -1,180 +0,0 @@
986-import QtQuick 2.0
987-import Ubuntu.Components 0.1
988-import Ubuntu.Components.ListItems 0.1 as ListItem
989-import "../dateutils.js" as DateUtils
990-
991-UbuntuShape
992-{
993- width: units.gu(20)
994- height: content.height + units.gu(1.5)
995- radius: "medium"
996- color: "#3D3028"
997-
998- property variant rss_item
999- property variant imageArray: []
1000- property variant rss_model
1001- property int model_index
1002-
1003- Column
1004- {
1005- id: content
1006- anchors{ left: parent.left; right: parent.right; bottom: parent.bottom }
1007- spacing: units.gu(1)
1008-
1009- Column
1010- {
1011- anchors{ left: parent.left; right: parent.right; margins: units.gu(2) }
1012- spacing: units.gu(1)
1013-
1014- Label
1015- {
1016- id: label_time
1017- text: DateUtils.formatRelativeTime(i18n, rss_item.pubdate)
1018- fontSize: "small"
1019- // horizontalAlignment: Text.AlignRight
1020- width: parent.width
1021- }
1022-
1023- Label
1024- {
1025- id: label_title
1026- text: rss_item.title
1027- // anchors.horizontalCenter: parent.horizontalCenter
1028- width: parent.width
1029- wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1030- fontSize: "medium"
1031- textFormat: Text.PlainText
1032- // horizontalAlignment: Text.AlignRight
1033- font.weight: Font.DemiBold
1034- }
1035-
1036- Label
1037- {
1038- id: label_feedname
1039- text: rss_item.feed_name
1040- fontSize: "small"
1041- width: parent.width
1042- wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1043- }
1044- }
1045-
1046- UbuntuShape
1047- {
1048- id: u_pic
1049- width: parent.width
1050- height: pic.height > units.gu(12) ? pic.height : units.gu(12)
1051- radius: "medium"
1052- image: Image {
1053- id: pic
1054- width: u_pic.width
1055- fillMode: Image.PreserveAspectFit
1056- source: imageArray[0]
1057- }
1058- }
1059- }
1060-
1061- MouseArea
1062- {
1063- anchors.fill: parent
1064-
1065- onClicked:
1066- {
1067- mainView.toRssPage(rss_model, model_index) ;
1068- }
1069- }
1070-}
1071-
1072-//Column {
1073-// id: delegate_item
1074-// width: units.gu(34)
1075-//// height: units.gu(16)
1076-//// anchors.fill: parent
1077-// property variant rss_item
1078-// property variant imageArray: []
1079-// property variant rss_model
1080-// property int model_index
1081-
1082-// Row
1083-// {
1084-// id: row
1085-// spacing: units.gu(1)
1086-//// anchors.fill: parent
1087-//// layoutDirection: Qt.RightToLeft
1088-
1089-
1090-
1091-// UbuntuShape
1092-// {
1093-// id: u_pic
1094-// width: units.gu(18)
1095-// height: pic.height
1096-// image: Image {
1097-// id: pic
1098-// width: units.gu(18)
1099-// fillMode: Image.PreserveAspectFit
1100-// source: imageArray[0]
1101-//// {
1102-//// if (imageArray == 0)
1103-//// {
1104-//// label_title.width = units.gu(30)
1105-//// label_title.fontSize = "large"
1106-//// return ""
1107-//// }
1108-//// else if (imageArray.length > 0)
1109-//// return imageArray[0]
1110-//// }
1111-// }
1112-
1113-// MouseArea
1114-// {
1115-// x:0; y:0
1116-// width: delegate_item.width
1117-// height: delegate_item.height
1118-
1119-// onClicked:
1120-// {
1121-// mainView.toRssPage(rss_model, model_index) ;
1122-// }
1123-// }
1124-// }
1125-
1126-// Label
1127-// {
1128-// id: label_title
1129-// text: rss_item.title
1130-//// anchors.horizontalCenter: parent.horizontalCenter
1131-// width: units.gu(14)
1132-// wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1133-//// color: "black"
1134-// fontSize: "medium"
1135-// textFormat: Text.StyledText
1136-// }
1137-
1138-//// Image {
1139-//// id: pic
1140-//// width: units.gu(18)
1141-//// fillMode: Image.PreserveAspectFit
1142-//// source: imageArray[0]
1143-//// {
1144-//// if (imageArray == undefined)
1145-//// {
1146-//// return ""
1147-//// }
1148-//// else if (imageArray.length > 0)
1149-//// return imageArray[0]
1150-////// else
1151-////// return ""
1152-//// }
1153-//// anchors.centerIn: parent
1154-//// anchors.verticalCenter: parent.verticalCenter
1155-//// }
1156-// }
1157-
1158-// Label
1159-// {
1160-// id: label_time
1161-// text: DateUtils.formatRelativeTime(i18n, rss_item.pubdate)
1162-//// color: "black"
1163-// fontSize: "medium"
1164-// }
1165-//}
1166
1167=== modified file 'article_items/ArticleTextA.qml'
1168--- article_items/ArticleTextA.qml 2013-08-29 21:22:17 +0000
1169+++ article_items/ArticleTextA.qml 2013-09-02 04:22:41 +0000
1170@@ -5,8 +5,8 @@
1171
1172 UbuntuShape
1173 {
1174- width: units.gu(16)
1175- height: content.height + units.gu(4)
1176+ width: units.gu(11)
1177+ height: units.gu(20) /*content.height + units.gu(4)*/
1178 color: "#32222C"
1179 radius: "medium"
1180
1181@@ -18,16 +18,21 @@
1182 Column
1183 {
1184 id: content
1185- anchors{ left: parent.left; right: parent.right; margins: units.gu(2); verticalCenter: parent.verticalCenter }
1186+// anchors{ left: parent.left; right: parent.right; margins: units.gu(2); verticalCenter: parent.verticalCenter }
1187+ anchors {
1188+ fill: parent; topMargin: units.gu(2); bottomMargin: units.gu(1.5);
1189+ leftMargin: units.gu(1); rightMargin: units.gu(1.5)
1190+ }
1191 spacing: units.gu(1)
1192
1193 Label
1194 {
1195 id: label_time
1196 text: DateUtils.formatRelativeTime(i18n, rss_item.pubdate)
1197- fontSize: "small"
1198+ fontSize: "x-small"
1199 width: parent.width
1200 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1201+ opacity: 0.6
1202 }
1203
1204 Label
1205@@ -35,19 +40,23 @@
1206 id: label_title
1207 text: rss_item.title
1208 width: parent.width
1209+ height: parent.height - parent.spacing * 2 - label_time.paintedHeight - label_feedname.paintedHeight
1210 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1211- fontSize: "medium"
1212+ fontSize: "small"
1213 textFormat: Text.PlainText
1214 font.weight: Font.DemiBold
1215+ elide: Text.ElideRight
1216+ opacity: 0.8
1217 }
1218
1219 Label
1220 {
1221 id: label_feedname
1222 text: rss_item.feed_name
1223- fontSize: "small"
1224+ fontSize: "x-small"
1225 width: parent.width
1226 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1227+ opacity: 0.6
1228 }
1229 }
1230
1231@@ -62,56 +71,3 @@
1232 }
1233 }
1234
1235-//Column {
1236-// width: units.gu(30)
1237-//// height: units.gu(15)
1238-//// anchors.fill: parent
1239-// property variant rss_item
1240-// property variant imageArray: []
1241-// property variant rss_model
1242-// property int model_index
1243-
1244-//// Row
1245-//// {
1246-// spacing: units.gu(1)
1247-//// anchors.fill: parent
1248-
1249-// Label
1250-// {
1251-// id: label_title
1252-// text: rss_item.title
1253-//// anchors.horizontalCenter: parent.horizontalCenter
1254-// width: units.gu(30)
1255-// wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1256-//// color: "black"
1257-// fontSize: "large"
1258-// textFormat: Text.PlainText
1259-
1260-// MouseArea
1261-// {
1262-// anchors.fill: parent
1263-
1264-// onClicked:
1265-// {
1266-// mainView.toRssPage(rss_model, model_index) ;
1267-// }
1268-// }
1269-// }
1270-//// }
1271-
1272-// Label
1273-// {
1274-// id: label_time
1275-// text: DateUtils.formatRelativeTime(i18n, rss_item.pubdate)
1276-//// color: "black"
1277-// fontSize: "medium"
1278-// width: parent.width
1279-// wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1280-// }
1281-
1282-// Item
1283-// {
1284-// width: parent.width
1285-// height: units.gu(2)
1286-// }
1287-//}
1288
1289=== modified file 'article_items/ArticleTextB.qml'
1290--- article_items/ArticleTextB.qml 2013-08-29 21:22:17 +0000
1291+++ article_items/ArticleTextB.qml 2013-09-02 04:22:41 +0000
1292@@ -6,7 +6,7 @@
1293 UbuntuShape
1294 {
1295 width: units.gu(18)
1296- height: content.height + units.gu(4)
1297+ height: units.gu(15) /*content.height + units.gu(4)*/
1298 color: "#32222C"
1299 radius: "medium"
1300
1301@@ -18,17 +18,21 @@
1302 Column
1303 {
1304 id: content
1305- anchors{ left: parent.left; right: parent.right; margins: units.gu(2); verticalCenter: parent.verticalCenter }
1306+// anchors{ left: parent.left; right: parent.right; margins: units.gu(2); verticalCenter: parent.verticalCenter }
1307+ anchors {
1308+ fill: parent; topMargin: units.gu(2); bottomMargin: units.gu(1.5);
1309+ leftMargin: units.gu(1); rightMargin: units.gu(1.5)
1310+ }
1311 spacing: units.gu(1)
1312
1313 Label
1314 {
1315 id: label_time
1316 text: DateUtils.formatRelativeTime(i18n, rss_item.pubdate)
1317- fontSize: "small"
1318+ fontSize: "x-small"
1319 width: parent.width
1320 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1321- horizontalAlignment: Text.AlignRight
1322+ opacity: 0.6
1323 }
1324
1325 Label
1326@@ -36,21 +40,23 @@
1327 id: label_title
1328 text: rss_item.title
1329 width: parent.width
1330+ height: parent.height - parent.spacing * 2 - label_time.paintedHeight - label_feedname.paintedHeight
1331 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1332- fontSize: "medium"
1333+ fontSize: "small"
1334 textFormat: Text.PlainText
1335 font.weight: Font.DemiBold
1336- horizontalAlignment: Text.AlignRight
1337+ elide: Text.ElideRight
1338+ opacity: 0.8
1339 }
1340
1341 Label
1342 {
1343 id: label_feedname
1344 text: rss_item.feed_name
1345- fontSize: "small"
1346+ fontSize: "x-small"
1347 width: parent.width
1348 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1349- horizontalAlignment: Text.AlignRight
1350+ opacity: 0.6
1351 }
1352 }
1353
1354@@ -64,58 +70,3 @@
1355 }
1356 }
1357 }
1358-//Column {
1359-// width: units.gu(30)
1360-//// height: units.gu(15)
1361-//// anchors.fill: parent
1362-// property variant rss_item
1363-// property variant imageArray: []
1364-// property variant rss_model
1365-// property int model_index
1366-
1367-//// Row
1368-//// {
1369-// spacing: units.gu(1)
1370-//// anchors.fill: parent
1371-
1372-// Label
1373-// {
1374-// id: label_title
1375-// text: rss_item.title
1376-//// anchors.horizontalCenter: parent.horizontalCenter
1377-// width: units.gu(30)
1378-// wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1379-//// color: "black"
1380-// fontSize: "large"
1381-// textFormat: Text.PlainText
1382-// horizontalAlignment: Text.AlignRight
1383-
1384-// MouseArea
1385-// {
1386-// anchors.fill: parent
1387-
1388-// onClicked:
1389-// {
1390-// mainView.toRssPage(rss_model, model_index) ;
1391-// }
1392-// }
1393-// }
1394-//// }
1395-
1396-// Label
1397-// {
1398-// id: label_time
1399-// text: DateUtils.formatRelativeTime(i18n, rss_item.pubdate)
1400-//// color: "black"
1401-// fontSize: "medium"
1402-// horizontalAlignment: Text.AlignRight
1403-// width: parent.width
1404-// wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1405-// }
1406-
1407-// Item
1408-// {
1409-// width: parent.width
1410-// height: units.gu(2)
1411-// }
1412-//}
1413
1414=== removed file 'article_items/ArticleTwoImgA.qml'
1415--- article_items/ArticleTwoImgA.qml 2013-08-29 21:22:17 +0000
1416+++ article_items/ArticleTwoImgA.qml 1970-01-01 00:00:00 +0000
1417@@ -1,256 +0,0 @@
1418-import QtQuick 2.0
1419-import Ubuntu.Components 0.1
1420-import Ubuntu.Components.ListItems 0.1 as ListItem
1421-import "../dateutils.js" as DateUtils
1422-
1423-UbuntuShape
1424-{
1425- width: units.gu(24)
1426- height: content.height + units.gu(1.5)
1427- radius: "medium"
1428- color: "#3D3028"
1429-
1430- property variant rss_item
1431- property variant imageArray: []
1432- property variant rss_model
1433- property int model_index
1434-
1435- Column
1436- {
1437- id: content
1438- anchors{ left: parent.left; right: parent.right }
1439- spacing: units.gu(1)
1440-
1441- Row
1442- {
1443-// anchors{ left: parent.left; right: parent.right }
1444- height: u_pic.height > u_pic1.height ? u_pic.height : u_pic1.height
1445-
1446- UbuntuShape
1447- {
1448- id: u_pic
1449- width: content.width / 2
1450- height: pic.height > units.gu(8) ? pic.height : units.gu(8)
1451- radius: "medium"
1452- image: Image {
1453- id: pic
1454- width: u_pic.width
1455- fillMode: Image.PreserveAspectFit
1456- source: imageArray[0]
1457- }
1458- }
1459-
1460- UbuntuShape
1461- {
1462- id: u_pic1
1463- width: content.width / 2
1464- height: pic1.height > units.gu(8) ? pic1.height : units.gu(8)
1465- radius: "medium"
1466- image: Image {
1467- id: pic1
1468- width: u_pic1.width
1469- fillMode: Image.PreserveAspectFit
1470- source: imageArray[1]
1471- }
1472- }
1473- }
1474-
1475- Column
1476- {
1477- anchors{ left: parent.left; right: parent.right; margins: units.gu(2) }
1478- spacing: units.gu(1)
1479-
1480- Label
1481- {
1482- id: label_time
1483- text: DateUtils.formatRelativeTime(i18n, rss_item.pubdate)
1484- fontSize: "small"
1485- // horizontalAlignment: Text.AlignRight
1486- width: parent.width
1487- }
1488-
1489- Label
1490- {
1491- id: label_title
1492- text: rss_item.title
1493- // anchors.horizontalCenter: parent.horizontalCenter
1494- width: parent.width
1495- wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1496- fontSize: "medium"
1497- textFormat: Text.PlainText
1498- // horizontalAlignment: Text.AlignRight
1499- font.weight: Font.DemiBold
1500- }
1501-
1502- Label
1503- {
1504- id: label_feedname
1505- text: rss_item.feed_name
1506- fontSize: "small"
1507- width: parent.width
1508- wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1509- }
1510- }
1511- }
1512-
1513- MouseArea
1514- {
1515- anchors.fill: parent
1516-
1517- onClicked:
1518- {
1519- mainView.toRssPage(rss_model, model_index) ;
1520- }
1521- }
1522-}
1523-
1524-//Column {
1525-// id: delegate_item
1526-// width: units.gu(34)
1527-//// height: units.gu(16)
1528-//// anchors.fill: parent
1529-// property variant rss_item
1530-// property variant imageArray: []
1531-// property variant rss_model
1532-// property int model_index
1533-
1534-// Row
1535-// {
1536-// id: row
1537-// spacing: units.gu(1)
1538-//// anchors.fill: parent
1539-
1540-// Label
1541-// {
1542-// id: label_title
1543-// text: rss_item.title
1544-//// anchors.horizontalCenter: parent.horizontalCenter
1545-// width: units.gu(14)
1546-// wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1547-//// color: "black"
1548-// fontSize: "medium"
1549-// textFormat: Text.PlainText
1550-// horizontalAlignment: Text.AlignRight
1551-
1552-
1553-// }
1554-
1555-// UbuntuShape
1556-// {
1557-// id: u_pic
1558-// width: units.gu(18)
1559-// height: pic.height
1560-// image: Image {
1561-// id: pic
1562-// width: units.gu(18)
1563-// fillMode: Image.PreserveAspectFit
1564-// source: imageArray[0]
1565-//// {
1566-//// if (imageArray == 0)
1567-//// {
1568-//// label_title.width = units.gu(30)
1569-//// label_title.fontSize = "large"
1570-//// return ""
1571-//// }
1572-//// else if (imageArray.length > 0)
1573-//// return imageArray[0]
1574-//// }
1575-// }
1576-// }
1577-
1578-
1579-// }
1580-
1581-// Label
1582-// {
1583-// id: label_time
1584-// text: DateUtils.formatRelativeTime(i18n, rss_item.pubdate)
1585-//// color: "black"
1586-// fontSize: "medium"
1587-// horizontalAlignment: Text.AlignRight
1588-// width: parent.width
1589-// }
1590-//}
1591-
1592-
1593-//Column {
1594-// id: delegate_item
1595-// width: units.gu(34)
1596-//// height: units.gu(30)
1597-//// anchors.fill: parent
1598-// property variant rss_item
1599-// property variant imageArray: []
1600-// property variant rss_model
1601-// property int model_index
1602-
1603-// Row
1604-// {
1605-// id: row
1606-// spacing: units.gu(1)
1607-//// anchors.fill: parent
1608-
1609-// Label
1610-// {
1611-// id: label_title
1612-// text: rss_item.title
1613-//// anchors.horizontalCenter: parent.horizontalCenter
1614-// width: units.gu(14)
1615-// wrapMode: Text.WrapAtWordBoundaryOrAnywhere
1616-//// color: "black"
1617-// fontSize: "medium"
1618-// textFormat: Text.PlainText
1619-
1620-// MouseArea
1621-// {
1622-// x:0; y:0
1623-// width: delegate_item.width
1624-// height: delegate_item.height
1625-
1626-// onClicked:
1627-// {
1628-// mainView.toRssPage(rss_model, model_index) ;
1629-// }
1630-// }
1631-// }
1632-
1633-// Column
1634-// {
1635-// spacing: units.gu(1)
1636-
1637-// UbuntuShape
1638-// {
1639-// id: u_pic0
1640-// width: units.gu(15)
1641-// height: pic0.height
1642-// image: Image {
1643-// id: pic0
1644-// width: units.gu(15)
1645-// fillMode: Image.PreserveAspectFit
1646-// source: imageArray[0]
1647-// }
1648-// }
1649-
1650-// UbuntuShape
1651-// {
1652-// id: u_pic1
1653-// width: units.gu(15)
1654-// height: pic1.height
1655-// image: Image {
1656-// id: pic1
1657-// width: units.gu(15)
1658-// fillMode: Image.PreserveAspectFit
1659-// source: imageArray[1]
1660-// }
1661-// }
1662-// }
1663-
1664-// }
1665-
1666-// Label
1667-// {
1668-// id: label_time
1669-// text: DateUtils.formatRelativeTime(i18n, rss_item.pubdate)
1670-//// color: "black"
1671-// fontSize: "medium"
1672-// }
1673-//}

Subscribers

People subscribed via source and target branches