From 2c11a95da6772a63d85905d4712a1a2d016a9e1e Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 6 Feb 2010 01:49:54 +0100 Subject: FIx focus on browsing (FIRST STEP) and on findbar hiding --- src/findbar.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/findbar.cpp') diff --git a/src/findbar.cpp b/src/findbar.cpp index bd1a5137..9efb9c6a 100644 --- a/src/findbar.cpp +++ b/src/findbar.cpp @@ -143,12 +143,6 @@ void FindBar::show() void FindBar::keyPressEvent(QKeyEvent* event) { - if (event->key() == Qt::Key_Escape) - { - hide(); - m_hideTimer->stop(); - return; - } if (event->key() == Qt::Key_Return && !m_lineEdit->text().isEmpty()) { emit searchString(m_lineEdit->text()); @@ -158,6 +152,7 @@ void FindBar::keyPressEvent(QKeyEvent* event) QWidget::keyPressEvent(event); } + void FindBar::notifyMatch(bool match) { QPalette p = m_lineEdit->palette(); @@ -180,3 +175,11 @@ void FindBar::notifyMatch(bool match) m_lineEdit->setPalette(p); m_hideTimer->start(60000); } + + + +void FindBar::hide() +{ + m_hideTimer->stop(); + QWidget::hide(); +} -- cgit v1.2.1