2020-06-17 19:31:01 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
2020-05-28 14:32:58 +00:00
|
|
|
import "../imports"
|
|
|
|
|
|
|
|
TabButton {
|
|
|
|
property string btnText: "Default Button"
|
2020-11-27 15:13:35 +00:00
|
|
|
|
2020-05-28 14:32:58 +00:00
|
|
|
id: tabButton
|
|
|
|
width: tabBtnText.width
|
|
|
|
height: tabBtnText.height + 11
|
|
|
|
text: ""
|
|
|
|
padding: 0
|
|
|
|
background: Rectangle {
|
2020-07-02 15:14:31 +00:00
|
|
|
color: Style.current.transparent
|
2020-10-15 18:44:22 +00:00
|
|
|
border.width: 0
|
2020-05-28 14:32:58 +00:00
|
|
|
}
|
|
|
|
|
2020-06-19 18:06:58 +00:00
|
|
|
StyledText {
|
2020-05-28 14:32:58 +00:00
|
|
|
id: tabBtnText
|
|
|
|
text: btnText
|
|
|
|
font.weight: Font.Medium
|
|
|
|
font.pixelSize: 15
|
2021-02-25 14:35:25 +00:00
|
|
|
color: parent.checked || parent.hovered ? Style.current.textColor : Style.current.secondaryText
|
2020-05-28 14:32:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Rectangle {
|
2021-01-12 11:40:48 +00:00
|
|
|
visible: parent.checked || parent.hovered
|
2021-03-16 19:19:48 +00:00
|
|
|
color: parent.checked ? Style.current.primary : Style.current.secondaryBackground
|
2020-05-28 14:32:58 +00:00
|
|
|
anchors.bottom: parent.bottom
|
2021-01-12 11:40:48 +00:00
|
|
|
width: 40
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2020-05-28 14:32:58 +00:00
|
|
|
height: 3
|
|
|
|
radius: 4
|
|
|
|
}
|
2021-01-12 11:40:48 +00:00
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
anchors.fill: parent
|
|
|
|
onPressed: mouse.accepted = false
|
|
|
|
}
|
2020-05-28 14:32:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*##^##
|
|
|
|
Designer {
|
|
|
|
D{i:0;formeditorColor:"#ffffff";formeditorZoom:1.75}
|
|
|
|
}
|
|
|
|
##^##*/
|