Clear notification messages in a window when they're clicked.
This commit is contained in:
parent
0b5838f9fd
commit
87c4c143bf
@ -407,6 +407,10 @@ def data(readonly=False):
|
|||||||
SettingValue(typ.Bool(), 'true'),
|
SettingValue(typ.Bool(), 'true'),
|
||||||
"Show a filebrowser in upload/download prompts."),
|
"Show a filebrowser in upload/download prompts."),
|
||||||
|
|
||||||
|
('clear-messages-on-click',
|
||||||
|
SettingValue(typ.Bool(), 'false'),
|
||||||
|
"Whether to clear message notifications when they are clicked."),
|
||||||
|
|
||||||
readonly=readonly
|
readonly=readonly
|
||||||
)),
|
)),
|
||||||
|
|
||||||
|
@ -130,3 +130,8 @@ class MessageView(QWidget):
|
|||||||
self._last_text = text
|
self._last_text = text
|
||||||
self.show()
|
self.show()
|
||||||
self.update_geometry.emit()
|
self.update_geometry.emit()
|
||||||
|
|
||||||
|
def mousePressEvent(self, e):
|
||||||
|
if (config.get('ui', 'clear-messages-on-click') and
|
||||||
|
e.button() in [Qt.LeftButton, Qt.RightButton]):
|
||||||
|
self.clear_messages()
|
||||||
|
Loading…
Reference in New Issue
Block a user