Wallpaper refining (#81)
* Wallpaper refining - Swww: allow all images formats supported by Swww but only show the one we can render in the panel - Fix: timer should be restarted when selecting a wallpaper - Fix: avoid recomputing selected thumbnail by altering the border width - Removed LazyLoader as it was not helping * Wallpapers changes - revert: maintaining a single list all wallpapers, support only basic images format. - settings: reordered wallpapers settings and made the Swww settings conditionals to activating the useSWWW toggle * Fix broken avatar display in Panel, Settings and LockScreen --------- Co-authored-by: Sébastien Atoch <sebastien@atracktiv.com>
This commit is contained in:
parent
e71fecb521
commit
de94d94265
7 changed files with 228 additions and 143 deletions
|
|
@ -30,7 +30,7 @@ PanelWindow {
|
|||
}
|
||||
|
||||
onVisibleChanged: {
|
||||
if (wallpaperPanelLoader.active) {
|
||||
if (wallpaperPanel.visible) {
|
||||
wallpapers = WallpaperManager.wallpaperList
|
||||
} else {
|
||||
wallpapers = []
|
||||
|
|
@ -81,7 +81,9 @@ PanelWindow {
|
|||
id: closeButtonArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onClicked: wallpaperPanelLoader.active = false;
|
||||
onClicked: {
|
||||
wallpaperPanel.visible = false;
|
||||
}
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
}
|
||||
}
|
||||
|
|
@ -114,7 +116,7 @@ PanelWindow {
|
|||
cellWidth: Math.max(120, (scrollView.width / 3) - 12)
|
||||
cellHeight: cellWidth * 0.6
|
||||
model: wallpapers
|
||||
cacheBuffer: 32
|
||||
cacheBuffer: 64
|
||||
leftMargin: 8
|
||||
rightMargin: 8
|
||||
topMargin: 8
|
||||
|
|
@ -129,27 +131,24 @@ PanelWindow {
|
|||
color: Qt.darker(Theme.backgroundPrimary, 1.1)
|
||||
radius: 12
|
||||
border.color: Settings.settings.currentWallpaper === modelData ? Theme.accentPrimary : Theme.outline
|
||||
border.width: Settings.settings.currentWallpaper === modelData ? 3 : 1
|
||||
border.width: 2
|
||||
Image {
|
||||
id: wallpaperImage
|
||||
anchors.fill: parent
|
||||
source: modelData
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
asynchronous: true
|
||||
cache: false
|
||||
cache: true
|
||||
smooth: true
|
||||
mipmap: true
|
||||
// Limit memory usage
|
||||
sourceSize.width: 480
|
||||
sourceSize.height: 270
|
||||
}
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: Theme.textPrimary
|
||||
opacity: (wallpaperImage.status == Image.Ready) ? 0.0 : 1.0
|
||||
// Limit memory usage - FullHD/4 on width and height
|
||||
sourceSize.width: Math.min(width, 480)
|
||||
sourceSize.height: Math.min(height, 270)
|
||||
// Opacity animation once image is ready
|
||||
opacity: (wallpaperImage.status == Image.Ready) ? 1.0 : 0.0
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: 500
|
||||
duration: 300
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue