correctly update layout when the formfactor changes

This commit is contained in:
Marco Martin 2013-08-05 13:42:11 +02:00
parent ca2f8a7a3a
commit a4d9a394db

View File

@ -42,14 +42,18 @@ Item {
container.visible = true
}
onFormFactorChanged: {
print("bbb"+plasmoid.formFactor)
if (plasmoid.formFactor == PlasmaCore.Types.Vertical) {
for (var container in row.children) {
container.parent = column
print("AAAA"+container)
var item = row.children[0];
item.parent = column
item.width = column.width
}
} else {
for (var container in column.children) {
container.parent = row
var item = column.children[0];
item.parent = row
item.height = row.height
}
}
}