1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-01 19:18:28 -04:00

dash: fix color tokens for placeholder in calendar, and weather failed

fixes #2891
port 1.5
This commit is contained in:
bbedward
2026-07-19 11:17:47 -04:00
parent 90291bd627
commit eb330f62e1
3 changed files with 32 additions and 97 deletions
@@ -1079,7 +1079,7 @@ Rectangle {
Text {
text: I18n.tr("Add a task...", "placeholder in the new-task input field")
color: Theme.onSurface_38
color: Theme.outlineButton
visible: taskInput.text.length === 0
font.pixelSize: Theme.fontSizeSmall
anchors.verticalCenter: parent.verticalCenter
@@ -1,5 +1,4 @@
import QtQuick
import QtQuick.Controls
import qs.Common
import qs.Services
import qs.Widgets
@@ -19,6 +18,7 @@ Card {
anchors.centerIn: parent
spacing: Theme.spacingS
visible: !WeatherService.weather.available
z: 1
DankSpinner {
size: 24
@@ -42,9 +42,9 @@ Card {
anchors.horizontalCenter: parent.horizontalCenter
}
Button {
DankButton {
text: I18n.tr("Refresh")
flat: true
buttonHeight: 32
visible: !WeatherService.weather.loading
anchors.horizontalCenter: parent.horizontalCenter
onClicked: WeatherService.forceRefresh()
+28 -93
View File
@@ -141,52 +141,27 @@ Item {
anchors.verticalCenter: parent.verticalCenter
}
DankIcon {
DankActionButton {
id: refreshButtonTwo
name: "refresh"
size: Theme.iconSize - 4
color: Theme.withAlpha(Theme.surfaceText, 0.4)
anchors.top: parent.top
anchors.verticalCenter: parent.verticalCenter
smoothTransform: isRefreshing
property bool isRefreshing: false
iconName: isRefreshing ? "" : "refresh"
iconColor: Theme.withAlpha(Theme.surfaceText, 0.4)
tooltipText: I18n.tr("Refresh Weather")
tooltipSide: "left"
enabled: !isRefreshing
MouseArea {
id: refreshButtonMouseAreaTwo
anchors.fill: parent
hoverEnabled: true
cursorShape: parent.enabled ? Qt.PointingHandCursor : Qt.ForbiddenCursor
enabled: parent.enabled
property bool isRefreshing: false
Timer {
id: hoverDelayTwo
interval: 300
repeat: false
onTriggered: {
refreshButtonTooltipTwo.show(I18n.tr("Refresh Weather"), refreshButtonTwo, 0, 0, "left");
}
}
onEntered: {
hoverDelayTwo.restart();
}
onExited: {
hoverDelayTwo.stop();
refreshButtonTooltipTwo.hide();
}
onClicked: {
refreshButtonTwo.isRefreshing = true;
WeatherService.forceRefresh();
refreshTimerTwo.restart();
}
onClicked: {
isRefreshing = true;
WeatherService.forceRefresh();
refreshTimerTwo.restart();
}
DankTooltipV2 {
id: refreshButtonTooltipTwo
DankSpinner {
anchors.centerIn: parent
size: refreshButtonTwo.iconSize
visible: refreshButtonTwo.isRefreshing
}
Timer {
@@ -194,14 +169,6 @@ Item {
interval: 2000
onTriggered: refreshButtonTwo.isRefreshing = false
}
RotationAnimator on rotation {
running: refreshButtonTwo.isRefreshing
from: 0
to: 360
duration: 1000
loops: Animation.Infinite
}
}
}
}
@@ -864,52 +831,28 @@ Item {
onClicked: SessionData.setWeatherHourlyDetailed(!SessionData.weatherHourlyDetailed)
}
DankIcon {
DankActionButton {
id: refreshButton
name: "refresh"
size: Theme.iconSize - 4
color: Theme.withAlpha(Theme.surfaceText, 0.4)
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
smoothTransform: isRefreshing
property bool isRefreshing: false
iconName: isRefreshing ? "" : "refresh"
iconColor: Theme.withAlpha(Theme.surfaceText, 0.4)
tooltipText: I18n.tr("Refresh Weather")
tooltipSide: "left"
enabled: !isRefreshing
MouseArea {
id: refreshButtonMouseArea
anchors.fill: parent
hoverEnabled: true
cursorShape: parent.enabled ? Qt.PointingHandCursor : Qt.ForbiddenCursor
enabled: parent.enabled
property bool isRefreshing: false
Timer {
id: hoverDelay
interval: 300
repeat: false
onTriggered: {
refreshButtonTooltip.show(I18n.tr("Refresh Weather"), refreshButton, 0, 0, "left");
}
}
onEntered: {
hoverDelay.restart();
}
onExited: {
hoverDelay.stop();
refreshButtonTooltip.hide();
}
onClicked: {
refreshButton.isRefreshing = true;
WeatherService.forceRefresh();
refreshTimer.restart();
}
onClicked: {
isRefreshing = true;
WeatherService.forceRefresh();
refreshTimer.restart();
}
DankTooltipV2 {
id: refreshButtonTooltip
DankSpinner {
anchors.centerIn: parent
size: refreshButton.iconSize
visible: refreshButton.isRefreshing
}
Timer {
@@ -917,14 +860,6 @@ Item {
interval: 2000
onTriggered: refreshButton.isRefreshing = false
}
RotationAnimator on rotation {
running: refreshButton.isRefreshing
from: 0
to: 360
duration: 1000
loops: Animation.Infinite
}
}
}