From d92bc91bdfe27e686ec2cecdd0b0801536f33ab4 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Thu, 15 Sep 2022 18:25:41 +0200 Subject: [PATCH] Improve share view tab buttons Signed-off-by: Claudio Cambra --- src/gui/filedetails/NCTabButton.qml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gui/filedetails/NCTabButton.qml b/src/gui/filedetails/NCTabButton.qml index 6a5a2829a..cd863cea8 100644 --- a/src/gui/filedetails/NCTabButton.qml +++ b/src/gui/filedetails/NCTabButton.qml @@ -25,15 +25,16 @@ TabButton { property string svgCustomColorSource: "" - padding: 0 + padding: Style.smallSpacing background: Rectangle { + radius: Style.slightlyRoundedButtonRadius color: tabButton.pressed ? Style.lightHover : Style.backgroundColor } contentItem: ColumnLayout { id: tabButtonLayout - property var elementColors: tabButton.checked ? Style.ncTextColor : Style.ncSecondaryTextColor + property var elementColors: tabButton.checked || tabButton.hovered ? Style.ncTextColor : Style.ncSecondaryTextColor // We'd like to just set the height of the Image, but this causes crashing. // So we use a wrapping Item and use anchors to adjust the size. @@ -76,9 +77,11 @@ TabButton { property int textWidth: fontMetrics.boundingRect(tabButtonLabel.text).width + Layout.fillWidth: true implicitWidth: textWidth + Style.standardSpacing * 2 implicitHeight: 2 - color: tabButton.checked ? Style.ncBlue : "transparent" + + color: tabButton.checked ? Style.ncBlue : tabButton.hovered ? Style.lightHover : "transparent" } } }