forked from qt-creator/qt-creator
Fix size of fading indicator
In some situations text could be cut off. Change-Id: Ib7499e679a9a9e048d217306c525b04eaf330967 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -71,6 +71,7 @@ public:
|
||||
{
|
||||
m_pixmap = QPixmap();
|
||||
m_label->setText(text);
|
||||
layout()->setSizeConstraint(QLayout::SetFixedSize);
|
||||
adjustSize();
|
||||
if (QWidget *parent = parentWidget())
|
||||
move(parent->rect().center() - rect().center());
|
||||
@@ -80,6 +81,7 @@ public:
|
||||
{
|
||||
m_label->hide();
|
||||
m_pixmap.load(Utils::StyleHelper::dpiSpecificImageFile(uri));
|
||||
layout()->setSizeConstraint(QLayout::SetNoConstraint);
|
||||
resize(m_pixmap.size() / m_pixmap.devicePixelRatio());
|
||||
if (QWidget *parent = parentWidget())
|
||||
move(parent->rect().center() - rect().center());
|
||||
|
Reference in New Issue
Block a user