diff options
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() |