From 643e6a003fb7b990efbaecef6936cb6ebebd4771 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Tue, 28 Feb 2023 15:16:13 +0800 Subject: Home default popular tab item --- TabItem.ui.qml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 TabItem.ui.qml (limited to 'TabItem.ui.qml') diff --git a/TabItem.ui.qml b/TabItem.ui.qml new file mode 100644 index 0000000..a704822 --- /dev/null +++ b/TabItem.ui.qml @@ -0,0 +1,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: label + color: index == currentIndex ? "white" : "#066ac9" + font { + family: doesntEmbed ? "Roboto" : regular.name + pointSize: 15 + } + } + background: Rectangle { + color: index == currentIndex ? "#066ac9" : "transparent" + radius: 5.2 + } +} -- cgit v1.2.3