mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-28 07:22:50 -05:00
stylistic tweaks to personalization
This commit is contained in:
@@ -543,11 +543,6 @@ Singleton {
|
|||||||
onExited: code => {
|
onExited: code => {
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
matugenProcess.running = true
|
matugenProcess.running = true
|
||||||
} else {
|
|
||||||
if (typeof ToastService !== "undefined") {
|
|
||||||
ToastService.wallpaperErrorStatus = "error"
|
|
||||||
ToastService.showError("Wallpaper processing failed")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -187,6 +187,80 @@ Item {
|
|||||||
color: Theme.surfaceVariantText
|
color: Theme.surfaceVariantText
|
||||||
visible: SessionData.wallpaperPath === ""
|
visible: SessionData.wallpaperPath === ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.margins: 1
|
||||||
|
radius: Theme.cornerRadius - 1
|
||||||
|
color: Qt.rgba(0, 0, 0, 0.7)
|
||||||
|
visible: wallpaperMouseArea.containsMouse
|
||||||
|
|
||||||
|
Row {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
spacing: 4
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
width: 32
|
||||||
|
height: 32
|
||||||
|
radius: 16
|
||||||
|
color: Qt.rgba(255, 255, 255, 0.9)
|
||||||
|
|
||||||
|
DankIcon {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
name: "folder_open"
|
||||||
|
size: 18
|
||||||
|
color: "black"
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onClicked: {
|
||||||
|
if (parentModal) {
|
||||||
|
parentModal.allowFocusOverride = true
|
||||||
|
parentModal.shouldHaveFocus = false
|
||||||
|
}
|
||||||
|
wallpaperBrowser.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
width: 32
|
||||||
|
height: 32
|
||||||
|
radius: 16
|
||||||
|
color: Qt.rgba(255, 255, 255, 0.9)
|
||||||
|
visible: SessionData.wallpaperPath !== ""
|
||||||
|
|
||||||
|
DankIcon {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
name: "clear"
|
||||||
|
size: 18
|
||||||
|
color: "black"
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onClicked: {
|
||||||
|
if (Theme.currentTheme === Theme.dynamic) {
|
||||||
|
Theme.switchTheme("blue")
|
||||||
|
}
|
||||||
|
SessionData.setWallpaper("")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: wallpaperMouseArea
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
propagateComposedEvents: true
|
||||||
|
acceptedButtons: Qt.NoButton
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
@@ -217,78 +291,41 @@ Item {
|
|||||||
|
|
||||||
Row {
|
Row {
|
||||||
spacing: Theme.spacingS
|
spacing: Theme.spacingS
|
||||||
|
visible: SessionData.wallpaperPath !== ""
|
||||||
|
|
||||||
StyledRect {
|
DankActionButton {
|
||||||
width: 100
|
buttonSize: 32
|
||||||
height: 32
|
iconName: "skip_previous"
|
||||||
radius: Theme.cornerRadius
|
iconSize: Theme.iconSizeSmall
|
||||||
color: Theme.primary
|
enabled: SessionData.wallpaperPath
|
||||||
|
opacity: SessionData.wallpaperPath ? 1 : 0.5
|
||||||
Row {
|
backgroundColor: Qt.rgba(Theme.surfaceVariant.r,
|
||||||
anchors.centerIn: parent
|
Theme.surfaceVariant.g,
|
||||||
spacing: Theme.spacingXS
|
Theme.surfaceVariant.b, 0.5)
|
||||||
|
hoverColor: Qt.rgba(Theme.primary.r,
|
||||||
DankIcon {
|
Theme.primary.g,
|
||||||
name: "folder_open"
|
Theme.primary.b, 0.12)
|
||||||
size: Theme.iconSizeSmall
|
iconColor: Theme.surfaceText
|
||||||
color: Theme.primaryText
|
onClicked: {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
WallpaperCyclingService.cyclePrevManually()
|
||||||
}
|
|
||||||
|
|
||||||
StyledText {
|
|
||||||
text: "Browse"
|
|
||||||
color: Theme.primaryText
|
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onClicked: {
|
|
||||||
if (parentModal) {
|
|
||||||
parentModal.allowFocusOverride = true
|
|
||||||
parentModal.shouldHaveFocus = false
|
|
||||||
}
|
|
||||||
wallpaperBrowser.open()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledRect {
|
DankActionButton {
|
||||||
width: 80
|
buttonSize: 32
|
||||||
height: 32
|
iconName: "skip_next"
|
||||||
radius: Theme.cornerRadius
|
iconSize: Theme.iconSizeSmall
|
||||||
color: Theme.surfaceVariant
|
enabled: SessionData.wallpaperPath
|
||||||
opacity: SessionData.wallpaperPath !== "" ? 1 : 0.5
|
opacity: SessionData.wallpaperPath ? 1 : 0.5
|
||||||
|
backgroundColor: Qt.rgba(Theme.surfaceVariant.r,
|
||||||
Row {
|
Theme.surfaceVariant.g,
|
||||||
anchors.centerIn: parent
|
Theme.surfaceVariant.b, 0.5)
|
||||||
spacing: Theme.spacingXS
|
hoverColor: Qt.rgba(Theme.primary.r,
|
||||||
|
Theme.primary.g,
|
||||||
DankIcon {
|
Theme.primary.b, 0.12)
|
||||||
name: "clear"
|
iconColor: Theme.surfaceText
|
||||||
size: Theme.iconSizeSmall
|
onClicked: {
|
||||||
color: Theme.surfaceVariantText
|
WallpaperCyclingService.cycleNextManually()
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
}
|
|
||||||
|
|
||||||
StyledText {
|
|
||||||
text: "Clear"
|
|
||||||
color: Theme.surfaceVariantText
|
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
enabled: SessionData.wallpaperPath !== ""
|
|
||||||
cursorShape: enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
|
|
||||||
onClicked: {
|
|
||||||
SessionData.setWallpaper("")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -321,13 +358,12 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
width: parent.width - Theme.iconSize - Theme.spacingM
|
width: parent.width - Theme.iconSize - Theme.spacingM - cyclingToggle.width - Theme.spacingM
|
||||||
- controlsRow.width - Theme.spacingM
|
|
||||||
spacing: Theme.spacingXS
|
spacing: Theme.spacingXS
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: "Wallpaper Cycling"
|
text: "Automatic Cycling"
|
||||||
font.pixelSize: Theme.fontSizeLarge
|
font.pixelSize: Theme.fontSizeLarge
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
@@ -341,108 +377,15 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
DankToggle {
|
||||||
id: controlsRow
|
id: cyclingToggle
|
||||||
|
|
||||||
spacing: Theme.spacingS
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
checked: SessionData.wallpaperCyclingEnabled
|
||||||
StyledRect {
|
onToggled: toggled => {
|
||||||
width: 60
|
return SessionData.setWallpaperCyclingEnabled(
|
||||||
height: 32
|
toggled)
|
||||||
radius: Theme.cornerRadius
|
}
|
||||||
color: prevButtonArea.containsMouse ? Qt.rgba(
|
|
||||||
Theme.primary.r,
|
|
||||||
Theme.primary.g,
|
|
||||||
Theme.primary.b,
|
|
||||||
0.8) : Theme.primary
|
|
||||||
opacity: SessionData.wallpaperPath ? 1 : 0.5
|
|
||||||
|
|
||||||
Row {
|
|
||||||
anchors.centerIn: parent
|
|
||||||
spacing: Theme.spacingXS
|
|
||||||
|
|
||||||
DankIcon {
|
|
||||||
name: "skip_previous"
|
|
||||||
size: Theme.iconSizeSmall
|
|
||||||
color: Theme.primaryText
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
}
|
|
||||||
|
|
||||||
StyledText {
|
|
||||||
text: "Prev"
|
|
||||||
color: Theme.primaryText
|
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
id: prevButtonArea
|
|
||||||
|
|
||||||
anchors.fill: parent
|
|
||||||
enabled: SessionData.wallpaperPath
|
|
||||||
cursorShape: enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
|
|
||||||
hoverEnabled: true
|
|
||||||
onClicked: {
|
|
||||||
WallpaperCyclingService.cyclePrevManually()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
StyledRect {
|
|
||||||
width: 60
|
|
||||||
height: 32
|
|
||||||
radius: Theme.cornerRadius
|
|
||||||
color: nextButtonArea.containsMouse ? Qt.rgba(
|
|
||||||
Theme.primary.r,
|
|
||||||
Theme.primary.g,
|
|
||||||
Theme.primary.b,
|
|
||||||
0.8) : Theme.primary
|
|
||||||
opacity: SessionData.wallpaperPath ? 1 : 0.5
|
|
||||||
|
|
||||||
Row {
|
|
||||||
anchors.centerIn: parent
|
|
||||||
spacing: Theme.spacingXS
|
|
||||||
|
|
||||||
DankIcon {
|
|
||||||
name: "skip_next"
|
|
||||||
size: Theme.iconSizeSmall
|
|
||||||
color: Theme.primaryText
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
}
|
|
||||||
|
|
||||||
StyledText {
|
|
||||||
text: "Next"
|
|
||||||
color: Theme.primaryText
|
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
id: nextButtonArea
|
|
||||||
|
|
||||||
anchors.fill: parent
|
|
||||||
enabled: SessionData.wallpaperPath
|
|
||||||
cursorShape: enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
|
|
||||||
hoverEnabled: true
|
|
||||||
onClicked: {
|
|
||||||
WallpaperCyclingService.cycleNextManually()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DankToggle {
|
|
||||||
id: cyclingToggle
|
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
checked: SessionData.wallpaperCyclingEnabled
|
|
||||||
onToggled: toggled => {
|
|
||||||
return SessionData.setWallpaperCyclingEnabled(
|
|
||||||
toggled)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -621,8 +564,8 @@ Item {
|
|||||||
id: toggle
|
id: toggle
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
checked: Theme.currentTheme === Theme.dynamic
|
checked: Theme.wallpaperPath !== "" && Theme.currentTheme === Theme.dynamic
|
||||||
enabled: ToastService.wallpaperErrorStatus !== "matugen_missing"
|
enabled: ToastService.wallpaperErrorStatus !== "matugen_missing" && Theme.wallpaperPath !== ""
|
||||||
onToggled: toggled => {
|
onToggled: toggled => {
|
||||||
if (toggled)
|
if (toggled)
|
||||||
Theme.switchTheme(Theme.dynamic)
|
Theme.switchTheme(Theme.dynamic)
|
||||||
|
|||||||
Reference in New Issue
Block a user