noctalia-shell/Widgets/Overview.qml
Sébastien Atoch 260c74b3e0 Improve images resizing quality accross the board
- Using mipmap: true and smooth: true for images that are downscaled
(avatar, icons, ...)
- Using mipmap: false and smooth: true for images that are potentially
upscaled (background, overview, ...)
2025-08-02 21:04:26 -04:00

57 lines
No EOL
1.8 KiB
QML

import QtQuick
import QtQuick.Effects
import Quickshell
import Quickshell.Wayland
import Qt5Compat.GraphicalEffects
import qs.Services
import qs.Settings
ShellRoot {
property string wallpaperSource: WallpaperManager.currentWallpaper !== "" && !Settings.settings.useSWWW ? WallpaperManager.currentWallpaper : ""
Variants {
model: Quickshell.screens
PanelWindow {
required property ShellScreen modelData
visible: wallpaperSource !== ""
anchors {
top: true
bottom: true
right: true
left: true
}
color: "transparent"
screen: modelData
WlrLayershell.layer: WlrLayer.Background
WlrLayershell.exclusionMode: ExclusionMode.Ignore
WlrLayershell.namespace: "quickshell-overview"
Image {
id: bgImage
anchors.fill: parent
fillMode: Image.PreserveAspectCrop
source: wallpaperSource
cache: true
smooth: true
mipmap: false
visible: wallpaperSource !== "" // Show the original for FastBlur input
}
MultiEffect {
id: overviewBgBlur
anchors.fill: parent
source: bgImage
blurEnabled: true
blur: 0.48 // controls blur strength (0 to 1)
blurMax: 128 // max blur radius in pixels
}
Rectangle {
anchors.fill: parent
color: Qt.rgba(
Theme.backgroundPrimary.r,
Theme.backgroundPrimary.g,
Theme.backgroundPrimary.b, 0.5)
}
}
}
}