padded icons for linux mint
This commit is contained in:
+10
-3
@@ -153,8 +153,11 @@ async function resolveTrayIconForTheme() {
|
||||
const existingTheme = usePersistedStore.getState().appearance
|
||||
console.log('[resolveTrayIconForTheme] existingTheme', existingTheme)
|
||||
|
||||
const isLinuxMint = platform() === 'linux' && (await invoke<boolean>('is_linux_mint'))
|
||||
const suffix = isLinuxMint ? '-padded' : ''
|
||||
|
||||
if (existingTheme.tray === 'color') {
|
||||
return await resolveResource('icons/favicon/icon-color.png')
|
||||
return await resolveResource(`icons/favicon/icon-color${suffix}.png`)
|
||||
}
|
||||
|
||||
if (existingTheme.tray === 'system') {
|
||||
@@ -168,7 +171,9 @@ async function resolveTrayIconForTheme() {
|
||||
console.log('[resolveTrayIconForTheme] windowTheme', windowTheme)
|
||||
|
||||
const pickedPath =
|
||||
windowTheme === 'dark' ? 'icons/favicon/icon.png' : 'icons/favicon/icon-light.png'
|
||||
windowTheme === 'dark'
|
||||
? `icons/favicon/icon${suffix}.png`
|
||||
: `icons/favicon/icon-light${suffix}.png`
|
||||
|
||||
return await resolveResource(pickedPath)
|
||||
} catch {
|
||||
@@ -182,7 +187,9 @@ async function resolveTrayIconForTheme() {
|
||||
}
|
||||
|
||||
const pickedPath =
|
||||
existingTheme.tray === 'dark' ? 'icons/favicon/icon-light.png' : 'icons/favicon/icon.png'
|
||||
existingTheme.tray === 'dark'
|
||||
? `icons/favicon/icon-light${suffix}.png`
|
||||
: `icons/favicon/icon${suffix}.png`
|
||||
|
||||
return await resolveResource(pickedPath)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user