Final few tweaks to make this look perfect in macOS

This commit is contained in:
Micah Lee 2018-10-10 18:16:08 -07:00
parent c02f6a9306
commit 6d448b7cde
3 changed files with 5 additions and 4 deletions

View file

@ -142,12 +142,12 @@ class ServerStatus(QtWidgets.QWidget):
When the widget is resized, try and adjust the display of a v3 onion URL.
"""
try:
self.get_url()
# Wrap the URL label
url_length=len(self.get_url())
if url_length > 60:
width = self.frameGeometry().width()
if width < 530:
wrapped_onion_url = textwrap.fill(self.get_url(), 50)
wrapped_onion_url = textwrap.fill(self.get_url(), 46)
self.url.setText(wrapped_onion_url)
else:
self.url.setText(self.get_url())