small improvements to testapp
This commit is contained in:
parent
83bc2d2fde
commit
f80ca43592
@ -48,16 +48,18 @@ PlasmaExtras.App {
|
|||||||
width: navigationWidth
|
width: navigationWidth
|
||||||
PlasmaExtras.Title {
|
PlasmaExtras.Title {
|
||||||
width: navigationColumn.width
|
width: navigationColumn.width
|
||||||
|
visible: widthCheck.checked
|
||||||
text: "Navigation Pane."
|
text: "Navigation Pane."
|
||||||
elide: Text.ElideMiddle
|
elide: Text.ElideRight
|
||||||
//anchors { top: parent.top; left: parent.left; topMargin: 48; }
|
//anchors { top: parent.top; left: parent.left; topMargin: 48; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PlasmaComponents.CheckBox {
|
PlasmaComponents.CheckBox {
|
||||||
|
id: widthCheck
|
||||||
text: checked ? "Make big" : " "
|
text: checked ? "Make big" : " "
|
||||||
//width: navigationWidth
|
//width: navigationWidth
|
||||||
checked: navigationWidth > 200
|
checked: navigationWidth > 200
|
||||||
anchors { verticalCenter: parent.verticalCenter; bottom: parent.bottom; }
|
anchors { left: parent.left; leftMargin: space; bottomMargin: space; bottom: parent.bottom; }
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
var w = !checked ? 48 : 340;
|
var w = !checked ? 48 : 340;
|
||||||
//print(" new: " + w);
|
//print(" new: " + w);
|
||||||
@ -77,6 +79,7 @@ PlasmaExtras.App {
|
|||||||
width: contentItem.width
|
width: contentItem.width
|
||||||
id: contentColumn
|
id: contentColumn
|
||||||
anchors.fill: contentItem
|
anchors.fill: contentItem
|
||||||
|
spacing: 8
|
||||||
PlasmaExtras.Title {
|
PlasmaExtras.Title {
|
||||||
text: "Content Section"
|
text: "Content Section"
|
||||||
elide: Text.ElideMiddle
|
elide: Text.ElideMiddle
|
||||||
@ -124,12 +127,13 @@ PlasmaExtras.App {
|
|||||||
onWidthChanged: {
|
onWidthChanged: {
|
||||||
//return;
|
//return;
|
||||||
if (width < 340 + 200) {
|
if (width < 340 + 200) {
|
||||||
print("window changed: small " + width);
|
//print("window changed: small " + width);
|
||||||
navigationWidth = 48;
|
navigationWidth = 48;
|
||||||
} else {
|
} else {
|
||||||
print("window changed: tablet " + width);
|
//print("window changed: tablet " + width);
|
||||||
navigationWidth = 340;
|
navigationWidth = 340;
|
||||||
}
|
}
|
||||||
|
widthCheck.checked = navigationWidth > 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user