Files
CuboBmsTool/qml/Controls/TabButton.qml
2022-08-29 02:57:42 +03:00

47 lines
1.2 KiB
QML

import QtQuick 2.12
import QtQuick.Controls 2.12
import Utils 1.0
TabButton {
id: control
contentItem: Text {
text: control.text
font.pixelSize: 18
font.weight: Font.Bold
opacity: enabled ? 1.0 : 0.3
color: control.checked ? Palette.selectedTextColor : Palette.textColor
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
maximumLineCount: 2
wrapMode: Text.Wrap
}
background: Item {
implicitWidth: 150
implicitHeight: 58
Rectangle {
property bool selected: control.checked
height: 2
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
color: Palette.alternativeBackgroundColor
visible: selected
// Behavior on selected {
// PropertyAnimation {
// properties: "selected";
// easing.type: Easing.OutElastic;
// easing.amplitude: 0.2;
// easing.period: 0.2
// }
// }
}
}
}