2023-05-22 13:01:46 +00:00
|
|
|
import QtCore
|
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Controls
|
|
|
|
import QtQuick.Controls.Basic
|
2024-01-29 16:12:12 +00:00
|
|
|
import mysettings
|
2023-05-22 13:01:46 +00:00
|
|
|
|
|
|
|
Button {
|
|
|
|
id: myButton
|
|
|
|
padding: 10
|
2024-01-22 19:41:47 +00:00
|
|
|
rightPadding: 18
|
|
|
|
leftPadding: 18
|
|
|
|
property color textColor: theme.oppositeTextColor
|
|
|
|
property color mutedTextColor: theme.oppositeMutedTextColor
|
|
|
|
property color backgroundColor: theme.buttonBackground
|
|
|
|
property color backgroundColorHovered: theme.buttonBackgroundHovered
|
2024-01-29 16:12:12 +00:00
|
|
|
property real borderWidth: MySettings.chatTheme === "LegacyDark" ? 1 : 0
|
|
|
|
property color borderColor: theme.buttonBorder
|
2024-01-22 19:41:47 +00:00
|
|
|
property real fontPixelSize: theme.fontSizeLarge
|
2023-05-22 13:01:46 +00:00
|
|
|
contentItem: Text {
|
|
|
|
text: myButton.text
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
2024-01-22 19:41:47 +00:00
|
|
|
color: myButton.enabled ? textColor : mutedTextColor
|
|
|
|
font.pixelSize: fontPixelSize
|
2023-05-22 13:01:46 +00:00
|
|
|
Accessible.role: Accessible.Button
|
|
|
|
Accessible.name: text
|
|
|
|
}
|
|
|
|
background: Rectangle {
|
|
|
|
radius: 10
|
2024-01-29 16:12:12 +00:00
|
|
|
border.width: myButton.borderWidth
|
|
|
|
border.color: myButton.borderColor
|
2024-01-22 19:41:47 +00:00
|
|
|
color: myButton.hovered ? backgroundColorHovered : backgroundColor
|
2023-05-22 13:01:46 +00:00
|
|
|
}
|
2023-05-23 15:26:49 +00:00
|
|
|
Accessible.role: Accessible.Button
|
|
|
|
Accessible.name: text
|
2024-01-22 19:41:47 +00:00
|
|
|
ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval
|
2023-08-07 17:54:13 +00:00
|
|
|
}
|