diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-02-28 15:16:13 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-02-28 15:16:13 +0800 |
commit | 643e6a003fb7b990efbaecef6936cb6ebebd4771 (patch) | |
tree | b00e5be8b291e81b2b6050628030e7f7ef0eed5a /TabItem.ui.qml | |
parent | 4ebd3e18880f6a08d82e7c89e93cddde59ed5cf9 (diff) |
Home default popular tab item
Diffstat (limited to 'TabItem.ui.qml')
-rw-r--r-- | TabItem.ui.qml | 32 |
1 files changed, 32 insertions, 0 deletions
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 + } +} |