parent
ad22b1e7e6
commit
3221ca1858
4 changed files with 22 additions and 16 deletions
|
|
@ -87,6 +87,7 @@ Item {
|
||||||
Pane {
|
Pane {
|
||||||
sourceComponent: Dash {
|
sourceComponent: Dash {
|
||||||
visibilities: root.visibilities
|
visibilities: root.visibilities
|
||||||
|
state: root.state
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,14 @@ import "root:/widgets"
|
||||||
import "root:/services"
|
import "root:/services"
|
||||||
import "root:/config"
|
import "root:/config"
|
||||||
import "dash"
|
import "dash"
|
||||||
|
import Quickshell
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
||||||
GridLayout {
|
GridLayout {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property var visibilities
|
required property PersistentProperties visibilities
|
||||||
|
required property PersistentProperties state
|
||||||
|
|
||||||
rowSpacing: Appearance.spacing.normal
|
rowSpacing: Appearance.spacing.normal
|
||||||
columnSpacing: Appearance.spacing.normal
|
columnSpacing: Appearance.spacing.normal
|
||||||
|
|
@ -22,6 +24,7 @@ GridLayout {
|
||||||
id: user
|
id: user
|
||||||
|
|
||||||
visibilities: root.visibilities
|
visibilities: root.visibilities
|
||||||
|
state: root.state
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,11 @@
|
||||||
pragma ComponentBehavior: Bound
|
pragma ComponentBehavior: Bound
|
||||||
|
|
||||||
import QtQuick
|
import "root:/services"
|
||||||
import Quickshell
|
|
||||||
import "root:/config"
|
import "root:/config"
|
||||||
|
import "root:/utils"
|
||||||
|
import Quickshell
|
||||||
|
import QtQuick
|
||||||
|
import QtQuick.Dialogs
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
@ -10,6 +13,16 @@ Item {
|
||||||
required property PersistentProperties visibilities
|
required property PersistentProperties visibilities
|
||||||
readonly property PersistentProperties state: PersistentProperties {
|
readonly property PersistentProperties state: PersistentProperties {
|
||||||
property int currentTab
|
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
|
visible: height > 0
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ Row {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property PersistentProperties visibilities
|
required property PersistentProperties visibilities
|
||||||
|
required property PersistentProperties state
|
||||||
|
|
||||||
padding: Appearance.padding.large
|
padding: Appearance.padding.large
|
||||||
spacing: Appearance.spacing.normal
|
spacing: Appearance.spacing.normal
|
||||||
|
|
@ -46,7 +47,7 @@ Row {
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.visibilities.launcher = false;
|
root.visibilities.launcher = false;
|
||||||
dialog.open();
|
root.state.facePicker.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledRect {
|
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 {
|
Column {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue