Replace HToolButton usages with HButton

Also change sidePane toolbar: option button and filter rooms field
This commit is contained in:
miruka
2019-04-28 12:08:54 -04:00
parent 80067b5060
commit 2e8e042808
6 changed files with 18 additions and 93 deletions

View File

@@ -3,11 +3,14 @@ import QtQuick.Controls 2.2
import QtQuick.Layouts 1.4
Button {
property string iconName: ""
property var iconDimension: null
property bool circle: false
property int fontSize: HStyle.fontSize.normal
property color backgroundColor: "lightgray"
property alias overlayOpacity: buttonBackgroundOverlay.opacity
property string iconName: ""
property bool circle: false
property bool loading: false
property int contentWidth: 0
@@ -53,7 +56,7 @@ Button {
HIcon {
svgName: loading ? "hourglass" : iconName
dimension: contentLayout.height
dimension: iconDimension || contentLayout.height
}
HLabel {

View File

@@ -1,31 +0,0 @@
import QtQuick 2.7
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.4
ToolButton {
property string tooltip: ""
property string iconName: ""
id: button
display: ToolButton.IconOnly
icon.source: "../../icons/" + iconName + ".svg"
background: Rectangle { color: "transparent" }
onClicked: toolTip.hide()
ToolTip {
id: toolTip
text: tooltip
delay: Qt.styleHints.mousePressAndHoldInterval
visible: text ? toolTipZone.containsMouse : false
}
MouseArea {
id: toolTipZone
anchors.fill: parent
hoverEnabled: true
acceptedButtons: Qt.NoButton // Make button receive clicks normally
onEntered: button.background.color = "#656565"
onExited: button.background.color = "transparent"
}
}