Close the current tab when the tabbar itself is clicked
This commit is contained in:
parent
3125b69d19
commit
c3e6222296
@ -47,6 +47,8 @@ Changed
|
|||||||
to frequent crashes due to a Qt bug.
|
to frequent crashes due to a Qt bug.
|
||||||
- stdin is now closed immediately for processes spawned from qutebrowser
|
- stdin is now closed immediately for processes spawned from qutebrowser
|
||||||
- When ui -> message-timeout is set to 0, messages are now never cleared.
|
- When ui -> message-timeout is set to 0, messages are now never cleared.
|
||||||
|
- Middle/right-clicking the blank parts of the tab bar (when vertical) now
|
||||||
|
closes the current tab.
|
||||||
|
|
||||||
Fixed
|
Fixed
|
||||||
~~~~~
|
~~~~~
|
||||||
|
@ -395,11 +395,12 @@ class TabBar(QTabBar):
|
|||||||
button = config.get('tabs', 'close-mouse-button')
|
button = config.get('tabs', 'close-mouse-button')
|
||||||
if (e.button() == Qt.RightButton and button == 'right' or
|
if (e.button() == Qt.RightButton and button == 'right' or
|
||||||
e.button() == Qt.MiddleButton and button == 'middle'):
|
e.button() == Qt.MiddleButton and button == 'middle'):
|
||||||
|
e.accept()
|
||||||
idx = self.tabAt(e.pos())
|
idx = self.tabAt(e.pos())
|
||||||
if idx != -1:
|
if idx == -1:
|
||||||
e.accept()
|
idx = self.currentIndex()
|
||||||
self.tabCloseRequested.emit(idx)
|
self.tabCloseRequested.emit(idx)
|
||||||
return
|
return
|
||||||
super().mousePressEvent(e)
|
super().mousePressEvent(e)
|
||||||
|
|
||||||
def minimumTabSizeHint(self, index):
|
def minimumTabSizeHint(self, index):
|
||||||
|
Loading…
Reference in New Issue
Block a user