Skip to content

Commit

Permalink
remove most usages of transparent background: fix visual regressions
Browse files Browse the repository at this point in the history
with transparent backgrounds, most of teh time the result is hard to
read

that is mostly unintended and unless there is some blur added, the UI
becomes unusable

Close #6992

Signed-off-by: Matthieu Gallien <[email protected]>
  • Loading branch information
mgallien committed Aug 12, 2024
1 parent 38febcc commit fbc0fca
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 21 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.base
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.base

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 : palette.base
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.base
}
}

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.base
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.base
}

Loader {
Expand Down
6 changes: 3 additions & 3 deletions src/gui/tray/UserLine.qml
Original file line number Diff line number Diff line change
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.base
}

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.base
}
}

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.base
}
}

Expand Down
15 changes: 7 additions & 8 deletions src/gui/tray/Window.qml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ ApplicationWindow {
// If the main dialog is displayed as a regular window we want it to be quadratic
width: Systray.useNormalWindow ? Style.trayWindowHeight : Style.trayWindowWidth
height: Style.trayWindowHeight
color: "transparent"
flags: Systray.useNormalWindow ? Qt.Window : Qt.Dialog | Qt.FramelessWindowHint

// TODO: Rather than setting all these palette colours manually,
Expand Down Expand Up @@ -345,7 +344,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.base
}
}

Expand Down Expand Up @@ -397,7 +396,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.base
}
}

Expand All @@ -419,7 +418,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.base
}
}

Expand All @@ -441,7 +440,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.base
}
}

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

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

Expand Down Expand Up @@ -496,7 +495,7 @@ ApplicationWindow {
height: width
anchors.bottom: currentAccountAvatar.bottom
anchors.right: currentAccountAvatar.right
color: currentAccountButton.hovered ? Style.currentUserHeaderTextColor : "transparent"
color: currentAccountButton.hovered ? Style.currentUserHeaderTextColor : palette.base
opacity: Style.trayFolderStatusIndicatorMouseHoverOpacityFactor
radius: width * Style.trayFolderStatusIndicatorRadiusFactor
}
Expand Down Expand Up @@ -699,7 +698,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.base
}
}

Expand Down

0 comments on commit fbc0fca

Please sign in to comment.