Files
pyqcrm/TeroStyle/BarButton.qml
Yuri Becker 309f1f58d7 Fix up Menu
2025-03-25 12:28:30 +01:00

53 lines
1.3 KiB
QML

import QtQuick
import QtQuick.Controls.impl
import QtQuick.Controls
import QtQuick.Templates as T
T.ToolButton {
id: control
checkable: true
icon.color: Colors.foreground
icon.height: 36
icon.width: 36
implicitHeight: 90
implicitWidth: 100
topPadding: 20
contentItem: Column {
readonly property color color: control.checked ? Colors.primaryShade : control.hovered ? Colors.primary : Colors.foreground
IconLabel {
icon.color: parent.color
icon.source: control.icon.source
icon.height: control.icon.height
icon.width: control.icon.width
color: parent.color
x: parent.width * .5 - width * .5
}
Label {
font: Typography.small
color: parent.color
text: control.text
x: parent.width * .5 - width * .5
}
}
Rectangle {
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.top: parent.top
color: control.checked ? Colors.primaryShade : Colors.primary
implicitWidth: 6
visible: control.checked || control.hovered
}
MouseArea {
id: mouseArea
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onPressed: mouse => mouse.accepted = false
}
}