Wip!
This commit is contained in:
parent
e79c163dd9
commit
861e207fb6
9 changed files with 59 additions and 82 deletions
|
|
@ -4,17 +4,18 @@ import Quickshell.Wayland
|
|||
import qs.Commons
|
||||
import qs.Services
|
||||
|
||||
Loader {
|
||||
active: true
|
||||
Variants {
|
||||
model: Quickshell.screens
|
||||
|
||||
sourceComponent: Variants {
|
||||
model: Quickshell.screens
|
||||
delegate: Loader {
|
||||
|
||||
delegate: PanelWindow {
|
||||
required property ShellScreen modelData
|
||||
property string wallpaperSource: WallpaperService.getWallpaper(modelData.name)
|
||||
required property ShellScreen modelData
|
||||
property string wallpaperSource: WallpaperService.getWallpaper(modelData.name)
|
||||
|
||||
active: wallpaperSource !== ""
|
||||
|
||||
sourceComponent: PanelWindow {
|
||||
|
||||
visible: wallpaperSource !== ""
|
||||
color: Color.transparent
|
||||
screen: modelData
|
||||
WlrLayershell.layer: WlrLayer.Background
|
||||
|
|
@ -28,15 +29,10 @@ Loader {
|
|||
left: true
|
||||
}
|
||||
|
||||
margins {
|
||||
top: 0
|
||||
}
|
||||
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
source: wallpaperSource
|
||||
visible: wallpaperSource !== ""
|
||||
cache: true
|
||||
smooth: true
|
||||
mipmap: false
|
||||
|
|
|
|||
|
|
@ -6,23 +6,20 @@ import qs.Commons
|
|||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
Loader {
|
||||
active: CompositorService.isNiri
|
||||
Variants {
|
||||
model: Quickshell.screens
|
||||
|
||||
Component.onCompleted: {
|
||||
if (CompositorService.isNiri) {
|
||||
Logger.log("Overview", "Loading Overview component for Niri")
|
||||
}
|
||||
}
|
||||
delegate: Loader {
|
||||
required property ShellScreen modelData
|
||||
property string wallpaperSource: WallpaperService.getWallpaper(modelData.name)
|
||||
|
||||
sourceComponent: Variants {
|
||||
model: Quickshell.screens
|
||||
active: CompositorService.isNiri && wallpaperSource !== ""
|
||||
|
||||
delegate: PanelWindow {
|
||||
required property ShellScreen modelData
|
||||
property string wallpaperSource: WallpaperService.getWallpaper(modelData.name)
|
||||
sourceComponent: PanelWindow {
|
||||
Component.onCompleted: {
|
||||
Logger.log("Overview", "Loading Overview component for Niri on", modelData.name)
|
||||
}
|
||||
|
||||
visible: wallpaperSource !== ""
|
||||
color: Color.transparent
|
||||
screen: modelData
|
||||
WlrLayershell.layer: WlrLayer.Background
|
||||
|
|
@ -38,19 +35,15 @@ Loader {
|
|||
|
||||
Image {
|
||||
id: bgImage
|
||||
|
||||
anchors.fill: parent
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
source: wallpaperSource
|
||||
cache: true
|
||||
smooth: true
|
||||
mipmap: false
|
||||
visible: wallpaperSource !== ""
|
||||
}
|
||||
|
||||
MultiEffect {
|
||||
id: overviewBgBlur
|
||||
|
||||
anchors.fill: parent
|
||||
source: bgImage
|
||||
blurEnabled: true
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ Loader {
|
|||
id: lockBgImage
|
||||
anchors.fill: parent
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
source: WallpaperService.currentWallpaper !== "" ? WallpaperService.currentWallpaper : ""
|
||||
source: WallpaperService.getWallpaper(screen.name)
|
||||
cache: true
|
||||
smooth: true
|
||||
mipmap: false
|
||||
|
|
|
|||
|
|
@ -23,10 +23,9 @@ ColumnLayout {
|
|||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 140 * scaling
|
||||
radius: Style.radiusM * scaling
|
||||
color: Color.mPrimary
|
||||
color: Color.mSecondary
|
||||
|
||||
NImageRounded {
|
||||
id: currentWallpaperImage
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.marginXS * scaling
|
||||
imagePath: WallpaperService.getWallpaper(screen.name)
|
||||
|
|
@ -113,7 +112,7 @@ ColumnLayout {
|
|||
id: wallpaperItem
|
||||
|
||||
property string wallpaperPath: modelData
|
||||
property bool isSelected: wallpaperPath === WallpaperService.currentWallpaper
|
||||
property bool isSelected: wallpaperPath === WallpaperService.getWallpaper(screen.name)
|
||||
|
||||
width: wallpaperGridView.itemSize
|
||||
height: Math.floor(wallpaperGridView.itemSize * 0.67)
|
||||
|
|
|
|||
|
|
@ -146,16 +146,7 @@ ColumnLayout {
|
|||
spacing: Style.marginS * scaling
|
||||
|
||||
// Factorized presets data
|
||||
property var intervalPresets: [
|
||||
5 * 60,
|
||||
10 * 60,
|
||||
15 * 60,
|
||||
30 * 60,
|
||||
45 * 60,
|
||||
60 * 60,
|
||||
90 * 60,
|
||||
120 * 60,
|
||||
]
|
||||
property var intervalPresets: [5 * 60, 10 * 60, 15 * 60, 30 * 60, 45 * 60, 60 * 60, 90 * 60, 120 * 60]
|
||||
|
||||
// Whether current interval equals one of the presets
|
||||
property bool isCurrentPreset: {
|
||||
|
|
@ -237,7 +228,7 @@ ColumnLayout {
|
|||
property int seconds: 0
|
||||
property string label: ""
|
||||
property bool selected: false
|
||||
signal clicked()
|
||||
signal clicked
|
||||
|
||||
radius: height * 0.5
|
||||
color: selected ? Color.mPrimary : Color.mSurfaceVariant
|
||||
|
|
@ -266,4 +257,4 @@ ColumnLayout {
|
|||
Layout.topMargin: Style.marginXL * scaling
|
||||
Layout.bottomMargin: Style.marginXL * scaling
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue