Hide account icons when MainPane gets too small

This commit is contained in:
miruka 2019-12-21 14:25:17 -04:00
parent ab786173d9
commit 74d21224ab

View File

@ -67,11 +67,14 @@ HTileDelegate {
leftPadding: theme.spacing / 2 leftPadding: theme.spacing / 2
rightPadding: leftPadding rightPadding: leftPadding
visible: opacity > 0
opacity: expand.loading ? 0 : 1 opacity: expand.loading ? 0 : 1
visible: opacity > 0 && Layout.maximumWidth > 0
Layout.fillHeight: true Layout.fillHeight: true
Layout.maximumWidth:
accountDelegate.width >= 100 * theme.uiScale ? implicitWidth : 0
Behavior on Layout.maximumWidth { HNumberAnimation {} }
Behavior on opacity { HNumberAnimation {} } Behavior on opacity { HNumberAnimation {} }
} }
@ -87,10 +90,13 @@ HTileDelegate {
leftPadding: theme.spacing / 2 leftPadding: theme.spacing / 2
rightPadding: leftPadding rightPadding: leftPadding
visible: opacity > 0
opacity: ! loading && accountDelegate.forceExpand ? 0 : 1 opacity: ! loading && accountDelegate.forceExpand ? 0 : 1
visible: opacity > 0 && Layout.maximumWidth > 0
Layout.fillHeight: true Layout.fillHeight: true
Layout.maximumWidth:
accountDelegate.width >= 120 * theme.uiScale ? implicitWidth : 0
iconItem.transform: Rotation { iconItem.transform: Rotation {
origin.x: expand.iconItem.width / 2 origin.x: expand.iconItem.width / 2
@ -100,6 +106,7 @@ HTileDelegate {
Behavior on angle { HNumberAnimation {} } Behavior on angle { HNumberAnimation {} }
} }
Behavior on Layout.maximumWidth { HNumberAnimation {} }
Behavior on opacity { HNumberAnimation {} } Behavior on opacity { HNumberAnimation {} }
} }