forked from ghostfox/qyouradio
28 lines
795 B
QML
Executable File
28 lines
795 B
QML
Executable File
import QtQuick 6.8
|
|
import QtQuick.Controls 6.8
|
|
import QtQuick.Controls.Basic 6.8
|
|
|
|
Button {
|
|
property bool outlined: false
|
|
implicitHeight: 36
|
|
|
|
contentItem: Text {
|
|
text: parent.text
|
|
font.family: Colors.fontFamily
|
|
font.pointSize: Colors.fontSize.button
|
|
opacity: enabled ? 1.0 : 0.3
|
|
color: Colors.text;
|
|
horizontalAlignment: Text.AlignHCenter
|
|
verticalAlignment: Text.AlignVCenter
|
|
elide: Text.ElideRight
|
|
}
|
|
|
|
background: Rectangle {
|
|
color: parent.outlined ? "transparent" : (parent.hovered ? Colors.primaryAlt : Colors.primary)
|
|
border.color: (parent.hovered ? "#555" : "#777")
|
|
border.width: (parent.outlined || parent.focuesd) ? 2 : 0
|
|
opacity: enabled ? 1 : 0.3
|
|
radius: 5
|
|
}
|
|
}
|