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

@@ -68,7 +68,7 @@ HRectangle {
id: bannerRepeater
model: []
HUIButton {
HButton {
id: button
text: modelData.text
iconName: modelData.iconName

View File

@@ -73,14 +73,15 @@ HRectangle {
model: [
"members", "files", "notifications", "history", "settings"
]
HUIButton {
backgroundColor: theme.chat.selectViewBar.background
HButton {
backgroundColor: "transparent"
iconName: "room-view-" + modelData
iconDimension: 22
ico.dimension: 22
height: parent.height
autoExclusive: true
checked: activeButton == modelData
onClicked: activeButton = activeButton == modelData ?
null : modelData
onClicked: activeButton =
activeButton == modelData ? null : modelData
}
}
@@ -90,16 +91,16 @@ HRectangle {
}
}
HUIButton {
HButton {
id: expandButton
z: 1
width: theme.controls.avatar.size
height: width
width: height
height: parent.height
anchors.right: parent.right
opacity: collapseButtons ? 1 : 0
visible: opacity > 0
backgroundColor: theme.chat.selectViewBar.background
backgroundColor: "transparent"
iconName: "reduced-room-buttons"
Behavior on opacity {