Add HDrawer.calculatedMinimumSize property
This commit is contained in:
parent
efda3a419e
commit
e76143c172
|
@ -20,7 +20,7 @@ Drawer {
|
|||
property int preferredSize:
|
||||
window.getState(this, "preferredSize", defaultSize)
|
||||
|
||||
property int minimumSize: requireDefaultSize ? defaultSize : resizeAreaSize
|
||||
property int minimumSize: resizeAreaSize
|
||||
property int maximumSize:
|
||||
horizontal ? referenceSizeParent.width : referenceSizeParent.height
|
||||
|
||||
|
@ -40,10 +40,13 @@ Drawer {
|
|||
|
||||
property int resizeAreaSize: theme.spacing / 2
|
||||
|
||||
property int calculatedMinimumSize:
|
||||
requireDefaultSize ? defaultSize : minimumSize
|
||||
|
||||
readonly property int calculatedSize:
|
||||
collapse ?
|
||||
peekSizeWhileCollapsed :
|
||||
Math.max(minimumSize, Math.min(preferredSize, maximumSize))
|
||||
Math.max(calculatedMinimumSize, Math.min(preferredSize, maximumSize))
|
||||
|
||||
//
|
||||
|
||||
|
@ -88,7 +91,7 @@ Drawer {
|
|||
NumberAnimation { duration: 100 }
|
||||
}
|
||||
|
||||
Behavior on minimumSize { HNumberAnimation { factor: 0.75 } }
|
||||
Behavior on calculatedMinimumSize { HNumberAnimation { factor: 0.75 } }
|
||||
|
||||
Item {
|
||||
id: resizeArea
|
||||
|
|
|
@ -19,7 +19,7 @@ HDrawer {
|
|||
|
||||
|
||||
defaultSize: buttonRepeater.count * buttonWidth
|
||||
minimumSize: requireDefaultSize ? defaultSize : buttonWidth
|
||||
minimumSize: buttonWidth
|
||||
|
||||
HColumnLayout {
|
||||
anchors.fill: parent
|
||||
|
|
|
@ -24,7 +24,7 @@ HDrawer {
|
|||
|
||||
saveName: "mainPane"
|
||||
background: Rectangle { color: theme.mainPane.background }
|
||||
minimumSize: requireDefaultSize ? defaultSize : theme.mainPane.minimumSize
|
||||
minimumSize: theme.mainPane.minimumSize
|
||||
requireDefaultSize: bottomBar.filterField.activeFocus
|
||||
|
||||
Behavior on opacity { HNumberAnimation {} }
|
||||
|
|
Loading…
Reference in New Issue
Block a user