added hovering effect of button
This commit is contained in:
parent
366e27a321
commit
6ec773079c
3 changed files with 48 additions and 11 deletions
|
@ -122,7 +122,7 @@ PageType {
|
|||
|
||||
|
||||
ColumnLayout {
|
||||
id: content
|
||||
id: collapsedButtonContent
|
||||
|
||||
parent: buttonContent.contentParent
|
||||
|
||||
|
@ -178,6 +178,12 @@ PageType {
|
|||
PropertyAnimation { duration: 200 }
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
if (buttonContent.collapsed()) {
|
||||
buttonContent.expand()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -424,5 +430,22 @@ PageType {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
onCollapsedEnter: {
|
||||
collapsedButtonChevron.backgroundColor = collapsedButtonChevron.hoveredColor
|
||||
collapsedButtonHeader.opacity = 0.8
|
||||
}
|
||||
|
||||
onCollapsedExited: {
|
||||
collapsedButtonChevron.backgroundColor = collapsedButtonChevron.defaultColor
|
||||
collapsedButtonHeader.opacity = 1
|
||||
}
|
||||
|
||||
onCollapsedPressChanged: {
|
||||
collapsedButtonChevron.backgroundColor = buttonContent.drawerDragArea.pressed ?
|
||||
collapsedButtonChevron.pressedColor : buttonContent.drawerDragArea.entered ?
|
||||
collapsedButtonChevron.hoveredColor : collapsedButtonChevron.defaultColor
|
||||
collapsedButtonHeader.opacity = 0.7
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue