1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

Merge pull request #9 from jmc-88/master

Small usability improvements
This commit is contained in:
nowrep 2011-10-15 01:05:54 -07:00
commit 091e749be3
3 changed files with 17 additions and 0 deletions

View File

@ -104,6 +104,8 @@ void WebSearchBar::focusInEvent(QFocusEvent* e)
if (text() == search) {
clear();
} else {
selectAll();
}
QLineEdit::focusInEvent(e);
}

View File

@ -230,3 +230,17 @@ void TabBar::mouseDoubleClickEvent(QMouseEvent* event)
}
QTabBar::mouseDoubleClickEvent(event);
}
void TabBar::mousePressEvent(QMouseEvent* event)
{
TabWidget* tabWidget = qobject_cast<TabWidget*>(parentWidget());
if (!tabWidget)
return;
int id = tabAt(event->pos());
if (id != -1 && event->buttons() == Qt::MiddleButton) {
tabWidget->closeTab(id);
return;
}
QTabBar::mousePressEvent(event);
}

View File

@ -70,6 +70,7 @@ private slots:
private:
void mouseDoubleClickEvent(QMouseEvent* event);
void mousePressEvent(QMouseEvent* event);
QSize tabSizeHint(int index) const;
// void tabInserted(int index);