Add global notification area and use for UI Tour info

Adds a global info bar display above the main window's status bar that
can be accessed via ICore::infoBar().

Replace the blocking "Take UI Tour" dialog by a notification there.

Fixes: QTCREATORBUG-22819
Change-Id: I733f1bfd2d1db0295754ed2e28bb202f927d0edb
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
Eike Ziller
2019-08-07 12:44:40 +02:00
parent eb2f49c398
commit c67ed4d35b
10 changed files with 67 additions and 25 deletions

View File

@@ -30,7 +30,6 @@
#include <utils/theme/theme.h>
#include <utils/utilsicons.h>
#include <QFrame>
#include <QHBoxLayout>
#include <QSettings>
#include <QVBoxLayout>
@@ -207,6 +206,17 @@ void InfoBarDisplay::setInfoBar(InfoBar *infoBar)
update();
}
void InfoBarDisplay::setStyle(QFrame::Shadow style)
{
m_style = style;
update();
}
InfoBar *InfoBarDisplay::infoBar() const
{
return m_infoBar;
}
void InfoBarDisplay::infoBarDestroyed()
{
m_infoBar = nullptr;
@@ -236,7 +246,7 @@ void InfoBarDisplay::update()
}
infoWidget->setPalette(pal);
infoWidget->setFrameStyle(QFrame::Panel | QFrame::Raised);
infoWidget->setFrameStyle(QFrame::Panel | m_style);
infoWidget->setLineWidth(1);
infoWidget->setAutoFillBackground(true);