forked from qt-creator/qt-creator
Core: Add find bar to the general message pane.
Change-Id: I4e3749615dc02f7f4bd22ff36f9178dfdac44a83 Reviewed-by: David Schulz <david.schulz@digia.com> Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -31,6 +31,9 @@
|
||||
#include "outputwindow.h"
|
||||
#include "icontext.h"
|
||||
#include "coreconstants.h"
|
||||
#include "find/basetextfind.h"
|
||||
|
||||
#include <aggregation/aggregate.h>
|
||||
|
||||
using namespace Core::Internal;
|
||||
|
||||
@@ -38,6 +41,17 @@ MessageOutputWindow::MessageOutputWindow()
|
||||
{
|
||||
m_widget = new Core::OutputWindow(Core::Context(Core::Constants::C_GENERAL_OUTPUT_PANE));
|
||||
m_widget->setReadOnly(true);
|
||||
// Let selected text be colored as if the text edit was editable,
|
||||
// otherwise the highlight for searching is too light
|
||||
QPalette p = m_widget->palette();
|
||||
QColor activeHighlight = p.color(QPalette::Active, QPalette::Highlight);
|
||||
p.setColor(QPalette::Highlight, activeHighlight);
|
||||
QColor activeHighlightedText = p.color(QPalette::Active, QPalette::HighlightedText);
|
||||
p.setColor(QPalette::HighlightedText, activeHighlightedText);
|
||||
m_widget->setPalette(p);
|
||||
Aggregation::Aggregate *agg = new Aggregation::Aggregate;
|
||||
agg->add(m_widget);
|
||||
agg->add(new Core::BaseTextFind(m_widget));
|
||||
}
|
||||
|
||||
MessageOutputWindow::~MessageOutputWindow()
|
||||
|
||||
Reference in New Issue
Block a user