forked from Shinonome/dots-hyprland
wallpaper selector: hide Homework folder if not weeb, fix toolbar button alignment
This commit is contained in:
@@ -171,7 +171,7 @@ MouseArea {
|
|||||||
{ icon: "movie", name: "Videos", path: Directories.videos },
|
{ icon: "movie", name: "Videos", path: Directories.videos },
|
||||||
{ icon: "", name: "---", path: "INTENTIONALLY_INVALID_DIR" },
|
{ icon: "", name: "---", path: "INTENTIONALLY_INVALID_DIR" },
|
||||||
{ icon: "wallpaper", name: "Wallpapers", path: `${Directories.pictures}/Wallpapers` },
|
{ icon: "wallpaper", name: "Wallpapers", path: `${Directories.pictures}/Wallpapers` },
|
||||||
{ icon: "favorite", name: "Homework", path: `${Directories.pictures}/homework` },
|
...(Config.options.policies.weeb === 1 ? [{ icon: "favorite", name: "Homework", path: `${Directories.pictures}/homework` }] : []),
|
||||||
]
|
]
|
||||||
delegate: RippleButton {
|
delegate: RippleButton {
|
||||||
id: quickDirButton
|
id: quickDirButton
|
||||||
@@ -327,6 +327,8 @@ MouseArea {
|
|||||||
Config.options.wallpaperSelector.useSystemFileDialog = true
|
Config.options.wallpaperSelector.useSystemFileDialog = true
|
||||||
}
|
}
|
||||||
contentItem: MaterialSymbol {
|
contentItem: MaterialSymbol {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
text: "open_in_new"
|
text: "open_in_new"
|
||||||
iconSize: Appearance.font.pixelSize.larger
|
iconSize: Appearance.font.pixelSize.larger
|
||||||
}
|
}
|
||||||
@@ -343,6 +345,8 @@ MouseArea {
|
|||||||
root.selectWallpaperPath(filePath);
|
root.selectWallpaperPath(filePath);
|
||||||
}
|
}
|
||||||
contentItem: MaterialSymbol {
|
contentItem: MaterialSymbol {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
text: "ifl"
|
text: "ifl"
|
||||||
iconSize: Appearance.font.pixelSize.larger
|
iconSize: Appearance.font.pixelSize.larger
|
||||||
}
|
}
|
||||||
@@ -355,11 +359,13 @@ MouseArea {
|
|||||||
implicitWidth: height
|
implicitWidth: height
|
||||||
onClicked: root.useDarkMode = !root.useDarkMode
|
onClicked: root.useDarkMode = !root.useDarkMode
|
||||||
contentItem: MaterialSymbol {
|
contentItem: MaterialSymbol {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
text: root.useDarkMode ? "dark_mode" : "light_mode"
|
text: root.useDarkMode ? "dark_mode" : "light_mode"
|
||||||
iconSize: Appearance.font.pixelSize.larger
|
iconSize: Appearance.font.pixelSize.larger
|
||||||
}
|
}
|
||||||
StyledToolTip {
|
StyledToolTip {
|
||||||
content: Translation.tr("Click to toggle light/dark mode (applied when wallpaper is chosen)")
|
content: Translation.tr("Click to toggle light/dark mode\n(applied when wallpaper is chosen)")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -399,11 +405,18 @@ MouseArea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ToolbarButton {
|
ToolbarButton {
|
||||||
|
implicitWidth: height
|
||||||
onClicked: {
|
onClicked: {
|
||||||
GlobalStates.wallpaperSelectorOpen = false;
|
GlobalStates.wallpaperSelectorOpen = false;
|
||||||
}
|
}
|
||||||
contentItem: StyledText {
|
contentItem: MaterialSymbol {
|
||||||
text: "Cancel"
|
anchors.centerIn: parent
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
text: "cancel_presentation"
|
||||||
|
iconSize: Appearance.font.pixelSize.larger
|
||||||
|
}
|
||||||
|
StyledToolTip {
|
||||||
|
content: Translation.tr("Cancel wallpaper selection")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user