parent
ad22b1e7e6
commit
3221ca1858
4 changed files with 22 additions and 16 deletions
|
|
@ -87,6 +87,7 @@ Item {
|
|||
Pane {
|
||||
sourceComponent: Dash {
|
||||
visibilities: root.visibilities
|
||||
state: root.state
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,12 +2,14 @@ import "root:/widgets"
|
|||
import "root:/services"
|
||||
import "root:/config"
|
||||
import "dash"
|
||||
import Quickshell
|
||||
import QtQuick.Layouts
|
||||
|
||||
GridLayout {
|
||||
id: root
|
||||
|
||||
required property var visibilities
|
||||
required property PersistentProperties visibilities
|
||||
required property PersistentProperties state
|
||||
|
||||
rowSpacing: Appearance.spacing.normal
|
||||
columnSpacing: Appearance.spacing.normal
|
||||
|
|
@ -22,6 +24,7 @@ GridLayout {
|
|||
id: user
|
||||
|
||||
visibilities: root.visibilities
|
||||
state: root.state
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import "root:/services"
|
||||
import "root:/config"
|
||||
import "root:/utils"
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
import QtQuick.Dialogs
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
|
@ -10,6 +13,16 @@ Item {
|
|||
required property PersistentProperties visibilities
|
||||
readonly property PersistentProperties state: PersistentProperties {
|
||||
property int currentTab
|
||||
|
||||
readonly property FileDialog facePicker: FileDialog {
|
||||
title: qsTr("Select a profile picture")
|
||||
acceptLabel: qsTr("Select")
|
||||
nameFilters: [`Image files (${Wallpapers.extensions.map(e => `*.${e}`).join(" ")})`]
|
||||
onAccepted: {
|
||||
Paths.copy(selectedFile, `${Paths.home}/.face`);
|
||||
Quickshell.execDetached(["notify-send", "-a", "caelestia-shell", "-u", "low", "-h", `STRING:image-path:${Paths.strip(selectedFile)}`, "Profile picture changed", `Profile picture changed to ${Paths.shortenHome(Paths.strip(selectedFile))}`]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
visible: height > 0
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ Row {
|
|||
id: root
|
||||
|
||||
required property PersistentProperties visibilities
|
||||
required property PersistentProperties state
|
||||
|
||||
padding: Appearance.padding.large
|
||||
spacing: Appearance.spacing.normal
|
||||
|
|
@ -46,7 +47,7 @@ Row {
|
|||
|
||||
onClicked: {
|
||||
root.visibilities.launcher = false;
|
||||
dialog.open();
|
||||
root.state.facePicker.open();
|
||||
}
|
||||
|
||||
StyledRect {
|
||||
|
|
@ -103,18 +104,6 @@ Row {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
FileDialog {
|
||||
id: dialog
|
||||
|
||||
nameFilters: [`Image files (${Wallpapers.extensions.map(e => `*.${e}`).join(" ")})`]
|
||||
|
||||
onAccepted: {
|
||||
Paths.copy(selectedFile, `${Paths.home}/.face`);
|
||||
pfp.pathChanged();
|
||||
Quickshell.execDetached(["notify-send", "-a", "caelestia-shell", "-u", "low", "Profile picture changed", `Profile picture changed to ${Paths.strip(selectedFile)}`]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue