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
|
@ -121,9 +121,12 @@ void FileTransferWidget::acceptTransfer(const QString &filepath)
|
|||
|
||||
void FileTransferWidget::setColor(const QColor &c, bool whiteFont)
|
||||
{
|
||||
colorAnimation->setStartValue(color);
|
||||
colorAnimation->setEndValue(c);
|
||||
colorAnimation->start();
|
||||
if(c != color)
|
||||
{
|
||||
colorAnimation->setStartValue(color);
|
||||
colorAnimation->setEndValue(c);
|
||||
colorAnimation->start();
|
||||
}
|
||||
|
||||
setProperty("fontColor", whiteFont ? "white" : "black");
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user