Add settings button to the status bar

This commit is contained in:
Micah Lee 2019-10-27 15:26:56 -07:00
parent cb83fca6bc
commit 656d3d1564
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73
4 changed files with 12 additions and 13 deletions

View File

@ -73,9 +73,7 @@ class GuiCommon:
}""",
"settings_button": """
QPushButton {
background-color: #601f61;
border: 0;
border-left: 1px solid #69266b;
border-radius: 0;
}""",
"server_status_indicator_label": """

View File

@ -95,6 +95,18 @@ class MainWindow(QtWidgets.QMainWindow):
)
self.status_bar.addPermanentWidget(self.status_bar.server_status_indicator)
# Settings button
self.settings_button = QtWidgets.QPushButton()
self.settings_button.setDefault(False)
self.settings_button.setFixedWidth(40)
self.settings_button.setFixedHeight(50)
self.settings_button.setIcon(
QtGui.QIcon(self.common.get_resource_path("images/settings.png"))
)
self.settings_button.clicked.connect(self.open_settings)
self.settings_button.setStyleSheet(self.common.gui.css["settings_button"])
self.status_bar.addPermanentWidget(self.settings_button)
# Tabs
self.tabs = TabWidget(self.common, self.system_tray, self.status_bar)

View File

@ -103,17 +103,6 @@ class Tab(QtWidgets.QWidget):
self.new_tab.setLayout(new_tab_outer_layout)
self.new_tab.show()
# Settings button, but this is gonna disappear
self.settings_button = QtWidgets.QPushButton()
self.settings_button.setDefault(False)
self.settings_button.setFixedWidth(40)
self.settings_button.setFixedHeight(50)
self.settings_button.setIcon(
QtGui.QIcon(self.common.get_resource_path("images/settings.png"))
)
# self.settings_button.clicked.connect(self.open_settings)
self.settings_button.setStyleSheet(self.common.gui.css["settings_button"])
# Server status indicator icons
self.status_bar.server_status_image_stopped = QtGui.QImage(
self.common.get_resource_path("images/server_stopped.png")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 443 B

After

Width:  |  Height:  |  Size: 1.1 KiB