Skip to content
This repository has been archived by the owner on May 10, 2018. It is now read-only.

Small usability improvements #9

Merged
merged 2 commits into from
Oct 15, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/navigation/websearchbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ void WebSearchBar::focusInEvent(QFocusEvent* e)

if (text() == search) {
clear();
} else {
selectAll();
}
QLineEdit::focusInEvent(e);
}
Expand Down
14 changes: 14 additions & 0 deletions src/webview/tabbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
1 change: 1 addition & 0 deletions src/webview/tabbar.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ private slots:

private:
void mouseDoubleClickEvent(QMouseEvent* event);
void mousePressEvent(QMouseEvent* event);
QSize tabSizeHint(int index) const;
// void tabInserted(int index);

Expand Down