statusbar: mode_text config option
This commit is contained in:
parent
c0216a1309
commit
aa7c56280a
|
|
@ -2195,6 +2195,11 @@ statusbar.widgets:
|
|||
default: ['keypress', 'search_match', 'url', 'scroll', 'history', 'tabs', 'progress']
|
||||
desc: "List of widgets displayed in the statusbar."
|
||||
|
||||
statusbar.mode_text:
|
||||
default: true
|
||||
type: Bool
|
||||
desc: Show a text widget with the current input mode in the statusbar
|
||||
|
||||
## tabs
|
||||
|
||||
tabs.background:
|
||||
|
|
|
|||
|
|
@ -174,6 +174,8 @@ class StatusBar(QWidget):
|
|||
|
||||
self.txt = textbase.TextBase()
|
||||
self._stack.addWidget(self.txt)
|
||||
if not config.val.statusbar.mode_text:
|
||||
self.txt.hide()
|
||||
|
||||
self.cmd.show_cmd.connect(self._show_cmd_widget)
|
||||
self.cmd.hide_cmd.connect(self._hide_cmd_widget)
|
||||
|
|
@ -232,6 +234,11 @@ class StatusBar(QWidget):
|
|||
self._set_hbox_padding()
|
||||
elif option == 'statusbar.widgets':
|
||||
self._draw_widgets()
|
||||
elif option == 'statusbar.mode_text':
|
||||
if not config.val.statusbar.mode_text:
|
||||
self.txt.hide()
|
||||
else:
|
||||
self.txt.show()
|
||||
|
||||
def _draw_widgets(self):
|
||||
"""Draw statusbar widgets."""
|
||||
|
|
|
|||
Loading…
Reference in New Issue