Verified Commit d2826be9 authored by Fushan Wen's avatar Fushan Wen 💬
Browse files

applets/timer: fix tooltip

Use tooltip text defined in main.qml
parent 68fe727f
Pipeline #211069 passed with stage
in 2 minutes and 49 seconds
......@@ -67,16 +67,18 @@ Item {
root.startTimer();
}
}
PlasmaCore.ToolTipArea {
anchors.fill: parent
subText: root.running ? i18n("Timer is running") : i18n("Use mouse wheel to change digits or choose from predefined timers in the context menu");
}
}
function resetOpacity() {
timerDigits.opacity = 1.0;
}
PlasmaCore.ToolTipArea {
anchors.fill: parent
mainText: Plasmoid.toolTipMainText
subText: Plasmoid.toolTipSubText;
}
Component.onCompleted: {
root.opacityNeedsReset.connect(resetOpacity);
}
......
......@@ -37,7 +37,7 @@ Item {
if (showTitle && title != "") {
timerName = title;
} else {
timerName = i18n("Timer");
timerName = Plasmoid.title;
}
var toolTipText = "";
......@@ -48,7 +48,7 @@ Item {
}
return toolTipText;
}
Plasmoid.toolTipSubText: i18np("Remaining time left: %1 second", "Remaining time left: %1 seconds", seconds);
Plasmoid.toolTipSubText: running ? i18np("Remaining time left: %1 second", "Remaining time left: %1 seconds", seconds) : i18n("Use mouse wheel to change digits or choose from predefined timers in the context menu");
Plasmoid.preferredRepresentation: Plasmoid.compactRepresentation
Plasmoid.compactRepresentation: TimerView { }
......@@ -190,6 +190,5 @@ Item {
function action_timerReset() {
resetTimer();
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment