Skip to content

Commit

Permalink
Remove transparency value from system colours where needed
Browse files Browse the repository at this point in the history
For some reason Windows11 has some transparency in the system colours
which makes reading drawers difficult

Signed-off-by: Jyrki Gadinger <[email protected]>
  • Loading branch information
nilsding committed Jan 3, 2025
1 parent b9fdfa0 commit a47f18f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gui/tray/MainWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ ApplicationWindow {
radius: Systray.useNormalWindow ? 0.0 : Style.trayWindowRadius
border.width: Style.trayWindowBorderWidth
border.color: palette.dark
color: palette.base
color: Style.colorWithoutTransparency(palette.base)
}

property int userIndex: 0
Expand Down Expand Up @@ -180,7 +180,7 @@ ApplicationWindow {
radius: Systray.useNormalWindow ? 0.0 : Style.trayWindowRadius
border.width: Style.trayWindowBorderWidth
border.color: palette.dark
color: palette.base
color: Style.colorWithoutTransparency(palette.base)
}

property var folderAccountState: ({})
Expand Down Expand Up @@ -239,7 +239,7 @@ ApplicationWindow {
clip: true

radius: Systray.useNormalWindow ? 0.0 : Style.trayWindowRadius
color: palette.base
color: Style.colorWithoutTransparency(palette.base)

Accessible.role: Accessible.Grouping
Accessible.name: qsTr("Nextcloud desktop main dialog")
Expand Down
5 changes: 5 additions & 0 deletions theme/Style/Style.qml
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,9 @@ QtObject {
function variableSize(size) {
return size * (1 + Math.min(pixelSize / 100, 1));
}

// some platforms (e.g. Windows 11) have a transparency set on palette colours, this function removes that
function colorWithoutTransparency(color) {
return Qt.rgba(color.r, color.g, color.b, 1)
}
}

0 comments on commit a47f18f

Please sign in to comment.