Skip to content

Commit ed557f6

Browse files
nilsdingmgallien
authored andcommitted
Remove transparency value from system colours where needed
For some reason Windows11 has some transparency in the system colours which makes reading drawers difficult Signed-off-by: Jyrki Gadinger <[email protected]>
1 parent 887b642 commit ed557f6

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/gui/tray/MainWindow.qml

+3-3
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ ApplicationWindow {
143143
radius: Systray.useNormalWindow ? 0.0 : Style.trayWindowRadius
144144
border.width: Style.trayWindowBorderWidth
145145
border.color: palette.dark
146-
color: palette.base
146+
color: Style.colorWithoutTransparency(palette.base)
147147
}
148148

149149
property int userIndex: 0
@@ -180,7 +180,7 @@ ApplicationWindow {
180180
radius: Systray.useNormalWindow ? 0.0 : Style.trayWindowRadius
181181
border.width: Style.trayWindowBorderWidth
182182
border.color: palette.dark
183-
color: palette.base
183+
color: Style.colorWithoutTransparency(palette.base)
184184
}
185185

186186
property var folderAccountState: ({})
@@ -239,7 +239,7 @@ ApplicationWindow {
239239
clip: true
240240

241241
radius: Systray.useNormalWindow ? 0.0 : Style.trayWindowRadius
242-
color: palette.base
242+
color: Style.colorWithoutTransparency(palette.base)
243243

244244
Accessible.role: Accessible.Grouping
245245
Accessible.name: qsTr("Nextcloud desktop main dialog")

theme/Style/Style.qml

+5
Original file line numberDiff line numberDiff line change
@@ -200,4 +200,9 @@ QtObject {
200200
function variableSize(size) {
201201
return size * (1 + Math.min(pixelSize / 100, 1));
202202
}
203+
204+
// some platforms (e.g. Windows 11) have a transparency set on palette colours, this function removes that
205+
function colorWithoutTransparency(color) {
206+
return Qt.rgba(color.r, color.g, color.b, 1)
207+
}
203208
}

0 commit comments

Comments
 (0)