forked from qt-creator/qt-creator
Core: Improve readability of searchresult error messages
Task-number: QTCREATORBUG-29824 Change-Id: Ic26a6671b886d74ab2aac1d8e1baa66bd9fe7f8d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <utils/theme/theme.h>
|
#include <utils/theme/theme.h>
|
||||||
#include <utils/fancylineedit.h>
|
#include <utils/fancylineedit.h>
|
||||||
|
#include <utils/infolabel.h>
|
||||||
|
|
||||||
#include <QFrame>
|
#include <QFrame>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
@@ -93,8 +94,6 @@ SearchResultWidget::SearchResultWidget(QWidget *parent) :
|
|||||||
topLayout->addWidget(m_topReplaceWidget);
|
topLayout->addWidget(m_topReplaceWidget);
|
||||||
|
|
||||||
m_messageWidget = new QFrame;
|
m_messageWidget = new QFrame;
|
||||||
pal.setColor(QPalette::WindowText, creatorTheme()->color(Theme::TextColorError));
|
|
||||||
m_messageWidget->setPalette(pal);
|
|
||||||
if (creatorTheme()->flag(Theme::DrawSearchResultWidgetFrame)) {
|
if (creatorTheme()->flag(Theme::DrawSearchResultWidgetFrame)) {
|
||||||
m_messageWidget->setFrameStyle(QFrame::Panel | QFrame::Raised);
|
m_messageWidget->setFrameStyle(QFrame::Panel | QFrame::Raised);
|
||||||
m_messageWidget->setLineWidth(1);
|
m_messageWidget->setLineWidth(1);
|
||||||
@@ -103,8 +102,9 @@ SearchResultWidget::SearchResultWidget(QWidget *parent) :
|
|||||||
auto messageLayout = new QHBoxLayout(m_messageWidget);
|
auto messageLayout = new QHBoxLayout(m_messageWidget);
|
||||||
messageLayout->setContentsMargins(2, 2, 2, 2);
|
messageLayout->setContentsMargins(2, 2, 2, 2);
|
||||||
m_messageWidget->setLayout(messageLayout);
|
m_messageWidget->setLayout(messageLayout);
|
||||||
m_messageLabel = new QLabel;
|
m_messageLabel = new InfoLabel;
|
||||||
m_messageLabel->setPalette(pal);
|
m_messageLabel->setType(InfoLabel::Error);
|
||||||
|
m_messageLabel->setFilled(true);
|
||||||
messageLayout->addWidget(m_messageLabel);
|
messageLayout->addWidget(m_messageLabel);
|
||||||
layout->addWidget(m_messageWidget);
|
layout->addWidget(m_messageWidget);
|
||||||
m_messageWidget->setVisible(false);
|
m_messageWidget->setVisible(false);
|
||||||
|
@@ -18,6 +18,7 @@ class QToolButton;
|
|||||||
class QCheckBox;
|
class QCheckBox;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
namespace Utils { class InfoLabel; }
|
||||||
namespace Core {
|
namespace Core {
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
@@ -123,7 +124,7 @@ private:
|
|||||||
QWidget *m_descriptionContainer = nullptr;
|
QWidget *m_descriptionContainer = nullptr;
|
||||||
QLabel *m_label = nullptr;
|
QLabel *m_label = nullptr;
|
||||||
QLabel *m_searchTerm = nullptr;
|
QLabel *m_searchTerm = nullptr;
|
||||||
QLabel *m_messageLabel = nullptr;
|
Utils::InfoLabel *m_messageLabel = nullptr;
|
||||||
QToolButton *m_cancelButton = nullptr;
|
QToolButton *m_cancelButton = nullptr;
|
||||||
QLabel *m_matchesFoundLabel = nullptr;
|
QLabel *m_matchesFoundLabel = nullptr;
|
||||||
bool m_preserveCaseSupported = true;
|
bool m_preserveCaseSupported = true;
|
||||||
|
Reference in New Issue
Block a user