mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-31 00:42:50 -05:00
Compare commits
4 Commits
9fc0d5efff
...
3ebdd5631c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ebdd5631c | ||
|
|
6c4caf121a | ||
|
|
89788e9ca7 | ||
|
|
0787c63fed |
@@ -687,7 +687,10 @@ Singleton {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
property alias widgetBaseHoverColor: root.primaryPressed
|
property color widgetBaseHoverColor: {
|
||||||
|
const blended = blend(widgetBaseBackgroundColor, primary, 0.1);
|
||||||
|
return withAlpha(blended, Math.max(0.3, blended.a));
|
||||||
|
}
|
||||||
|
|
||||||
property color widgetIconColor: {
|
property color widgetIconColor: {
|
||||||
if (typeof SettingsData === "undefined") {
|
if (typeof SettingsData === "undefined") {
|
||||||
|
|||||||
@@ -317,7 +317,7 @@ BasePill {
|
|||||||
height: 20
|
height: 20
|
||||||
radius: 10
|
radius: 10
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
color: prevArea.containsMouse ? Theme.primaryHover : "transparent"
|
color: prevArea.containsMouse ? Theme.widgetBaseHoverColor : "transparent"
|
||||||
visible: root.playerAvailable
|
visible: root.playerAvailable
|
||||||
opacity: (activePlayer && activePlayer.canGoPrevious) ? 1 : 0.3
|
opacity: (activePlayer && activePlayer.canGoPrevious) ? 1 : 0.3
|
||||||
|
|
||||||
@@ -374,7 +374,7 @@ BasePill {
|
|||||||
height: 20
|
height: 20
|
||||||
radius: 10
|
radius: 10
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
color: nextArea.containsMouse ? Theme.primaryHover : "transparent"
|
color: nextArea.containsMouse ? Theme.widgetBaseHoverColor : "transparent"
|
||||||
visible: playerAvailable
|
visible: playerAvailable
|
||||||
opacity: (activePlayer && activePlayer.canGoNext) ? 1 : 0.3
|
opacity: (activePlayer && activePlayer.canGoNext) ? 1 : 0.3
|
||||||
|
|
||||||
|
|||||||
@@ -86,12 +86,10 @@ Item {
|
|||||||
return "transparent";
|
return "transparent";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (privacyArea.containsMouse) {
|
const rawTransparency = (root.barConfig && root.barConfig.widgetTransparency !== undefined) ? root.barConfig.widgetTransparency : 1.0;
|
||||||
return Theme.primaryPressed;
|
const isHovered = privacyArea.containsMouse;
|
||||||
}
|
const transparency = isHovered ? Math.max(0.3, rawTransparency) : rawTransparency;
|
||||||
|
const baseColor = isHovered ? Theme.widgetBaseHoverColor : Theme.widgetBaseBackgroundColor;
|
||||||
const baseColor = Theme.widgetBaseBackgroundColor;
|
|
||||||
const transparency = (root.barConfig && root.barConfig.widgetTransparency !== undefined) ? root.barConfig.widgetTransparency : 1.0;
|
|
||||||
return Theme.withAlpha(baseColor, transparency);
|
return Theme.withAlpha(baseColor, transparency);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -348,10 +348,9 @@ Item {
|
|||||||
radius: Theme.cornerRadius
|
radius: Theme.cornerRadius
|
||||||
color: {
|
color: {
|
||||||
if (isFocused) {
|
if (isFocused) {
|
||||||
return mouseArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.3) : Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.2);
|
return mouseArea.containsMouse ? Theme.primarySelected : Theme.withAlpha(Theme.primary, 0.2);
|
||||||
} else {
|
|
||||||
return mouseArea.containsMouse ? Qt.rgba(Theme.primaryHover.r, Theme.primaryHover.g, Theme.primaryHover.b, 0.1) : "transparent";
|
|
||||||
}
|
}
|
||||||
|
return mouseArea.containsMouse ? Theme.widgetBaseHoverColor : "transparent";
|
||||||
}
|
}
|
||||||
|
|
||||||
// App icon
|
// App icon
|
||||||
@@ -598,10 +597,9 @@ Item {
|
|||||||
radius: Theme.cornerRadius
|
radius: Theme.cornerRadius
|
||||||
color: {
|
color: {
|
||||||
if (isFocused) {
|
if (isFocused) {
|
||||||
return mouseArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.3) : Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.2);
|
return mouseArea.containsMouse ? Theme.primarySelected : Theme.withAlpha(Theme.primary, 0.2);
|
||||||
} else {
|
|
||||||
return mouseArea.containsMouse ? Qt.rgba(Theme.primaryHover.r, Theme.primaryHover.g, Theme.primaryHover.b, 0.1) : "transparent";
|
|
||||||
}
|
}
|
||||||
|
return mouseArea.containsMouse ? Theme.widgetBaseHoverColor : "transparent";
|
||||||
}
|
}
|
||||||
|
|
||||||
IconImage {
|
IconImage {
|
||||||
@@ -912,7 +910,7 @@ Item {
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: parent.radius
|
radius: parent.radius
|
||||||
color: closeMouseArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) : "transparent"
|
color: closeMouseArea.containsMouse ? Theme.widgetBaseHoverColor : "transparent"
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ Item {
|
|||||||
height: 24
|
height: 24
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
radius: Theme.cornerRadius
|
radius: Theme.cornerRadius
|
||||||
color: trayItemArea.containsMouse ? Theme.primaryHover : "transparent"
|
color: trayItemArea.containsMouse ? Theme.widgetBaseHoverColor : "transparent"
|
||||||
|
|
||||||
IconImage {
|
IconImage {
|
||||||
id: iconImg
|
id: iconImg
|
||||||
@@ -257,7 +257,7 @@ Item {
|
|||||||
height: 24
|
height: 24
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
radius: Theme.cornerRadius
|
radius: Theme.cornerRadius
|
||||||
color: caretArea.containsMouse ? Theme.primaryHover : "transparent"
|
color: caretArea.containsMouse ? Theme.widgetBaseHoverColor : "transparent"
|
||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
@@ -326,7 +326,7 @@ Item {
|
|||||||
height: 24
|
height: 24
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
radius: Theme.cornerRadius
|
radius: Theme.cornerRadius
|
||||||
color: trayItemArea.containsMouse ? Theme.primaryHover : "transparent"
|
color: trayItemArea.containsMouse ? Theme.widgetBaseHoverColor : "transparent"
|
||||||
|
|
||||||
IconImage {
|
IconImage {
|
||||||
id: iconImg
|
id: iconImg
|
||||||
@@ -390,7 +390,7 @@ Item {
|
|||||||
height: 24
|
height: 24
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
radius: Theme.cornerRadius
|
radius: Theme.cornerRadius
|
||||||
color: caretAreaVert.containsMouse ? Theme.primaryHover : "transparent"
|
color: caretAreaVert.containsMouse ? Theme.widgetBaseHoverColor : "transparent"
|
||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
@@ -749,7 +749,7 @@ Item {
|
|||||||
width: 28
|
width: 28
|
||||||
height: 28
|
height: 28
|
||||||
radius: Theme.cornerRadius
|
radius: Theme.cornerRadius
|
||||||
color: itemArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.surfaceContainer, 0)
|
color: itemArea.containsMouse ? Theme.widgetBaseHoverColor : Theme.withAlpha(Theme.surfaceContainer, 0)
|
||||||
|
|
||||||
IconImage {
|
IconImage {
|
||||||
id: menuIconImg
|
id: menuIconImg
|
||||||
@@ -1209,7 +1209,7 @@ Item {
|
|||||||
width: parent.width
|
width: parent.width
|
||||||
height: 28
|
height: 28
|
||||||
radius: 0
|
radius: 0
|
||||||
color: visibilityToggleArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.surfaceContainer, 0)
|
color: visibilityToggleArea.containsMouse ? Theme.widgetBaseHoverColor : Theme.withAlpha(Theme.surfaceContainer, 0)
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
@@ -1262,7 +1262,7 @@ Item {
|
|||||||
width: parent.width
|
width: parent.width
|
||||||
height: 28
|
height: 28
|
||||||
radius: 0
|
radius: 0
|
||||||
color: backArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.surfaceContainer, 0)
|
color: backArea.containsMouse ? Theme.widgetBaseHoverColor : Theme.withAlpha(Theme.surfaceContainer, 0)
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
@@ -1314,7 +1314,7 @@ Item {
|
|||||||
if (menuEntry?.isSeparator) {
|
if (menuEntry?.isSeparator) {
|
||||||
return Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2);
|
return Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2);
|
||||||
}
|
}
|
||||||
return itemArea.containsMouse ? Theme.primaryHover : Theme.withAlpha(Theme.surfaceContainer, 0);
|
return itemArea.containsMouse ? Theme.widgetBaseHoverColor : Theme.withAlpha(Theme.surfaceContainer, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
|||||||
@@ -881,7 +881,7 @@ Item {
|
|||||||
height: delegateRoot.visualHeight
|
height: delegateRoot.visualHeight
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
radius: Theme.cornerRadius
|
radius: Theme.cornerRadius
|
||||||
color: isActive ? Theme.primary : isUrgent ? Theme.error : isPlaceholder ? Theme.surfaceTextLight : isHovered ? Theme.outlineButton : Theme.surfaceTextAlpha
|
color: isActive ? Theme.primary : isUrgent ? Theme.error : isPlaceholder ? Theme.surfaceTextLight : isHovered ? Theme.withAlpha(Theme.surfaceText, 0.45) : Theme.surfaceTextAlpha
|
||||||
|
|
||||||
border.width: isUrgent ? 2 : 0
|
border.width: isUrgent ? 2 : 0
|
||||||
border.color: isUrgent ? Theme.error : Theme.withAlpha(Theme.error, 0)
|
border.color: isUrgent ? Theme.error : Theme.withAlpha(Theme.error, 0)
|
||||||
|
|||||||
@@ -338,13 +338,11 @@ DankPopout {
|
|||||||
onCloseDash: root.dashVisible = false
|
onCloseDash: root.dashVisible = false
|
||||||
onSwitchToWeatherTab: {
|
onSwitchToWeatherTab: {
|
||||||
if (SettingsData.weatherEnabled) {
|
if (SettingsData.weatherEnabled) {
|
||||||
tabBar.currentIndex = 3;
|
root.currentTabIndex = 3;
|
||||||
tabBar.tabClicked(3);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onSwitchToMediaTab: {
|
onSwitchToMediaTab: {
|
||||||
tabBar.currentIndex = 1;
|
root.currentTabIndex = 1;
|
||||||
tabBar.tabClicked(1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,13 +92,11 @@ Item {
|
|||||||
return "transparent";
|
return "transparent";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const rawTransparency = (root.barConfig && root.barConfig.widgetTransparency !== undefined) ? root.barConfig.widgetTransparency : 1.0;
|
||||||
const isHovered = mouseArea.containsMouse || (root.isHovered || false);
|
const isHovered = mouseArea.containsMouse || (root.isHovered || false);
|
||||||
if (isHovered) {
|
const transparency = isHovered ? Math.max(0.3, rawTransparency) : rawTransparency;
|
||||||
return Theme.primaryPressed;
|
const baseColor = isHovered ? Theme.widgetBaseHoverColor : Theme.widgetBaseBackgroundColor;
|
||||||
}
|
|
||||||
|
|
||||||
const baseColor = Theme.widgetBaseBackgroundColor;
|
|
||||||
const transparency = (root.barConfig && root.barConfig.widgetTransparency !== undefined) ? root.barConfig.widgetTransparency : 1.0;
|
|
||||||
if (Theme.widgetBackgroundHasAlpha) {
|
if (Theme.widgetBackgroundHasAlpha) {
|
||||||
return Qt.rgba(baseColor.r, baseColor.g, baseColor.b, baseColor.a * transparency);
|
return Qt.rgba(baseColor.r, baseColor.g, baseColor.b, baseColor.a * transparency);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -968,9 +968,17 @@ Item {
|
|||||||
|
|
||||||
SettingsDropdownRow {
|
SettingsDropdownRow {
|
||||||
id: intervalDropdown
|
id: intervalDropdown
|
||||||
property var intervalOptions: ["1 minute", "5 minutes", "15 minutes", "30 minutes", "1 hour", "1.5 hours", "2 hours", "3 hours", "4 hours", "6 hours", "8 hours", "12 hours"]
|
property var intervalOptions: [
|
||||||
property var intervalValues: [60, 300, 900, 1800, 3600, 5400, 7200, 10800, 14400, 21600, 28800, 43200]
|
"5 seconds", "10 seconds", "15 seconds", "20 seconds", "25 seconds", "30 seconds",
|
||||||
|
"35 seconds", "40 seconds", "45 seconds", "50 seconds", "55 seconds",
|
||||||
|
"1 minute", "5 minutes", "15 minutes", "30 minutes", "1 hour", "1.5 hours", "2 hours",
|
||||||
|
"3 hours", "4 hours", "6 hours", "8 hours", "12 hours"
|
||||||
|
]
|
||||||
|
|
||||||
|
property var intervalValues: [
|
||||||
|
5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60,
|
||||||
|
300, 900, 1800, 3600, 5400, 7200, 10800, 14400, 21600, 28800, 43200
|
||||||
|
]
|
||||||
tab: "wallpaper"
|
tab: "wallpaper"
|
||||||
tags: ["interval", "cycling", "time", "frequency"]
|
tags: ["interval", "cycling", "time", "frequency"]
|
||||||
settingKey: "wallpaperCyclingInterval"
|
settingKey: "wallpaperCyclingInterval"
|
||||||
|
|||||||
Reference in New Issue
Block a user