forked from qt-creator/qt-creator
Terminal: Add search
* Adds new search widget to terminal * Adds new theme color "TerminalFindMatch" * Fixes ESC key handling in terminal Fixes: QTCREATORBUG-28946 Change-Id: I7b6057d13902a94a6bcd41dde6cc8ba8418cd585 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -33,6 +33,8 @@ TerminalPane::TerminalPane(QObject *parent)
|
||||
, m_tabWidget(new QTabWidget)
|
||||
{
|
||||
setupContext("Terminal.Pane", m_tabWidget);
|
||||
setZoomButtonsEnabled(true);
|
||||
|
||||
TerminalCommands::instance().init(Core::Context("Terminal.Pane"));
|
||||
|
||||
connect(this, &IOutputPane::zoomInRequested, this, [this] {
|
||||
@@ -47,16 +49,18 @@ TerminalPane::TerminalPane(QObject *parent)
|
||||
QAction &newTerminal = TerminalCommands::instance().paneActions().newTerminal;
|
||||
QAction &closeTerminal = TerminalCommands::instance().paneActions().closeTerminal;
|
||||
|
||||
newTerminal.setIcon(Icon({
|
||||
{":/terminal/images/terminal.png", Theme::IconsBaseColor},
|
||||
{":/utils/images/iconoverlay_add_small.png", Theme::IconsRunToolBarColor}}).icon());
|
||||
newTerminal.setIcon(
|
||||
Icon({{":/terminal/images/terminal.png", Theme::IconsBaseColor},
|
||||
{":/utils/images/iconoverlay_add_small.png", Theme::IconsRunToolBarColor}})
|
||||
.icon());
|
||||
newTerminal.setToolTip(Tr::tr("Create a new Terminal."));
|
||||
|
||||
connect(&newTerminal, &QAction::triggered, this, [this] { openTerminal({}); });
|
||||
|
||||
closeTerminal.setIcon(Icon({
|
||||
{":/terminal/images/terminal.png", Theme::IconsBaseColor},
|
||||
{":/utils/images/iconoverlay_close_small.png", Theme::IconsStopToolBarColor}}).icon());
|
||||
closeTerminal.setIcon(
|
||||
Icon({{":/terminal/images/terminal.png", Theme::IconsBaseColor},
|
||||
{":/utils/images/iconoverlay_close_small.png", Theme::IconsStopToolBarColor}})
|
||||
.icon());
|
||||
closeTerminal.setToolTip(Tr::tr("Close the current Terminal."));
|
||||
closeTerminal.setEnabled(false);
|
||||
|
||||
@@ -289,12 +293,6 @@ void TerminalPane::clearContents()
|
||||
t->clearContents();
|
||||
}
|
||||
|
||||
void TerminalPane::visibilityChanged(bool visible)
|
||||
{
|
||||
if (visible)
|
||||
TerminalCommands::instance().registerOpenCloseTerminalPaneCommand();
|
||||
}
|
||||
|
||||
void TerminalPane::setFocus()
|
||||
{
|
||||
if (const auto t = currentTerminal())
|
||||
|
||||
Reference in New Issue
Block a user