From e42ce8f7825124d084f3825faca2708f99ad9682 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 7 Nov 2012 01:08:58 +0100 Subject: [PATCH] export margins --- .../plasmacomponents/qml/ToolBar.qml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/declarativeimports/plasmacomponents/qml/ToolBar.qml b/declarativeimports/plasmacomponents/qml/ToolBar.qml index 9ecd95efb..bcf299f82 100644 --- a/declarativeimports/plasmacomponents/qml/ToolBar.qml +++ b/declarativeimports/plasmacomponents/qml/ToolBar.qml @@ -45,6 +45,9 @@ Properties: pop follows page stack pop animation replace follows page stack replace animation + Object margins: + margins from the toolbar to the contents. it had 4 properties: left, top, right, bottom + Methods: void setTools( tools, transition ): This sets the tools for the ToolBar and the transition type that @@ -61,6 +64,8 @@ Item{ width: parent.width height: (tools && enabled) ? tools.height + frameSvg.margins.top + frameSvg.margins.bottom : 0 visible: height > 0 + property alias margins: frameSvg.margins + Behavior on height { PropertyAnimation { id: heightAnimation @@ -117,12 +122,11 @@ Item{ } containerA.current = !containerA.current - if(tools) { + if (tools) { tools.parent = newContainer tools.visible = true tools.anchors.left = newContainer.left tools.anchors.right = newContainer.right - tools.anchors.verticalCenter = newContainer.verticalCenter } switch (transition) { @@ -189,10 +193,10 @@ Item{ clip: containerAOpacityAnimation.running || heightAnimation.running anchors { fill: parent - leftMargin: frameSvg.margins.left/2 - topMargin: frameSvg.margins.top/2 - rightMargin: frameSvg.margins.right/2 - bottomMargin: frameSvg.margins.bottom/2 + leftMargin: frameSvg.margins.left + topMargin: frameSvg.margins.top + rightMargin: frameSvg.margins.right + bottomMargin: frameSvg.margins.bottom } Item {