mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-27 16:29:41 -05:00
Move version label into settings dialog
This commit is contained in:
parent
6fa095a650
commit
69fe7f0d98
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user