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 authored and mgallien committed Jan 15, 2025
1 parent d883b6c commit e8dbb74
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 e8dbb74

Please sign in to comment.