mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-14 01:32:29 -04:00
dock: Fix option to use custom logos
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import qs.Common
|
import qs.Common
|
||||||
|
import qs.Modals.FileBrowser
|
||||||
import qs.Services
|
import qs.Services
|
||||||
import qs.Widgets
|
import qs.Widgets
|
||||||
import qs.Modules.Settings.Widgets
|
import qs.Modules.Settings.Widgets
|
||||||
@@ -7,6 +8,15 @@ import qs.Modules.Settings.Widgets
|
|||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
FileBrowserModal {
|
||||||
|
id: dockLogoFileBrowser
|
||||||
|
browserTitle: I18n.tr("Select Dock Launcher Logo")
|
||||||
|
browserIcon: "image"
|
||||||
|
browserType: "generic"
|
||||||
|
filterExtensions: ["*.svg", "*.png", "*.jpg", "*.jpeg", "*.webp"]
|
||||||
|
onFileSelected: path => SettingsData.set("dockLauncherLogoCustomPath", path.replace("file://", ""))
|
||||||
|
}
|
||||||
|
|
||||||
DankFlickable {
|
DankFlickable {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
clip: true
|
clip: true
|
||||||
@@ -298,6 +308,40 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Row {
|
||||||
|
width: parent.width
|
||||||
|
visible: SettingsData.dockLauncherLogoMode === "custom"
|
||||||
|
spacing: Theme.spacingM
|
||||||
|
|
||||||
|
StyledRect {
|
||||||
|
width: parent.width - selectButton.width - Theme.spacingM
|
||||||
|
height: 36
|
||||||
|
radius: Theme.cornerRadius
|
||||||
|
color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.9)
|
||||||
|
border.color: Theme.outlineStrong
|
||||||
|
border.width: 1
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: Theme.spacingM
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
text: SettingsData.dockLauncherLogoCustomPath || I18n.tr("Select an image file...")
|
||||||
|
font.pixelSize: Theme.fontSizeMedium
|
||||||
|
color: SettingsData.dockLauncherLogoCustomPath ? Theme.surfaceText : Theme.outlineButton
|
||||||
|
width: parent.width - Theme.spacingM * 2
|
||||||
|
elide: Text.ElideMiddle
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DankActionButton {
|
||||||
|
id: selectButton
|
||||||
|
iconName: "folder_open"
|
||||||
|
width: 36
|
||||||
|
height: 36
|
||||||
|
onClicked: dockLogoFileBrowser.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
spacing: Theme.spacingL
|
spacing: Theme.spacingL
|
||||||
|
|||||||
Reference in New Issue
Block a user