Fix initial button flickering in Plastik QML

Disable animations till the decoration is completel loaded. This
ensures that the buttons do not flicker because of the animation from
black to their respective color.
This commit is contained in:
Martin Gräßlin 2012-09-27 17:12:31 +02:00
parent 728b47ef07
commit ae99d9bc6e

View file

@ -59,6 +59,7 @@ Decoration {
} }
root.animateButtons = decoration.readConfig("animateButtons", true); root.animateButtons = decoration.readConfig("animateButtons", true);
root.titleShadow = decoration.readConfig("titleShadow", true); root.titleShadow = decoration.readConfig("titleShadow", true);
root.animationDuration = 150;
} }
ColorHelper { ColorHelper {
id: colorHelper id: colorHelper
@ -70,7 +71,8 @@ Decoration {
property alias buttonSize: titleRow.captionHeight property alias buttonSize: titleRow.captionHeight
property alias titleAlignment: caption.horizontalAlignment property alias titleAlignment: caption.horizontalAlignment
property color titleBarColor: options.titleBarColor property color titleBarColor: options.titleBarColor
property int animationDuration: 150 // set by readConfig after Component completed, ensures that buttons do not flicker
property int animationDuration: 0
property bool animateButtons: true property bool animateButtons: true
property bool titleShadow: true property bool titleShadow: true
Behavior on titleBarColor { Behavior on titleBarColor {