The Following User Says Thank You to Markkyboy For This Useful Post: | ||
![]() |
2017-04-01
, 19:15
|
|
Posts: 6,436 |
Thanked: 12,701 times |
Joined on Nov 2011
@ Ängelholm, Sweden
|
#2
|
Connections { target: Lipstick.compositor onDisplayOn: { // do what you want here } }
![]() |
2017-04-01
, 20:44
|
|
Posts: 433 |
Thanked: 727 times |
Joined on Oct 2012
@ Costa Blanca, Espaņa
|
#3
|
The Following User Says Thank You to Markkyboy For This Useful Post: | ||
![]() |
2017-04-02
, 01:13
|
|
Posts: 6,436 |
Thanked: 12,701 times |
Joined on Nov 2011
@ Ängelholm, Sweden
|
#4
|
The Following 2 Users Say Thank You to coderus For This Useful Post: | ||
![]() |
2017-04-02
, 14:12
|
|
Posts: 433 |
Thanked: 727 times |
Joined on Oct 2012
@ Costa Blanca, Espaņa
|
#5
|
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: | ||
![]() |
2017-04-02
, 14:23
|
|
Posts: 6,436 |
Thanked: 12,701 times |
Joined on Nov 2011
@ Ängelholm, Sweden
|
#6
|
![]() |
2017-04-02
, 14:40
|
|
Posts: 433 |
Thanked: 727 times |
Joined on Oct 2012
@ Costa Blanca, Espaņa
|
#7
|
The Following User Says Thank You to Markkyboy For This Useful Post: | ||
![]() |
2017-04-02
, 22:22
|
|
Posts: 394 |
Thanked: 1,341 times |
Joined on Dec 2009
|
#8
|
I also think I need to move away from OpacityAnimator as my fade method.
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;} }
![]() |
2017-04-12
, 09:00
|
|
Posts: 433 |
Thanked: 727 times |
Joined on Oct 2012
@ Costa Blanca, Espaņa
|
#9
|
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: | ||
I've been playing around with a greeting message that appears on my lockscreen.
The greeting is simply; Good morning, Good afternoon, Good evening and Good night at certain hours.
My text fades out after a given time of seeing the lockscreen. I would like to make this action repeatable, in other words, every time I see the lockscreen, my greeting message shows again.
I'm adding my code to 'Clock.qml', found in /.../lipstick-jolla-home-qt5/lockscreen/* for this purpose and all is working well, but I'd like the greeting to appear on each 'visit' to the lockscreen.
What do I need to add to my code to 'trigger' my greeting each time the lockscreen is visible?
I'm using 'Rectangle' with transparent background to allow my text to fade away, adding 'OpacityAnimator on opacity' to do the fade. I've tried various ways to use 'Timer' but to no avail.......I have tried many ways, but nothing is working so far......
Any ideas/input gratefully received
Regards,
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
Last edited by Markkyboy; 2017-04-15 at 14:42.