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 {
|
sourceComponent: Kirigami.ApplicationItem {
|
||||||
id: app
|
id: app
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
// animation on show
|
// animation on show
|
||||||
opacity: 0
|
opacity: 0
|
||||||
|
|
@ -211,7 +212,7 @@ Rectangle {
|
||||||
Kirigami.NavigationTabButton {
|
Kirigami.NavigationTabButton {
|
||||||
icon.name: model.icon
|
icon.name: model.icon
|
||||||
text: model.name
|
text: model.name
|
||||||
// recolorIcon: false
|
recolorIcon: false
|
||||||
QQC2.ButtonGroup.group: footerBar.tabGroup
|
QQC2.ButtonGroup.group: footerBar.tabGroup
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,8 @@ AppletConfiguration {
|
||||||
sourceComponent: WallpaperSelector {
|
sourceComponent: WallpaperSelector {
|
||||||
visible: false
|
visible: false
|
||||||
horizontal: root.horizontal
|
horizontal: root.horizontal
|
||||||
|
edge: root.horizontal ? Qt.LeftEdge : Qt.BottomEdge
|
||||||
|
onClosed: configDialog.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Layouts 1.0
|
import QtQuick.Layouts 1.0
|
||||||
import QtQuick.Window 2.2
|
import QtQuick.Window 2.15
|
||||||
import QtQuick.Controls 2.3 as Controls
|
import QtQuick.Controls 2.3 as Controls
|
||||||
import org.kde.plasma.extras 2.0 as PlasmaExtras
|
import org.kde.plasma.extras 2.0 as PlasmaExtras
|
||||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||||
|
|
@ -16,7 +16,6 @@ import org.kde.kcm 1.1 as KCM
|
||||||
|
|
||||||
Controls.Drawer {
|
Controls.Drawer {
|
||||||
id: imageWallpaperDrawer
|
id: imageWallpaperDrawer
|
||||||
edge: root.horizontal ? Qt.LeftEdge : Qt.BottomEdge
|
|
||||||
dragMargin: 0
|
dragMargin: 0
|
||||||
|
|
||||||
required property bool horizontal
|
required property bool horizontal
|
||||||
|
|
@ -31,8 +30,8 @@ Controls.Drawer {
|
||||||
}
|
}
|
||||||
implicitWidth: PlasmaCore.Units.gridUnit * 10
|
implicitWidth: PlasmaCore.Units.gridUnit * 10
|
||||||
implicitHeight: PlasmaCore.Units.gridUnit * 8
|
implicitHeight: PlasmaCore.Units.gridUnit * 8
|
||||||
width: imageWallpaperDrawer.horizontal ? implicitWidth : root.width
|
width: imageWallpaperDrawer.horizontal ? implicitWidth : parent.width
|
||||||
height: imageWallpaperDrawer.horizontal ? root.height : implicitHeight
|
height: imageWallpaperDrawer.horizontal ? parent.height : implicitHeight
|
||||||
|
|
||||||
Wallpaper.ImageBackend {
|
Wallpaper.ImageBackend {
|
||||||
id: imageWallpaper
|
id: imageWallpaper
|
||||||
|
|
@ -51,8 +50,8 @@ Controls.Drawer {
|
||||||
onCountChanged: currentIndex = Math.min(model.indexOf(configDialog.wallpaperConfiguration["Image"]), model.rowCount()-1)
|
onCountChanged: currentIndex = Math.min(model.indexOf(configDialog.wallpaperConfiguration["Image"]), model.rowCount()-1)
|
||||||
headerPositioning: ListView.PullBackHeader
|
headerPositioning: ListView.PullBackHeader
|
||||||
delegate: Controls.ItemDelegate {
|
delegate: Controls.ItemDelegate {
|
||||||
width: imageWallpaperDrawer.horizontal ? parent.width : height * (root.Screen.width / root.Screen.height)
|
width: imageWallpaperDrawer.horizontal ? parent.width : height * (imageWallpaperDrawer.width / imageWallpaperDrawer.Screen.height)
|
||||||
height: imageWallpaperDrawer.horizontal ? width / (root.Screen.width / root.Screen.height) : parent.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
|
padding: wallpapersView.currentIndex === index ? PlasmaCore.Units.gridUnit / 4 : PlasmaCore.Units.gridUnit / 2
|
||||||
leftPadding: padding
|
leftPadding: padding
|
||||||
topPadding: padding
|
topPadding: padding
|
||||||
|
|
@ -79,21 +78,16 @@ Controls.Drawer {
|
||||||
width: PlasmaCore.Units.iconSizes.large
|
width: PlasmaCore.Units.iconSizes.large
|
||||||
height: width
|
height: width
|
||||||
icon: "view-preview"
|
icon: "view-preview"
|
||||||
visible: !wallpaperPreviewLoader.visible
|
visible: !walliePreview.visible
|
||||||
}
|
}
|
||||||
|
|
||||||
Loader {
|
Addons.QPixmapItem {
|
||||||
id: wallpaperPreviewLoader
|
id: walliePreview
|
||||||
visible: model.screenshot != null
|
visible: model.screenshot != null
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
active: true
|
smooth: true
|
||||||
asynchronous: true
|
pixmap: model.screenshot
|
||||||
sourceComponent: Addons.QPixmapItem {
|
fillMode: Image.PreserveAspectCrop
|
||||||
id: walliePreview
|
|
||||||
smooth: true
|
|
||||||
pixmap: model.screenshot
|
|
||||||
fillMode: Image.PreserveAspectCrop
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue