diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-03-02 21:00:57 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-03-02 21:00:57 +0800 |
commit | 85ce9d7905890adb3ff7e504bcae997269bf9fa6 (patch) | |
tree | b106324c98b752623610eab3ffa6d337dea3c854 | |
parent | 85c2ddeb539c10454ecd17bfdd051ea149f15ec1 (diff) |
Tab Item text can be overridden without overriding contentItem
-rw-r--r-- | TabItem.ui.qml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/TabItem.ui.qml b/TabItem.ui.qml index a704822..bf895d4 100644 --- a/TabItem.ui.qml +++ b/TabItem.ui.qml @@ -2,6 +2,7 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 Button { + id: button property int currentIndex: 0 property bool doesntEmbed: Qt.platform.os === "android" || Qt.platform.os === "linux" @@ -17,8 +18,9 @@ Button { height: 38 horizontalPadding: 16 verticalPadding: 8 + text: label contentItem: Text { - text: label + text: button.text color: index == currentIndex ? "white" : "#066ac9" font { family: doesntEmbed ? "Roboto" : regular.name |