Commit cf031ea4 authored by Ronan's avatar Ronan
Browse files

feat(Paned): supports a `defaultClosed` property

parent 46a9e88c
...@@ -26,6 +26,7 @@ Item { ...@@ -26,6 +26,7 @@ Item {
property alias childA: contentA.data property alias childA: contentA.data
property alias childB: contentB.data property alias childB: contentB.data
property bool defaultClosed
property int closingEdge: Qt.LeftEdge property int closingEdge: Qt.LeftEdge
// User limits: string or int values. // User limits: string or int values.
...@@ -209,7 +210,10 @@ Item { ...@@ -209,7 +210,10 @@ Item {
_minimumLeftLimit = _parseLimit(minimumLeftLimit) _minimumLeftLimit = _parseLimit(minimumLeftLimit)
_minimumRightLimit = _parseLimit(minimumRightLimit) _minimumRightLimit = _parseLimit(minimumRightLimit)
_isClosed = defaultClosed
contentA.width = _getLimitValue(_minimumLeftLimit) contentA.width = _getLimitValue(_minimumLeftLimit)
_applyLimits()
} }
Item { Item {
......
...@@ -28,6 +28,7 @@ Window { ...@@ -28,6 +28,7 @@ Window {
childB: Paned { childB: Paned {
anchors.fill: parent anchors.fill: parent
closingEdge: Qt.RightEdge closingEdge: Qt.RightEdge
defaultClosed: true
minimumLeftLimit: '40%' minimumLeftLimit: '40%'
minimumRightLimit: 200 minimumRightLimit: 200
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment