Added 'Compact View' Action
This commit is contained in:
parent
1e3da9e68f
commit
f2501c91a5
@ -702,6 +702,7 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow):
|
||||
lambda pos: self.open_tools_context_menu(self.toolbar, pos))
|
||||
self.action_menubar.toggled.connect(self.showhide_menubar)
|
||||
self.action_toolbar.toggled.connect(self.showhide_toolbar)
|
||||
self.action_compact_view.toggled.connect(self.set_compactview)
|
||||
self.logs_menu.triggered.connect(self.show_log)
|
||||
|
||||
self.table.resizeColumnsToContents()
|
||||
@ -742,6 +743,8 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow):
|
||||
self.menu_view.addSeparator()
|
||||
self.menu_view.addAction(self.action_toolbar)
|
||||
self.menu_view.addAction(self.action_menubar)
|
||||
self.menu_view.addSeparator()
|
||||
self.menu_view.addAction(self.action_compact_view)
|
||||
|
||||
try:
|
||||
self.load_manager_settings()
|
||||
@ -1390,6 +1393,12 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow):
|
||||
def action_exit_triggered(self):
|
||||
self.close()
|
||||
|
||||
def set_compactview(self, checked):
|
||||
if checked:
|
||||
self.toolbar.setToolButtonStyle(Qt.ToolButtonIconOnly)
|
||||
else:
|
||||
self.toolbar.setToolButtonStyle(Qt.ToolButtonTextUnderIcon)
|
||||
|
||||
def showhide_menubar(self, checked):
|
||||
self.menubar.setVisible(checked)
|
||||
if not checked:
|
||||
|
@ -869,6 +869,14 @@ Template</string>
|
||||
<string>Open a secure Xen console in the qube. Useful chiefly for debugging purposes: for normal operation, use "Run Terminal" from the Domains widget. </string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_compact_view">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Compact View</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../resources.qrc"/>
|
||||
|
Loading…
Reference in New Issue
Block a user