mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
commit
091e749be3
@ -104,6 +104,8 @@ void WebSearchBar::focusInEvent(QFocusEvent* e)
|
|||||||
|
|
||||||
if (text() == search) {
|
if (text() == search) {
|
||||||
clear();
|
clear();
|
||||||
|
} else {
|
||||||
|
selectAll();
|
||||||
}
|
}
|
||||||
QLineEdit::focusInEvent(e);
|
QLineEdit::focusInEvent(e);
|
||||||
}
|
}
|
||||||
|
@ -230,3 +230,17 @@ void TabBar::mouseDoubleClickEvent(QMouseEvent* event)
|
|||||||
}
|
}
|
||||||
QTabBar::mouseDoubleClickEvent(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);
|
||||||
|
}
|
||||||
|
@ -70,6 +70,7 @@ private slots:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void mouseDoubleClickEvent(QMouseEvent* event);
|
void mouseDoubleClickEvent(QMouseEvent* event);
|
||||||
|
void mousePressEvent(QMouseEvent* event);
|
||||||
QSize tabSizeHint(int index) const;
|
QSize tabSizeHint(int index) const;
|
||||||
// void tabInserted(int index);
|
// void tabInserted(int index);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user