RibbonTabBar: Make indicator as RibbonBackStageView(#6).

Thanks to @mowangshuying.
This commit is contained in:
Mentalflow 2024-07-28 22:33:30 +08:00
parent 5672b0471e
commit a607bf39ee
Signed by: Mentalflow
GPG Key ID: 5AE68D4401A2EE71
2 changed files with 4 additions and 4 deletions

View File

@ -43,7 +43,7 @@ TabButton {
Rectangle{ Rectangle{
id: btn_underline id: btn_underline
height: 3 height: 2
width: control.hovered && control.checked && !folded ? btn_text.contentWidth + 15 : btn_text.contentWidth width: control.hovered && control.checked && !folded ? btn_text.contentWidth + 15 : btn_text.contentWidth
color: { color: {
@ -53,7 +53,7 @@ TabButton {
return underlineCheckedColor return underlineCheckedColor
return "transparent" return "transparent"
} }
radius: 3 radius: height / 2
anchors anchors
{ {
horizontalCenter: parent.horizontalCenter horizontalCenter: parent.horizontalCenter

View File

@ -43,7 +43,7 @@ TabButton {
Rectangle{ Rectangle{
id: btn_underline id: btn_underline
height: 3 height: 2
width: control.hovered && control.checked && !folded ? btn_text.contentWidth + 15 : btn_text.contentWidth width: control.hovered && control.checked && !folded ? btn_text.contentWidth + 15 : btn_text.contentWidth
color: { color: {
@ -53,7 +53,7 @@ TabButton {
return underlineCheckedColor return underlineCheckedColor
return "transparent" return "transparent"
} }
radius: 3 radius: height / 2
anchors anchors
{ {
horizontalCenter: parent.horizontalCenter horizontalCenter: parent.horizontalCenter