Refactor HButton

This commit is contained in:
miruka
2019-08-20 17:41:24 -04:00
parent 7e7852b51e
commit ce128d5ab5
14 changed files with 101 additions and 187 deletions

View File

@@ -102,10 +102,10 @@ HInteractiveRectangle {
Layout.fillHeight: true
}
HUIButton {
HButton {
id: expandButton
iconName: "expand"
iconDimension: 16
ico.dimension: 16
backgroundColor: "transparent"
leftPadding: sidePane.currentSpacing
rightPadding: leftPadding
@@ -118,9 +118,9 @@ HInteractiveRectangle {
1
Behavior on opacity { HNumberAnimation {} }
iconTransform: Rotation {
origin.x: expandButton.iconDimension / 2
origin.y: expandButton.iconDimension / 2
ico.transform: Rotation {
origin.x: expandButton.ico.dimension / 2
origin.y: expandButton.ico.dimension / 2
angle: collapsed ? 180 : 90
Behavior on angle { HNumberAnimation {} }

View File

@@ -11,12 +11,12 @@ HRowLayout {
Layout.fillWidth: true
Layout.preferredHeight: theme.baseElementsHeight
HUIButton {
HButton {
iconName: "add-account"
backgroundColor: theme.sidePane.settingsButton.background
Layout.preferredHeight: parent.height
onClicked: pageLoader.showPage("SignIn")
Layout.preferredHeight: parent.height
}
HTextField {