Commit d230cb7a authored by Devin Lin's avatar Devin Lin 🎨
Browse files

shell: Fix warnings and use recolorIcon on bottom navbar

parent ab7d6aae
Pipeline #197787 passed with stage
in 1 minute and 24 seconds
......@@ -151,6 +151,7 @@ Rectangle {
sourceComponent: Kirigami.ApplicationItem {
id: app
anchors.fill: parent
// animation on show
opacity: 0
......@@ -211,7 +212,7 @@ Rectangle {
Kirigami.NavigationTabButton {
icon.name: model.icon
text: model.name
// recolorIcon: false
recolorIcon: false
QQC2.ButtonGroup.group: footerBar.tabGroup
onClicked: {
......
......@@ -49,6 +49,8 @@ AppletConfiguration {
sourceComponent: WallpaperSelector {
visible: false
horizontal: root.horizontal
edge: root.horizontal ? Qt.LeftEdge : Qt.BottomEdge
onClosed: configDialog.close()
}
}
......
......@@ -4,7 +4,7 @@
import QtQuick 2.12
import QtQuick.Layouts 1.0
import QtQuick.Window 2.2
import QtQuick.Window 2.15
import QtQuick.Controls 2.3 as Controls
import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.plasma.core 2.0 as PlasmaCore
......@@ -16,7 +16,6 @@ import org.kde.kcm 1.1 as KCM
Controls.Drawer {
id: imageWallpaperDrawer
edge: root.horizontal ? Qt.LeftEdge : Qt.BottomEdge
dragMargin: 0
required property bool horizontal
......@@ -31,8 +30,8 @@ Controls.Drawer {
}
implicitWidth: PlasmaCore.Units.gridUnit * 10
implicitHeight: PlasmaCore.Units.gridUnit * 8
width: imageWallpaperDrawer.horizontal ? implicitWidth : root.width
height: imageWallpaperDrawer.horizontal ? root.height : implicitHeight
width: imageWallpaperDrawer.horizontal ? implicitWidth : parent.width
height: imageWallpaperDrawer.horizontal ? parent.height : implicitHeight
Wallpaper.ImageBackend {
id: imageWallpaper
......@@ -51,8 +50,8 @@ Controls.Drawer {
onCountChanged: currentIndex = Math.min(model.indexOf(configDialog.wallpaperConfiguration["Image"]), model.rowCount()-1)
headerPositioning: ListView.PullBackHeader
delegate: Controls.ItemDelegate {
width: imageWallpaperDrawer.horizontal ? parent.width : height * (root.Screen.width / root.Screen.height)
height: imageWallpaperDrawer.horizontal ? width / (root.Screen.width / root.Screen.height) : parent.height
width: imageWallpaperDrawer.horizontal ? parent.width : height * (imageWallpaperDrawer.width / imageWallpaperDrawer.Screen.height)
height: imageWallpaperDrawer.horizontal ? width / (imageWallpaperDrawer.Screen.width / imageWallpaperDrawer.Screen.height) : parent.height
padding: wallpapersView.currentIndex === index ? PlasmaCore.Units.gridUnit / 4 : PlasmaCore.Units.gridUnit / 2
leftPadding: padding
topPadding: padding
......@@ -79,21 +78,16 @@ Controls.Drawer {
width: PlasmaCore.Units.iconSizes.large
height: width
icon: "view-preview"
visible: !wallpaperPreviewLoader.visible
visible: !walliePreview.visible
}
Loader {
id: wallpaperPreviewLoader
Addons.QPixmapItem {
id: walliePreview
visible: model.screenshot != null
anchors.fill: parent
active: true
asynchronous: true
sourceComponent: Addons.QPixmapItem {
id: walliePreview
smooth: true
pixmap: model.screenshot
fillMode: Image.PreserveAspectCrop
}
smooth: true
pixmap: model.screenshot
fillMode: Image.PreserveAspectCrop
}
}
onClicked: {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment