mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
added hovering effect of button
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user