46 lines
992 B
QML
46 lines
992 B
QML
import QtQuick 2.0
|
|
import QtQuick.Controls 2.2
|
|
|
|
ItemDelegate {
|
|
id: control
|
|
text: ""
|
|
font.pixelSize: options_stack.text_pixelSize
|
|
property color textColor: appTheme.style.textColor
|
|
|
|
contentItem: Text {
|
|
visible: false
|
|
}
|
|
|
|
Text {
|
|
|
|
anchors {
|
|
verticalCenter: parent.verticalCenter
|
|
left: parent.left
|
|
leftMargin: control.width * 0.02
|
|
right: parent.right
|
|
rightMargin: control.rightPadding
|
|
}
|
|
|
|
text: control.text
|
|
color: appTheme.style.textColor
|
|
|
|
fontSizeMode: Text.Fit
|
|
|
|
font.pixelSize: control.height * 0.4
|
|
}
|
|
|
|
width: parent.width
|
|
|
|
background: Rectangle {
|
|
opacity: enabled ? 1 : 0.3
|
|
color: control.down ? appTheme.style.delegatePressedColor : appTheme.style.delegateBackgroundColor
|
|
|
|
radius: height * 0.3
|
|
|
|
Behavior on color {
|
|
ColorAnimation {
|
|
duration: 200
|
|
}
|
|
}
|
|
}
|
|
}
|