diff --git a/desktop/src/onionshare/auto_connect.py b/desktop/src/onionshare/auto_connect.py index f7e0c00a..ff456aa4 100644 --- a/desktop/src/onionshare/auto_connect.py +++ b/desktop/src/onionshare/auto_connect.py @@ -22,6 +22,7 @@ from PySide2 import QtCore, QtWidgets, QtGui from onionshare_cli.settings import Settings +from . import strings from .gui_common import GuiCommon @@ -60,19 +61,30 @@ class AutoConnect(QtWidgets.QWidget): self.image.setLayout(image_layout) # Description and checkbox - description_label = QtWidgets.QLabel("Some description about OnionShare and explain autoconnect stuff") + description_label = QtWidgets.QLabel(strings._("gui_autoconnect_description")) self.enable_autoconnect_checkbox = QtWidgets.QCheckBox() self.enable_autoconnect_checkbox.clicked.connect(self.toggle_auto_connect) self.enable_autoconnect_checkbox.setText( - "Enable automatically connecting to OnionShare" + strings._("gui_enable_autoconnect_checkbox") ) + self.enable_autoconnect_checkbox.setStyleSheet( + common.gui.css["enable_autoconnect"] + ) + description_layout = QtWidgets.QVBoxLayout() + description_layout.addWidget(description_label) + description_layout.addWidget(self.enable_autoconnect_checkbox) + description_widget = QtWidgets.QWidget() + description_widget.setLayout(description_layout) # CTA buttons - self.connect_button = QtWidgets.QPushButton("Start OnionShare") + self.connect_button = QtWidgets.QPushButton(strings._("gui_autoconnect_start")) self.connect_button.setStyleSheet( - common.gui.css["server_status_button_stopped"] + common.gui.css["autoconnect_start_button"] + ) + self.configure_button = QtWidgets.QPushButton(strings._("gui_autoconnect_configure")) + self.configure_button.setStyleSheet( + common.gui.css["autoconnect_configure_button"] ) - self.configure_button = QtWidgets.QPushButton("Configure") cta_layout = QtWidgets.QHBoxLayout() cta_layout.addWidget(self.connect_button) cta_layout.addWidget(self.configure_button) @@ -85,8 +97,7 @@ class AutoConnect(QtWidgets.QWidget): self.layout.setContentsMargins(0, 0, 0, 0) self.layout.addStretch() self.layout.addWidget(self.image) - self.layout.addWidget(description_label) - self.layout.addWidget(self.enable_autoconnect_checkbox) + self.layout.addWidget(description_widget) self.layout.addStretch() self.layout.addWidget(cta_widget) self.layout.addStretch() diff --git a/desktop/src/onionshare/gui_common.py b/desktop/src/onionshare/gui_common.py index 019cf193..c092cddd 100644 --- a/desktop/src/onionshare/gui_common.py +++ b/desktop/src/onionshare/gui_common.py @@ -147,6 +147,22 @@ class GuiCommon: QStatusBar::item { border: 0px; }""", + "autoconnect_start_button": """ + QPushButton { + background-color: #5fa416; + color: #ffffff; + padding: 10px 30px; + border: 0; + border-radius: 5px; + }""", + "autoconnect_configure_button": """ + QPushButton { + padding: 9px 29px; + }""", + "enable_autoconnect": """ + QCheckBox { + margin-top: 30px; + }""", # Common styles between modes and their child widgets "mode_settings_toggle_advanced": """ QPushButton {