| The Following User Says Thank You to Markkyboy For This Useful Post: | ||
Connections {
target: Lipstick.compositor
onDisplayOn: {
// do what you want here
}
}
| The Following User Says Thank You to Markkyboy For This Useful Post: | ||
| The Following 2 Users Say Thank You to coderus For This Useful Post: | ||
Rectangle {
id: rect
width: 540; height: 54
color: "transparent"
anchors {
horizontalCenter: parent.horizontalCenter
bottom: parent.bottom
}
Text {
id: greetingText
color: Theme.primaryColor
font { pixelSize: Theme.fontSizeMedium; capitalization: Font.Capitalize; }
anchors {
horizontalCenter: parent.horizontalCenter
bottom: parent.bottom
bottomMargin: Theme.paddingMedium
}
text: { updatesEnabled: timeText.time
var greetingText;
var time = new Date().getHours();
if (time >= 0 && time < 12){
greetingText = "good <b>morning</b>";
} else if (time >= 12 && time < 16){
greetingText = "good <b>afternoon</b>";
} else if (time >= 16 && time < 21){
greetingText = "good <b>evening</b>";
} else if (time >= 21 && time < 24){
greetingText = "good <b>night</b>";
}
}
OpacityAnimator on opacity {
from: 1.0; to: 0.0;
duration: 20000;
loops: Animation.Running }
}
}
}
}
| The Following User Says Thank You to Markkyboy For This Useful Post: | ||
| The Following User Says Thank You to Markkyboy For This Useful Post: | ||
Text {
id: exampleText
text: "let's fade me out"
opacity: 0
Behavior on opacity { PropertyAnimation { duration: 5000; easing.type: Easing.InOutQuart} }
}
Timer {
id: thisChangesthePropertyAtSomePoint
running: true
interval: 1000
onTriggered: { exampleText.opacity = 1;}
}
Text {
id: greetingText
font { pixelSize: Theme.fontSizeMedium; capitalization: Font.Capitalize }
anchors {
bottom: parent.bottom
bottomMargin: Theme.paddingMedium
horizontalCenter: parent.horizontalCenter
}
text: { updatesEnabled: timeText.time
var greetingText;
var time = new Date().getHours();
if (time >= 0 && time < 12){
greetingText = "good <b>morning</b>";
} else if (time >= 12 && time < 16){
greetingText = "good <b>afternoon</b>";
} else if (time >= 16 && time < 21){
greetingText = "good <b>evening</b>";
} else if (time >= 21 && time < 24){
greetingText = "good <b>night</b>";
}
}
SequentialAnimation on color {
id: fadeGreetingTextInOut
running: greetingText.text
ColorAnimation { from: "#00000000"; to: "#FFFFFFFF"; duration: 15000; easing.type: Easing.InLinear }
PauseAnimation { duration: 10000 }
ColorAnimation { from: "#FFFFFFFF"; to: "#00000000"; duration: 15000; easing.type: Easing.OutLinear }
}
}
| The Following 4 Users Say Thank You to Markkyboy For This Useful Post: | ||