aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2022-05-06 10:18:38 +0200
committerEike Ziller <eike.ziller@qt.io>2022-05-06 13:20:46 +0000
commit61282a893fd50ef52529aea5a961cdb5dd28ffdc (patch)
tree0730326292adc0a0ab6a1e50ffe903f8ce6b11e5
parent2e0633907f3dbb3035bc7204194d2c20c7d42796 (diff)
Make "X occurrences replaced" indicator less annoying
- make smaller - make transparent for mouse events - reduce opacity Affects a few other indicators too (zoom, -presentationMode). Fixes: QTCREATORBUG-27513 Change-Id: Iec516202e047c5d9aa0a0b8cab42891c9bac5be3 Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
-rw-r--r--src/libs/utils/fadingindicator.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libs/utils/fadingindicator.cpp b/src/libs/utils/fadingindicator.cpp
index 31ebbb7916..0d6f4ff89e 100644
--- a/src/libs/utils/fadingindicator.cpp
+++ b/src/libs/utils/fadingindicator.cpp
@@ -47,13 +47,14 @@ public:
FadingIndicatorPrivate(QWidget *parent, FadingIndicator::TextSize size)
: QWidget(parent)
{
+ setAttribute(Qt::WA_TransparentForMouseEvents, true);
m_effect = new QGraphicsOpacityEffect(this);
setGraphicsEffect(m_effect);
m_effect->setOpacity(.999);
m_label = new QLabel;
QFont font = m_label->font();
- font.setPixelSize(size == FadingIndicator::LargeText ? 45 : 22);
+ font.setPixelSize(size == FadingIndicator::LargeText ? 30 : 18);
m_label->setFont(font);
QPalette pal = palette();
pal.setColor(QPalette::WindowText, pal.color(QPalette::Window));
@@ -67,6 +68,7 @@ public:
{
m_pixmap = QPixmap();
m_label->setText(text);
+ m_effect->setOpacity(.6); // because of the fat opaque background color
layout()->setSizeConstraint(QLayout::SetFixedSize);
adjustSize();
QWidget *parent = parentWidget();