2017-07-24 19:29:30 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2017-10-29 07:44:06 +00:00
|
|
|
import QtQuick 2.6
|
2017-07-24 19:29:30 +00:00
|
|
|
import QtQuick.Controls 2.2
|
2018-09-27 20:09:26 +00:00
|
|
|
import org.kde.kirigami 2.4 as Kirigami
|
2017-07-24 19:29:30 +00:00
|
|
|
|
|
|
|
Button {
|
|
|
|
id: root
|
|
|
|
background: Rectangle {
|
|
|
|
id: buttonBackground
|
|
|
|
color: root.enabled? (root.pressed ? subsurfaceTheme.darkerPrimaryColor : subsurfaceTheme.primaryColor) : "gray"
|
|
|
|
antialiasing: true
|
|
|
|
radius: Kirigami.Units.smallSpacing * 2
|
|
|
|
height: buttonText.height * 2
|
|
|
|
}
|
|
|
|
contentItem: Text {
|
2017-07-25 19:49:18 +00:00
|
|
|
id: buttonText
|
2017-07-24 19:29:30 +00:00
|
|
|
text: root.text
|
2018-09-25 17:58:12 +00:00
|
|
|
font.pointSize: subsurfaceTheme.regularPointSize
|
2017-07-24 19:29:30 +00:00
|
|
|
anchors.centerIn: buttonBackground
|
|
|
|
color: root.pressed ? subsurfaceTheme.darkerPrimaryTextColor :subsurfaceTheme.primaryTextColor
|
|
|
|
}
|
|
|
|
}
|