2024-01-22 19:41:47 +00:00
|
|
|
import QtCore
|
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Controls
|
|
|
|
import QtQuick.Controls.Basic
|
|
|
|
import mysettings
|
|
|
|
|
|
|
|
Button {
|
|
|
|
id: myButton
|
|
|
|
padding: 10
|
|
|
|
rightPadding: 18
|
|
|
|
leftPadding: 18
|
|
|
|
font.pixelSize: theme.fontSizeLarge
|
2024-06-24 22:49:23 +00:00
|
|
|
property color textColor: theme.darkButtonText
|
|
|
|
property color mutedTextColor: theme.darkButtonMutedText
|
|
|
|
property color backgroundColor: theme.darkButtonBackground
|
|
|
|
property color backgroundColorHovered: enabled ? theme.darkButtonBackgroundHovered : backgroundColor
|
2024-01-22 19:41:47 +00:00
|
|
|
property real borderWidth: 0
|
|
|
|
property color borderColor: "transparent"
|
2024-06-24 22:49:23 +00:00
|
|
|
|
2024-01-22 19:41:47 +00:00
|
|
|
contentItem: Text {
|
|
|
|
text: myButton.text
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
color: myButton.enabled ? textColor : mutedTextColor
|
|
|
|
font.pixelSize: theme.fontSizeLarge
|
|
|
|
font.bold: true
|
|
|
|
Accessible.role: Accessible.Button
|
|
|
|
Accessible.name: text
|
|
|
|
}
|
|
|
|
background: Rectangle {
|
|
|
|
radius: 10
|
|
|
|
border.width: borderWidth
|
|
|
|
border.color: borderColor
|
|
|
|
color: myButton.hovered ? backgroundColorHovered : backgroundColor
|
|
|
|
}
|
|
|
|
Accessible.role: Accessible.Button
|
|
|
|
Accessible.name: text
|
|
|
|
ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval
|
|
|
|
}
|