spacing improvements

This commit is contained in:
Sebastian Kügler 2012-03-20 02:48:40 +01:00
parent 7bffae49d1
commit cf14c5563f
3 changed files with 7 additions and 16 deletions

View File

@ -54,7 +54,7 @@ Item {
property alias tools: topBar.tools
property alias contentArea: contentBackground
property int space: 12
property int space: 20
property int navigationWidth: 340
property int contentWidth: app.width - navigationWidth - space*2
anchors.fill: parent
@ -69,17 +69,8 @@ Item {
//tools: PlasmaComponents.ToolBarLayout {}
onToolsChanged: {
//print("tools changed:" + typeof(tools) + " " + tools.id);
//var shown;
// FIXME: Horrible hack, improve heuristics here.
if (tools.childrenRect.width > 20) {
//shown = true;
height = 48;
} else {
//shown = false;
height = 0;
}
// FIXME: questionable heuristics
height = (tools.childrenRect.width > 20) ? tools.childrenRect.height + space : 0
}
}
@ -92,9 +83,9 @@ Item {
//width: contentWidth
Item {
id: contentItem
width: contentWidth - 100
//width: contentWidth - 100
height: app.height
anchors { left: parent.left; leftMargin: space; rightMargin: space; top: parent.top; bottom: parent.bottom; right: parent.right; }
anchors { left: parent.left; margins: space; top: parent.top; bottom: parent.bottom; right: parent.right; }
}
}

View File

@ -33,7 +33,7 @@ Column {
Component.onCompleted: app.tools = toolbarlayout
}
//anchors.fill: parent
anchors.margins: space
// anchors.rightMargin: space*2
width: 600
spacing: 12
PlasmaExtras.Title {

View File

@ -34,7 +34,7 @@ PlasmaExtras.App {
ListView {
id: pageSelector
width: 200
width: navigationWidth
anchors {
fill: parent
top: content.top