Ben wrote:
> I was wondering what the best way is to have Leo start without showing the statusbar, minibuffer, and iconbar.
Looking at the dw.construct method I see that it's (mostly) easy to toggle various of the screen in Leo's Qt gui. Here is tested code:
dw = c.frame.top # The DynamicWindow class
Icon bar
w = dw.iconBar # A PyQt6.QtWidgets.QToolBar object
w.hide() # Hides the icon bar. w.show() shows the icon bar.
Status bar
w = dw.statusBar # A PyQt6.QtWidgets.QStatusBar object
w.hide() # Hides the status bar. w.show() shows the status bar.
Minibuffer
Hiding the minibuffer takes a bit more work. The dw.createMiniBuffer method creates a QFrame whose name is minibufferFrame.
Heh. At the end of dw.createMiniBuffer are two commented-out lines:
# self.leo_minibuffer_frame = frame
# self.leo_minibuffer_layout = layout
I have no idea why I restricted the visibility of these widgets! The following works after defining the leo_minibuffer_frame ivar:
w = dw.leo_minibuffer_frame # A PyQt6.QtWidgets.QFrame
w.show()
# Hides the minibuffer. w.show() shows the minibuffer
Summary
Interesting question. A new PR will define the leo_minibuffer_frame ivar and various show/hide/toggle commands.
Edward