Move version label into settings dialog

This commit is contained in:
Micah Lee 2018-02-06 19:05:02 -08:00
parent 6fa095a650
commit 69fe7f0d98
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73
2 changed files with 9 additions and 8 deletions

View File

@ -102,19 +102,17 @@ class OnionShareGui(QtWidgets.QMainWindow):
self.downloads_container.hide() # downloads start out hidden
self.new_download = False
# Status bar
self.status_bar = QtWidgets.QStatusBar()
self.status_bar.setSizeGripEnabled(False)
self.status_bar.setStyleSheet(
"QStatusBar::item { border: 0px; }")
version_label = QtWidgets.QLabel('v{0:s}'.format(common.get_version()))
version_label.setStyleSheet('color: #666666')
# Settings button on the status bar
self.settings_button = QtWidgets.QPushButton()
self.settings_button.setDefault(False)
self.settings_button.setFlat(True)
self.settings_button.setIcon( QtGui.QIcon(common.get_resource_path('images/settings.png')) )
self.settings_button.clicked.connect(self.open_settings)
self.status_bar.addPermanentWidget(version_label)
# Status bar
self.status_bar = QtWidgets.QStatusBar()
self.status_bar.setSizeGripEnabled(False)
self.status_bar.setStyleSheet("QStatusBar::item { border: 0px; }")
self.status_bar.addPermanentWidget(self.settings_button)
self.setStatusBar(self.status_bar)

View File

@ -295,9 +295,12 @@ class SettingsDialog(QtWidgets.QDialog):
self.save_button.clicked.connect(self.save_clicked)
self.cancel_button = QtWidgets.QPushButton(strings._('gui_settings_button_cancel', True))
self.cancel_button.clicked.connect(self.cancel_clicked)
version_label = QtWidgets.QLabel('OnionShare {0:s}'.format(common.get_version()))
version_label.setStyleSheet('color: #666666')
self.help_button = QtWidgets.QPushButton(strings._('gui_settings_button_help', True))
self.help_button.clicked.connect(self.help_clicked)
buttons_layout = QtWidgets.QHBoxLayout()
buttons_layout.addWidget(version_label)
buttons_layout.addWidget(self.help_button)
buttons_layout.addStretch()
buttons_layout.addWidget(self.save_button)