mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
FTW: Don't fire an animation if start- and endcolor are the same
This commit is contained in:
parent
d008b53c6f
commit
a8acb05c52
|
@ -120,10 +120,13 @@ void FileTransferWidget::acceptTransfer(const QString &filepath)
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileTransferWidget::setColor(const QColor &c, bool whiteFont)
|
void FileTransferWidget::setColor(const QColor &c, bool whiteFont)
|
||||||
|
{
|
||||||
|
if(c != color)
|
||||||
{
|
{
|
||||||
colorAnimation->setStartValue(color);
|
colorAnimation->setStartValue(color);
|
||||||
colorAnimation->setEndValue(c);
|
colorAnimation->setEndValue(c);
|
||||||
colorAnimation->start();
|
colorAnimation->start();
|
||||||
|
}
|
||||||
|
|
||||||
setProperty("fontColor", whiteFont ? "white" : "black");
|
setProperty("fontColor", whiteFont ? "white" : "black");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user