summaryrefslogtreecommitdiff
path: root/TabItem.ui.qml
blob: e0bb31c75a9b5a66efd485fd04abdadde61db19a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import QtQuick 2.15
import QtQuick.Controls 2.15

Button {
	property int currentIndex: 0
	property bool doesntEmbed: Qt.platform.os === "android"
				|| Qt.platform.os === "linux"
				|| Qt.platform.os === "osx"
				|| Qt.platform.os === "unix"
				|| Qt.platform.os === "windows"

	FontLoader {
		id: regular
		source: doesntEmbed ? "" : "Roboto/Roboto-Regular.ttf"
	}

	height: 38
	horizontalPadding: 16
	verticalPadding: 8
	contentItem: Text {
		text: modelData
		color: index == currentIndex ? "white" : "#066ac9"
		font {
			family: doesntEmbed ? "Roboto" : regular.name
			pointSize: 15
		}
	}
	background: Rectangle {
		color: index == currentIndex ? "#066ac9" : "transparent"
		radius: 5.2
	}
}