fix(StatusExpandableItem): Added new padding for Tertitary type expandable item, a flag to set separator to visible true or false (#896)
This commit is contained in:
parent
21f1c4ce52
commit
c3bbb396ec
|
@ -13,6 +13,7 @@ Rectangle {
|
||||||
property alias button: button
|
property alias button: button
|
||||||
property alias expandableComponent: expandableRegion.sourceComponent
|
property alias expandableComponent: expandableRegion.sourceComponent
|
||||||
property alias expandableItem: expandableRegion.item
|
property alias expandableItem: expandableRegion.item
|
||||||
|
property bool separatorVisible: true
|
||||||
|
|
||||||
property int type: StatusExpandableItem.Type.Primary
|
property int type: StatusExpandableItem.Type.Primary
|
||||||
property bool expandable: true
|
property bool expandable: true
|
||||||
|
@ -49,7 +50,7 @@ Rectangle {
|
||||||
height: 1
|
height: 1
|
||||||
|
|
||||||
color: Theme.palette.baseColor2
|
color: Theme.palette.baseColor2
|
||||||
visible: (statusExpandableItem.type === StatusExpandableItem.Type.Tertiary)
|
visible: (statusExpandableItem.type === StatusExpandableItem.Type.Tertiary) && separatorVisible
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,7 +58,7 @@ Rectangle {
|
||||||
id: header
|
id: header
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 64
|
height: statusExpandableItem.type === StatusExpandableItem.Type.Tertiary ? 40 : 64
|
||||||
radius: (statusExpandableItem.type === StatusExpandableItem.Type.Secondary) ? 8 : 0
|
radius: (statusExpandableItem.type === StatusExpandableItem.Type.Secondary) ? 8 : 0
|
||||||
color: statusExpandableItem.type === StatusExpandableItem.Type.Secondary && sensor.containsMouse ? Theme.palette.baseColor2 : "transparent"
|
color: statusExpandableItem.type === StatusExpandableItem.Type.Secondary && sensor.containsMouse ? Theme.palette.baseColor2 : "transparent"
|
||||||
|
|
||||||
|
@ -78,7 +79,7 @@ Rectangle {
|
||||||
(statusExpandableItem.type === StatusExpandableItem.Type.Tertiary) ? parent.top : undefined
|
(statusExpandableItem.type === StatusExpandableItem.Type.Tertiary) ? parent.top : undefined
|
||||||
anchors.topMargin: (statusExpandableItem.type === StatusExpandableItem.Type.Tertiary) ? 29 : 17
|
anchors.topMargin: (statusExpandableItem.type === StatusExpandableItem.Type.Tertiary) ? 29 : 17
|
||||||
anchors.left: identicon.active ? identicon.right : parent.left
|
anchors.left: identicon.active ? identicon.right : parent.left
|
||||||
anchors.leftMargin: (statusExpandableItem.type === StatusExpandableItem.Type.Primary) ? 10 : 16
|
anchors.leftMargin: (statusExpandableItem.type === StatusExpandableItem.Type.Primary) ? 10 : !identicon.active ? 0 : 16
|
||||||
|
|
||||||
anchors.verticalCenter: (statusExpandableItem.type === StatusExpandableItem.Type.Secondary) ? identicon.verticalCenter : undefined
|
anchors.verticalCenter: (statusExpandableItem.type === StatusExpandableItem.Type.Secondary) ? identicon.verticalCenter : undefined
|
||||||
|
|
||||||
|
@ -174,7 +175,7 @@ Rectangle {
|
||||||
Loader {
|
Loader {
|
||||||
id: expandableRegion
|
id: expandableRegion
|
||||||
anchors.top: header.bottom
|
anchors.top: header.bottom
|
||||||
anchors.topMargin: 16
|
anchors.topMargin: (statusExpandableItem.type === StatusExpandableItem.Type.Tertiary) ? 24 : 16
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: (statusExpandableItem.type === StatusExpandableItem.Type.Primary) ? 48 : 0
|
anchors.leftMargin: (statusExpandableItem.type === StatusExpandableItem.Type.Primary) ? 48 : 0
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
@ -195,7 +196,7 @@ Rectangle {
|
||||||
State {
|
State {
|
||||||
name: "EXPANDED"
|
name: "EXPANDED"
|
||||||
PropertyChanges {target: expandImage; icon: "chevron-up"}
|
PropertyChanges {target: expandImage; icon: "chevron-up"}
|
||||||
PropertyChanges {target: statusExpandableItem; height: 82 + expandableRegion.height + 22}
|
PropertyChanges {target: statusExpandableItem; height: 82 + expandableRegion.height}
|
||||||
PropertyChanges {target: expandableRegion; visible: true}
|
PropertyChanges {target: expandableRegion; visible: true}
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
|
|
Loading…
Reference in New Issue