From a607bf39ee42659532229ac224faf77eb863bf28 Mon Sep 17 00:00:00 2001 From: Mentalflow <312902918@qq.com> Date: Sun, 28 Jul 2024 22:33:30 +0800 Subject: [PATCH] RibbonTabBar: Make indicator as RibbonBackStageView(#6). Thanks to @mowangshuying. --- lib_source/qml/Qt5/RibbonTabButton.qml | 4 ++-- lib_source/qml/Qt6/RibbonTabButton.qml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib_source/qml/Qt5/RibbonTabButton.qml b/lib_source/qml/Qt5/RibbonTabButton.qml index 8fa78e9..367b5f7 100644 --- a/lib_source/qml/Qt5/RibbonTabButton.qml +++ b/lib_source/qml/Qt5/RibbonTabButton.qml @@ -43,7 +43,7 @@ TabButton { Rectangle{ id: btn_underline - height: 3 + height: 2 width: control.hovered && control.checked && !folded ? btn_text.contentWidth + 15 : btn_text.contentWidth color: { @@ -53,7 +53,7 @@ TabButton { return underlineCheckedColor return "transparent" } - radius: 3 + radius: height / 2 anchors { horizontalCenter: parent.horizontalCenter diff --git a/lib_source/qml/Qt6/RibbonTabButton.qml b/lib_source/qml/Qt6/RibbonTabButton.qml index 6b93853..cee4af8 100644 --- a/lib_source/qml/Qt6/RibbonTabButton.qml +++ b/lib_source/qml/Qt6/RibbonTabButton.qml @@ -43,7 +43,7 @@ TabButton { Rectangle{ id: btn_underline - height: 3 + height: 2 width: control.hovered && control.checked && !folded ? btn_text.contentWidth + 15 : btn_text.contentWidth color: { @@ -53,7 +53,7 @@ TabButton { return underlineCheckedColor return "transparent" } - radius: 3 + radius: height / 2 anchors { horizontalCenter: parent.horizontalCenter