Skip to content

Commit

Permalink
Fix the color of the tab icons in the files details page.
Browse files Browse the repository at this point in the history
Signed-off-by: Camila Ayres <[email protected]>
  • Loading branch information
camilasan committed Sep 12, 2024
1 parent bf27a40 commit 14ee656
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/gui/filedetails/FileDetailsPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ Page {
NCTabButton {
svgCustomColorSource: "image://svgimage-custom-color/activity.svg"
text: qsTr("Activity")
accentColor: root.accentColor
checked: swipeView.currentIndex === fileActivityView.swipeIndex
onClicked: swipeView.currentIndex = fileActivityView.swipeIndex
}
Expand All @@ -234,7 +233,6 @@ Page {
height: visible ? implicitHeight : 0
svgCustomColorSource: "image://svgimage-custom-color/share.svg"
text: qsTr("Sharing")
accentColor: root.accentColor
checked: swipeView.currentIndex === shareViewLoader.swipeIndex
onClicked: swipeView.currentIndex = shareViewLoader.swipeIndex
visible: root.fileDetails.sharingAvailable
Expand Down
5 changes: 2 additions & 3 deletions src/gui/filedetails/NCTabButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ TabButton {
id: tabButton

property string svgCustomColorSource: ""
property color accentColor: Style.ncBlue

padding: Style.smallSpacing
background: Rectangle {
Expand All @@ -36,7 +35,7 @@ TabButton {
contentItem: ColumnLayout {
id: tabButtonLayout

property var elementColors: tabButton.checked || tabButton.hovered ? palette.buttonText : palette.midlight
property var elementColors: tabButton.checked || tabButton.hovered ? palette.buttonText : palette.windowText

// 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.
Expand Down Expand Up @@ -82,7 +81,7 @@ TabButton {
implicitWidth: textWidth + Style.standardSpacing * 2
implicitHeight: 2

color: tabButton.checked ? tabButton.accentColor : tabButton.hovered ? palette.highlight : palette.base
color: tabButton.checked || tabButton.hovered ? palette.highlight : palette.base
}
}
}

0 comments on commit 14ee656

Please sign in to comment.