Skip to content

Commit

Permalink
Merge pull request #6993 from nextcloud/bugfix/removeTransparentBackg…
Browse files Browse the repository at this point in the history
…roundColor

remove most usages of transparent background: fix visual regressions
  • Loading branch information
mgallien authored Aug 12, 2024
2 parents f0e1ebb + c39e94e commit 74fa0a6
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/gui/PredefinedStatusButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ AbstractButton {
property string clearAtText: ""

background: Rectangle {
color: root.hovered || root.checked ? palette.highlight : "transparent"
color: root.hovered || root.checked ? palette.highlight : palette.base
radius: Style.slightlyRoundedButtonRadius
}

Expand Down
2 changes: 1 addition & 1 deletion src/gui/filedetails/FileTag.qml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ EnforcedPlainTextLabel {
border.color: palette.dark
border.width: Style.normalBorderWidth
radius: Style.veryRoundedButtonRadius
color: "transparent"
color: palette.base
}

color: palette.midlight
Expand Down
2 changes: 1 addition & 1 deletion src/gui/filedetails/NCTabButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ TabButton {
implicitWidth: textWidth + Style.standardSpacing * 2
implicitHeight: 2

color: tabButton.checked ? tabButton.accentColor : tabButton.hovered ? palette.highlight : "transparent"
color: tabButton.checked ? tabButton.accentColor : tabButton.hovered ? palette.highlight : palette.base
}
}
}
2 changes: 1 addition & 1 deletion src/gui/tray/ActivityItemActions.qml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Repeater {
property variant linksContextMenu: []
property bool displayActions: false

property color moreActionsButtonColor: "transparent"
property color moreActionsButtonColor: palette.base

property int maxActionButtons: 0

Expand Down
2 changes: 1 addition & 1 deletion src/gui/tray/CallNotificationDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import Qt5Compat.GraphicalEffects

ApplicationWindow {
id: root
color: "transparent"
color: palette.window
flags: Qt.Dialog | Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint

readonly property int windowSpacing: 10
Expand Down
2 changes: 1 addition & 1 deletion src/gui/tray/EditFileLocallyLoadingDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ApplicationWindow {
id: root
flags: Qt.Dialog | Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint

color: "transparent"
color: palette.window

width: 320
height: contentLayout.implicitHeight
Expand Down
2 changes: 1 addition & 1 deletion src/gui/tray/HeaderButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Button {
Layout.preferredHeight: Style.trayWindowHeaderHeight

background: Rectangle {
color: root.hovered || root.visualFocus ? Style.currentUserHeaderTextColor : "transparent"
color: root.hovered || root.visualFocus ? Style.currentUserHeaderTextColor : Style.currentUserHeaderColor
opacity: 0.2
}

Expand Down
2 changes: 1 addition & 1 deletion src/gui/tray/TrayFolderListItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ MenuItem {
Rectangle {
anchors.fill: parent
anchors.margins: Style.normalBorderWidth
color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : "transparent"
color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : palette.window
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/gui/tray/TrayFoldersMenuButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ HeaderButton {
width: Style.folderStateIndicatorSize + Style.trayFolderStatusIndicatorSizeOffset
height: width
anchors.centerIn: parent
color: root.hovered ? Style.currentUserHeaderTextColor : "transparent"
color: root.hovered ? Style.currentUserHeaderTextColor : palette.window
opacity: Style.trayFolderStatusIndicatorMouseHoverOpacityFactor
radius: width * Style.trayFolderStatusIndicatorRadiusFactor
z: -1
Expand Down
2 changes: 1 addition & 1 deletion src/gui/tray/UnifiedSearchResultListItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ MouseArea {
Rectangle {
id: unifiedSearchResultHoverBackground
anchors.fill: parent
color: (parent.containsMouse ? palette.highlight : "transparent")
color: parent.containsMouse ? palette.highlight : palette.window
}

Loader {
Expand Down
8 changes: 4 additions & 4 deletions src/gui/tray/UserLine.qml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ AbstractButton {
anchors.margins: 1
color: (userLine.hovered || userLine.visualFocus) &&
!(userMoreButton.hovered || userMoreButton.visualFocus) ?
palette.highlight : palette.base
palette.highlight : palette.window
}

contentItem: RowLayout {
Expand Down Expand Up @@ -149,7 +149,7 @@ AbstractButton {
background: Rectangle {
anchors.fill: parent
anchors.margins: 1
color: userMoreButton.hovered || userMoreButton.visualFocus ? palette.highlight : "transparent"
color: userMoreButton.hovered || userMoreButton.visualFocus ? palette.highlight : palette.window
}

contentItem: Image {
Expand Down Expand Up @@ -188,7 +188,7 @@ AbstractButton {
Rectangle {
anchors.fill: parent
anchors.margins: 1
color: parent.parent.hovered ? palette.highlight : "transparent"
color: parent.parent.hovered ? palette.highlight : palette.window
}
}

Expand Down Expand Up @@ -222,7 +222,7 @@ AbstractButton {
Rectangle {
anchors.fill: parent
anchors.margins: 1
color: parent.parent.hovered ? palette.highlight : "transparent"
color: parent.parent.hovered ? palette.highlight : palette.window
}
}

Expand Down
18 changes: 9 additions & 9 deletions src/gui/tray/Window.qml
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ ApplicationWindow {

background: Rectangle {
border.color: palette.dark
color: palette.base
color: palette.window
radius: Style.currentAccountButtonRadius
}

Expand Down Expand Up @@ -345,7 +345,7 @@ ApplicationWindow {
Rectangle {
anchors.fill: parent
anchors.margins: 1
color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : "transparent"
color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : palette.window
}
}

Expand Down Expand Up @@ -397,7 +397,7 @@ ApplicationWindow {
Rectangle {
anchors.fill: parent
anchors.margins: 1
color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : "transparent"
color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : palette.window
}
}

Expand All @@ -419,7 +419,7 @@ ApplicationWindow {
Rectangle {
anchors.fill: parent
anchors.margins: 1
color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : "transparent"
color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : palette.window
}
}

Expand All @@ -441,7 +441,7 @@ ApplicationWindow {
Rectangle {
anchors.fill: parent
anchors.margins: 1
color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : "transparent"
color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : palette.window
}
}

Expand All @@ -452,7 +452,7 @@ ApplicationWindow {
}

background: Rectangle {
color: parent.hovered || parent.visualFocus ? Style.currentUserHeaderTextColor : "transparent"
color: currentAccountButton.hovered || currentAccountButton.visualFocus ? Style.currentUserHeaderTextColor : Style.currentUserHeaderColor
opacity: 0.2
}

Expand Down Expand Up @@ -496,7 +496,7 @@ ApplicationWindow {
height: width
anchors.bottom: currentAccountAvatar.bottom
anchors.right: currentAccountAvatar.right
color: currentAccountButton.hovered ? Style.currentUserHeaderTextColor : "transparent"
color: currentAccountButton.hovered ? Style.currentUserHeaderTextColor : palette.window
opacity: Style.trayFolderStatusIndicatorMouseHoverOpacityFactor
radius: width * Style.trayFolderStatusIndicatorRadiusFactor
}
Expand Down Expand Up @@ -663,7 +663,7 @@ ApplicationWindow {

background: Rectangle {
border.color: palette.dark
color: palette.base
color: palette.window
radius: 2
}

Expand Down Expand Up @@ -699,7 +699,7 @@ ApplicationWindow {
Rectangle {
anchors.fill: parent
anchors.margins: 1
color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : "transparent"
color: parent.parent.hovered || parent.parent.visualFocus ? palette.highlight : palette.window
}
}

Expand Down
2 changes: 1 addition & 1 deletion theme/Style/Style.qml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ QtObject {
readonly property color lightHover: Theme.darkMode ? Qt.lighter(backgroundColor, 2) : Qt.darker(backgroundColor, 1.05)
readonly property color darkerHover: Theme.darkMode ? Qt.lighter(backgroundColor, 2.35) : Qt.darker(backgroundColor, 1.25)
readonly property color menuBorder: Theme.darkMode ? Qt.lighter(backgroundColor, 2.5) : Qt.darker(backgroundColor, 1.5)
readonly property color backgroundColor: Theme.systemPalette.base
readonly property color backgroundColor: Theme.systemPalette.window
readonly property color buttonBackgroundColor: Theme.systemPalette.button
readonly property color positiveColor: Qt.rgba(0.38, 0.74, 0.38, 1)

Expand Down

0 comments on commit 74fa0a6

Please sign in to comment.