3
import Ubuntu.Components 0.1
4
import Ubuntu.Components.ListItems 0.1 as ListItem
5
import Ubuntu.Components.Popups 0.1
7
import "./addDelegate.js" as AddD
8
import "./imgSeparator.js" as ImgS
12
// width: units.gu(50)
13
// height: units.gu(75)
15
// height: parent.height
18
property bool isFull: false
19
property real childrenSumHeight: 0
20
property real childrenMaxWidth: 0
21
property int modelIndex
23
function addItem(rss_title, rss_description, model, index)
25
// console.log("delegate height: ", rss_item_delegate.height) ;
26
var newD = AddD.addDelegate(rss_title, ImgS.separate(rss_description), model, index);
28
rss_item_delegate.width = childrenMaxWidth ;
29
console.log("childrenSumHeight, column.height: ", childrenSumHeight, rss_item_delegate.height)
30
console.log("children list: ", rss_item_delegate.children.length)
31
if (childrenSumHeight > rss_item_delegate.height)
35
// rss_item_delegate.children[rss_item_delegate.children.length-1].destroy() ;
45
function getChildrenRect()
47
childrenSumHeight = 0 ;
48
childrenMaxWidth = 0 ;
49
for (var i=0; i<rss_item_delegate.children.length; i++)
51
childrenSumHeight += rss_item_delegate.children[i].height ;
52
if (rss_item_delegate.children[i].width > childrenMaxWidth)
54
childrenMaxWidth = rss_item_delegate.children[i].width