mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 16:02:51 -05:00
color tweaks
This commit is contained in:
@@ -280,7 +280,7 @@ DankModal {
|
|||||||
id: clearConfirmDialog
|
id: clearConfirmDialog
|
||||||
|
|
||||||
confirmButtonText: "Clear All"
|
confirmButtonText: "Clear All"
|
||||||
confirmButtonColor: Theme.error
|
confirmButtonColor: Theme.primary
|
||||||
|
|
||||||
onVisibleChanged: {
|
onVisibleChanged: {
|
||||||
if (visible) {
|
if (visible) {
|
||||||
@@ -452,8 +452,8 @@ DankModal {
|
|||||||
DankActionButton {
|
DankActionButton {
|
||||||
iconName: "delete_sweep"
|
iconName: "delete_sweep"
|
||||||
iconSize: Theme.iconSize
|
iconSize: Theme.iconSize
|
||||||
iconColor: Theme.error
|
iconColor: Theme.surfaceText
|
||||||
hoverColor: Theme.errorHover
|
hoverColor: Theme.surfaceHover
|
||||||
onClicked: {
|
onClicked: {
|
||||||
clearConfirmDialog.show(
|
clearConfirmDialog.show(
|
||||||
"Clear All History?",
|
"Clear All History?",
|
||||||
@@ -471,7 +471,7 @@ DankModal {
|
|||||||
iconName: "close"
|
iconName: "close"
|
||||||
iconSize: Theme.iconSize - 4
|
iconSize: Theme.iconSize - 4
|
||||||
iconColor: Theme.surfaceText
|
iconColor: Theme.surfaceText
|
||||||
hoverColor: Theme.errorHover
|
hoverColor: Theme.surfaceHover
|
||||||
onClicked: hide()
|
onClicked: hide()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -841,8 +841,8 @@ DankModal {
|
|||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
iconName: "close"
|
iconName: "close"
|
||||||
iconSize: Theme.iconSize - 6
|
iconSize: Theme.iconSize - 6
|
||||||
iconColor: Theme.error
|
iconColor: Theme.surfaceText
|
||||||
hoverColor: Theme.errorHover
|
hoverColor: Theme.surfaceHover
|
||||||
onClicked: {
|
onClicked: {
|
||||||
deleteEntry(model.entry)
|
deleteEntry(model.entry)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ DankModal {
|
|||||||
property string confirmMessage: ""
|
property string confirmMessage: ""
|
||||||
property string confirmButtonText: "Confirm"
|
property string confirmButtonText: "Confirm"
|
||||||
property string cancelButtonText: "Cancel"
|
property string cancelButtonText: "Cancel"
|
||||||
property color confirmButtonColor: Theme.error
|
property color confirmButtonColor: Theme.primary
|
||||||
property var onConfirm: function() {}
|
property var onConfirm: function() {}
|
||||||
property var onCancel: function() {}
|
property var onCancel: function() {}
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ DankModal {
|
|||||||
confirmMessage = message || ""
|
confirmMessage = message || ""
|
||||||
confirmButtonText = "Confirm"
|
confirmButtonText = "Confirm"
|
||||||
cancelButtonText = "Cancel"
|
cancelButtonText = "Cancel"
|
||||||
confirmButtonColor = Theme.error
|
confirmButtonColor = Theme.primary
|
||||||
onConfirm = onConfirmCallback || function() {}
|
onConfirm = onConfirmCallback || function() {}
|
||||||
onCancel = onCancelCallback || function() {}
|
onCancel = onCancelCallback || function() {}
|
||||||
selectedButton = -1
|
selectedButton = -1
|
||||||
@@ -38,7 +38,7 @@ DankModal {
|
|||||||
confirmMessage = options.message || ""
|
confirmMessage = options.message || ""
|
||||||
confirmButtonText = options.confirmText || "Confirm"
|
confirmButtonText = options.confirmText || "Confirm"
|
||||||
cancelButtonText = options.cancelText || "Cancel"
|
cancelButtonText = options.cancelText || "Cancel"
|
||||||
confirmButtonColor = options.confirmColor || Theme.error
|
confirmButtonColor = options.confirmColor || Theme.primary
|
||||||
onConfirm = options.onConfirm || function() {}
|
onConfirm = options.onConfirm || function() {}
|
||||||
onCancel = options.onCancel || function() {}
|
onCancel = options.onCancel || function() {}
|
||||||
selectedButton = -1
|
selectedButton = -1
|
||||||
|
|||||||
@@ -233,14 +233,6 @@ DankModal {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DankIcon {
|
|
||||||
anchors.centerIn: parent
|
|
||||||
name: "warning"
|
|
||||||
size: Theme.iconSizeLarge
|
|
||||||
color: Theme.error
|
|
||||||
visible: PortalService.profileImage !== ""
|
|
||||||
&& profileImageSource.status === Image.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|||||||
@@ -280,82 +280,23 @@ DankPopout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
DankActionButton {
|
||||||
width: 40
|
buttonSize: 40
|
||||||
height: 40
|
iconName: root.powerOptionsExpanded ? "expand_less" : "power_settings_new"
|
||||||
radius: 20
|
iconSize: Theme.iconSize - 2
|
||||||
color: powerButton.containsMouse
|
iconColor: Theme.surfaceText
|
||||||
|| root.powerOptionsExpanded ? Qt.rgba(
|
backgroundColor: Qt.rgba(
|
||||||
Theme.error.r,
|
Theme.surfaceVariant.r,
|
||||||
Theme.error.g,
|
Theme.surfaceVariant.g,
|
||||||
Theme.error.b,
|
Theme.surfaceVariant.b,
|
||||||
0.12) : Qt.rgba(
|
0.5)
|
||||||
Theme.surfaceVariant.r,
|
hoverColor: Qt.rgba(Theme.primary.r,
|
||||||
Theme.surfaceVariant.g,
|
Theme.primary.g,
|
||||||
Theme.surfaceVariant.b,
|
Theme.primary.b, 0.12)
|
||||||
0.5)
|
onClicked: {
|
||||||
|
root.powerOptionsExpanded = !root.powerOptionsExpanded
|
||||||
Rectangle {
|
|
||||||
anchors.centerIn: parent
|
|
||||||
width: parent.width
|
|
||||||
height: parent.height
|
|
||||||
radius: parent.radius
|
|
||||||
color: "transparent"
|
|
||||||
clip: true
|
|
||||||
|
|
||||||
DankIcon {
|
|
||||||
id: dankIcon
|
|
||||||
|
|
||||||
anchors.centerIn: parent
|
|
||||||
name: root.powerOptionsExpanded ? "expand_less" : "power_settings_new"
|
|
||||||
size: Theme.iconSize - 2
|
|
||||||
color: powerButton.containsMouse
|
|
||||||
|| root.powerOptionsExpanded ? Theme.error : Theme.surfaceText
|
|
||||||
|
|
||||||
Behavior on name {
|
|
||||||
SequentialAnimation {
|
|
||||||
NumberAnimation {
|
|
||||||
target: dankIcon
|
|
||||||
property: "opacity"
|
|
||||||
to: 0
|
|
||||||
duration: Theme.shortDuration / 2
|
|
||||||
easing.type: Theme.standardEasing
|
|
||||||
}
|
|
||||||
|
|
||||||
PropertyAction {
|
|
||||||
target: dankIcon
|
|
||||||
property: "name"
|
|
||||||
}
|
|
||||||
|
|
||||||
NumberAnimation {
|
|
||||||
target: dankIcon
|
|
||||||
property: "opacity"
|
|
||||||
to: 1
|
|
||||||
duration: Theme.shortDuration / 2
|
|
||||||
easing.type: Theme.standardEasing
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
id: powerButton
|
|
||||||
|
|
||||||
anchors.fill: parent
|
|
||||||
hoverEnabled: true
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onPressed: {
|
|
||||||
root.powerOptionsExpanded = !root.powerOptionsExpanded
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Behavior on color {
|
|
||||||
ColorAnimation {
|
|
||||||
duration: Theme.shortDuration
|
|
||||||
easing.type: Theme.standardEasing
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DankActionButton {
|
DankActionButton {
|
||||||
@@ -409,9 +350,9 @@ DankPopout {
|
|||||||
height: 34
|
height: 34
|
||||||
radius: Theme.cornerRadius
|
radius: Theme.cornerRadius
|
||||||
color: logoutButton.containsMouse ? Qt.rgba(
|
color: logoutButton.containsMouse ? Qt.rgba(
|
||||||
Theme.warning.r,
|
Theme.primary.r,
|
||||||
Theme.warning.g,
|
Theme.primary.g,
|
||||||
Theme.warning.b,
|
Theme.primary.b,
|
||||||
0.12) : Qt.rgba(
|
0.12) : Qt.rgba(
|
||||||
Theme.surfaceVariant.r,
|
Theme.surfaceVariant.r,
|
||||||
Theme.surfaceVariant.g,
|
Theme.surfaceVariant.g,
|
||||||
@@ -425,14 +366,14 @@ DankPopout {
|
|||||||
DankIcon {
|
DankIcon {
|
||||||
name: "logout"
|
name: "logout"
|
||||||
size: Theme.fontSizeSmall
|
size: Theme.fontSizeSmall
|
||||||
color: logoutButton.containsMouse ? Theme.warning : Theme.surfaceText
|
color: logoutButton.containsMouse ? Theme.primary : Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: "Logout"
|
text: "Logout"
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
color: logoutButton.containsMouse ? Theme.warning : Theme.surfaceText
|
color: logoutButton.containsMouse ? Theme.primary : Theme.surfaceText
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
@@ -452,13 +393,6 @@ DankPopout {
|
|||||||
"Are you sure you want to logout?")
|
"Are you sure you want to logout?")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on color {
|
|
||||||
ColorAnimation {
|
|
||||||
duration: Theme.shortDuration
|
|
||||||
easing.type: Theme.standardEasing
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
@@ -466,9 +400,9 @@ DankPopout {
|
|||||||
height: 34
|
height: 34
|
||||||
radius: Theme.cornerRadius
|
radius: Theme.cornerRadius
|
||||||
color: rebootButton.containsMouse ? Qt.rgba(
|
color: rebootButton.containsMouse ? Qt.rgba(
|
||||||
Theme.warning.r,
|
Theme.primary.r,
|
||||||
Theme.warning.g,
|
Theme.primary.g,
|
||||||
Theme.warning.b,
|
Theme.primary.b,
|
||||||
0.12) : Qt.rgba(
|
0.12) : Qt.rgba(
|
||||||
Theme.surfaceVariant.r,
|
Theme.surfaceVariant.r,
|
||||||
Theme.surfaceVariant.g,
|
Theme.surfaceVariant.g,
|
||||||
@@ -482,14 +416,14 @@ DankPopout {
|
|||||||
DankIcon {
|
DankIcon {
|
||||||
name: "restart_alt"
|
name: "restart_alt"
|
||||||
size: Theme.fontSizeSmall
|
size: Theme.fontSizeSmall
|
||||||
color: rebootButton.containsMouse ? Theme.warning : Theme.surfaceText
|
color: rebootButton.containsMouse ? Theme.primary : Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: "Restart"
|
text: "Restart"
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
color: rebootButton.containsMouse ? Theme.warning : Theme.surfaceText
|
color: rebootButton.containsMouse ? Theme.primary : Theme.surfaceText
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
@@ -509,13 +443,6 @@ DankPopout {
|
|||||||
"Are you sure you want to restart?")
|
"Are you sure you want to restart?")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on color {
|
|
||||||
ColorAnimation {
|
|
||||||
duration: Theme.shortDuration
|
|
||||||
easing.type: Theme.standardEasing
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
@@ -566,13 +493,6 @@ DankPopout {
|
|||||||
"Are you sure you want to suspend?")
|
"Are you sure you want to suspend?")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on color {
|
|
||||||
ColorAnimation {
|
|
||||||
duration: Theme.shortDuration
|
|
||||||
easing.type: Theme.standardEasing
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
@@ -580,9 +500,9 @@ DankPopout {
|
|||||||
height: 34
|
height: 34
|
||||||
radius: Theme.cornerRadius
|
radius: Theme.cornerRadius
|
||||||
color: shutdownButton.containsMouse ? Qt.rgba(
|
color: shutdownButton.containsMouse ? Qt.rgba(
|
||||||
Theme.error.r,
|
Theme.primary.r,
|
||||||
Theme.error.g,
|
Theme.primary.g,
|
||||||
Theme.error.b,
|
Theme.primary.b,
|
||||||
0.12) : Qt.rgba(
|
0.12) : Qt.rgba(
|
||||||
Theme.surfaceVariant.r,
|
Theme.surfaceVariant.r,
|
||||||
Theme.surfaceVariant.g,
|
Theme.surfaceVariant.g,
|
||||||
@@ -596,14 +516,14 @@ DankPopout {
|
|||||||
DankIcon {
|
DankIcon {
|
||||||
name: "power_settings_new"
|
name: "power_settings_new"
|
||||||
size: Theme.fontSizeSmall
|
size: Theme.fontSizeSmall
|
||||||
color: shutdownButton.containsMouse ? Theme.error : Theme.surfaceText
|
color: shutdownButton.containsMouse ? Theme.primary : Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: "Shutdown"
|
text: "Shutdown"
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
color: shutdownButton.containsMouse ? Theme.error : Theme.surfaceText
|
color: shutdownButton.containsMouse ? Theme.primary : Theme.surfaceText
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
@@ -623,13 +543,6 @@ DankPopout {
|
|||||||
"Are you sure you want to shutdown?")
|
"Are you sure you want to shutdown?")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on color {
|
|
||||||
ColorAnimation {
|
|
||||||
duration: Theme.shortDuration
|
|
||||||
easing.type: Theme.standardEasing
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,9 +65,6 @@ Rectangle {
|
|||||||
if (process && process.cpu > 80)
|
if (process && process.cpu > 80)
|
||||||
return Theme.error
|
return Theme.error
|
||||||
|
|
||||||
if (process && process.cpu > 50)
|
|
||||||
return Theme.warning
|
|
||||||
|
|
||||||
return Theme.surfaceText
|
return Theme.surfaceText
|
||||||
}
|
}
|
||||||
opacity: 0.8
|
opacity: 0.8
|
||||||
@@ -99,10 +96,6 @@ Rectangle {
|
|||||||
return Qt.rgba(Theme.error.r, Theme.error.g,
|
return Qt.rgba(Theme.error.r, Theme.error.g,
|
||||||
Theme.error.b, 0.12)
|
Theme.error.b, 0.12)
|
||||||
|
|
||||||
if (process && process.cpu > 50)
|
|
||||||
return Qt.rgba(Theme.warning.r, Theme.warning.g,
|
|
||||||
Theme.warning.b, 0.12)
|
|
||||||
|
|
||||||
return Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g,
|
return Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g,
|
||||||
Theme.surfaceText.b, 0.08)
|
Theme.surfaceText.b, 0.08)
|
||||||
}
|
}
|
||||||
@@ -119,9 +112,6 @@ Rectangle {
|
|||||||
if (process && process.cpu > 80)
|
if (process && process.cpu > 80)
|
||||||
return Theme.error
|
return Theme.error
|
||||||
|
|
||||||
if (process && process.cpu > 50)
|
|
||||||
return Theme.warning
|
|
||||||
|
|
||||||
return Theme.surfaceText
|
return Theme.surfaceText
|
||||||
}
|
}
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
@@ -139,10 +129,6 @@ Rectangle {
|
|||||||
return Qt.rgba(Theme.error.r, Theme.error.g,
|
return Qt.rgba(Theme.error.r, Theme.error.g,
|
||||||
Theme.error.b, 0.12)
|
Theme.error.b, 0.12)
|
||||||
|
|
||||||
if (process && process.memoryKB > 512 * 1024)
|
|
||||||
return Qt.rgba(Theme.warning.r, Theme.warning.g,
|
|
||||||
Theme.warning.b, 0.12)
|
|
||||||
|
|
||||||
return Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g,
|
return Qt.rgba(Theme.surfaceText.r, Theme.surfaceText.g,
|
||||||
Theme.surfaceText.b, 0.08)
|
Theme.surfaceText.b, 0.08)
|
||||||
}
|
}
|
||||||
@@ -160,9 +146,6 @@ Rectangle {
|
|||||||
if (process && process.memoryKB > 1024 * 1024)
|
if (process && process.memoryKB > 1024 * 1024)
|
||||||
return Theme.error
|
return Theme.error
|
||||||
|
|
||||||
if (process && process.memoryKB > 512 * 1024)
|
|
||||||
return Theme.warning
|
|
||||||
|
|
||||||
return Theme.surfaceText
|
return Theme.surfaceText
|
||||||
}
|
}
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ Row {
|
|||||||
font.pixelSize: Theme.fontSizeMedium
|
font.pixelSize: Theme.fontSizeMedium
|
||||||
font.family: SettingsData.monoFontFamily
|
font.family: SettingsData.monoFontFamily
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: DgopService.usedSwapKB > 0 ? Theme.warning : Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
visible: DgopService.totalSwapKB > 0
|
visible: DgopService.totalSwapKB > 0
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user