stepanzubkov / where-is-my-sddm-theme

:eyes: The most minimalistic and highly customizable SDDM theme.
MIT License
191 stars 10 forks source link

[FEATURE] added cursor blinking animation option #35

Closed aliqut closed 2 months ago

aliqut commented 2 months ago

I added an option to theme.conf to enable or disable a cursor blinking animation.

aliqut commented 2 months ago
SequentialAnimation on color {
                        loops: Animation.Infinite
                        ColorAnimation { from: "#00000000"; to: config.stringValue("passwordCursorColor") || textColor; duration: 0 }
                        PauseAnimation { duration: 500 }
                        ColorAnimation { from: config.stringValue("passwordCursorColor") || textColor; to: "#00000000"; duration: 0 }
                        PauseAnimation { duration: 500 }
                        running: config.boolValue("cursorBlinkAnimation")
                }

I've tried "transparent", and tried "#00000000", but for some reason, both don't work as expected. I'm not very familiar with QtQuick, any idea why it isn't working?

stepanzubkov commented 2 months ago

The reason was in ColorAnimation order. I reorder them and it is working. But it is still not working with random and constantRandom cursor colors.

stepanzubkov commented 2 months ago

But it is still not working with random and constantRandom cursor colors. Fixed.

stepanzubkov commented 2 months ago

I added a small pause of 100ms before the animation started, because there was a weird bug when color property was not loaded at the time when the animation started (I think that was the problem)