forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user