diff options
author | Micah Lee <micah@micahflee.com> | 2021-08-20 14:43:21 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-20 14:43:21 -0700 |
commit | b66e742bc20ae977232fc53f22d485c10173ac2f (patch) | |
tree | c6eb66c340c34b45bac5525350c5eb5c43fe33a6 /desktop/src/onionshare/tab/mode/chat_mode/__init__.py | |
parent | 76104671c3eacbef53ad96fffd8a57512ab2d093 (diff) | |
parent | 02254b13bb4818745193092f2144fd83726d79e7 (diff) | |
download | onionshare-b66e742bc20ae977232fc53f22d485c10173ac2f.tar.gz onionshare-b66e742bc20ae977232fc53f22d485c10173ac2f.zip |
Merge pull request #1395 from onionshare/developv2.3.3
Version 2.3.3, merge develop into stable
Diffstat (limited to 'desktop/src/onionshare/tab/mode/chat_mode/__init__.py')
-rw-r--r-- | desktop/src/onionshare/tab/mode/chat_mode/__init__.py | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/desktop/src/onionshare/tab/mode/chat_mode/__init__.py b/desktop/src/onionshare/tab/mode/chat_mode/__init__.py index 2312a64e..fe3e69f1 100644 --- a/desktop/src/onionshare/tab/mode/chat_mode/__init__.py +++ b/desktop/src/onionshare/tab/mode/chat_mode/__init__.py @@ -18,19 +18,13 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ -import os -import random -import string - from PySide2 import QtCore, QtWidgets, QtGui -from onionshare_cli.onion import * -from onionshare_cli.common import Common from onionshare_cli.web import Web from .. import Mode from .... import strings -from ....widgets import MinimumWidthWidget +from ....widgets import MinimumSizeWidget from ....gui_common import GuiCommon @@ -68,6 +62,11 @@ class ChatMode(Mode): self.image = QtWidgets.QWidget() self.image.setLayout(image_layout) + # Set title placeholder + self.mode_settings_widget.title_lineedit.setPlaceholderText( + strings._("gui_tab_name_chat") + ) + # Server status self.server_status.set_mode("chat") self.server_status.server_started_finished.connect(self.update_primary_action) @@ -83,17 +82,16 @@ class ChatMode(Mode): # Top bar top_bar_layout = QtWidgets.QHBoxLayout() - top_bar_layout.addStretch() + # Add space at the top, same height as the toggle history bar in other modes + top_bar_layout.addWidget(MinimumSizeWidget(0, 30)) # Main layout self.main_layout = QtWidgets.QVBoxLayout() self.main_layout.addLayout(top_bar_layout) - self.main_layout.addStretch() self.main_layout.addWidget(header_label) - self.main_layout.addWidget(self.primary_action) + self.main_layout.addWidget(self.primary_action, stretch=1) self.main_layout.addWidget(self.server_status) - self.main_layout.addStretch() - self.main_layout.addWidget(MinimumWidthWidget(700)) + self.main_layout.addWidget(MinimumSizeWidget(700, 0)) # Column layout self.column_layout = QtWidgets.QHBoxLayout() |