Utils: Make the progress indicator themable

Ensures a consistent visibility with light and dark backgrounds.

Change-Id: I8e825ccf05248abb2c94c4cd3af56d0226bc7e96
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Alessandro Portale
2017-06-06 18:01:39 +02:00
parent 0316219f8d
commit 646abdd445
8 changed files with 30 additions and 5 deletions

View File

@@ -25,6 +25,7 @@
#include "progressindicator.h"
#include "icon.h"
#include "qtcassert.h"
#include "stylehelper.h"
@@ -62,8 +63,8 @@ void ProgressIndicator::setIndicatorSize(ProgressIndicator::IndicatorSize size)
m_size = size;
m_rotationStep = size == Small ? 45 : 30;
m_timer.setInterval(size == Small ? 100 : 80);
m_pixmap.load(StyleHelper::dpiSpecificImageFile(
imageFileNameForIndicatorSize(size)));
m_pixmap = Icon({{imageFileNameForIndicatorSize(size),
Theme::PanelTextColorMid}}, Icon::Tint).pixmap();
updateGeometry();
}