mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
shell: Fix warnings and use recolorIcon on bottom navbar
This commit is contained in:
parent
ab7d6aaedc
commit
d230cb7a0b
3 changed files with 15 additions and 18 deletions
|
|
@ -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,23 +78,18 @@ 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
|
||||
}
|
||||
}
|
||||
}
|
||||
onClicked: {
|
||||
configDialog.currentWallpaper = "org.kde.image";
|
||||
configDialog.wallpaperConfiguration["Image"] = model.path;
|
||||
|
|
|
|||
Loading…
Reference in a new issue