mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-14 08:49:47 -05:00
Final few tweaks to make this look perfect in macOS
This commit is contained in:
parent
beda37df06
commit
753380663b
@ -89,7 +89,7 @@ class FileList(QtWidgets.QListWidget):
|
|||||||
self.setAcceptDrops(True)
|
self.setAcceptDrops(True)
|
||||||
self.setIconSize(QtCore.QSize(32, 32))
|
self.setIconSize(QtCore.QSize(32, 32))
|
||||||
self.setSortingEnabled(True)
|
self.setSortingEnabled(True)
|
||||||
self.setMinimumHeight(205)
|
self.setMinimumHeight(160)
|
||||||
self.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
|
self.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
|
||||||
self.drop_here_image = DropHereLabel(self.common, self, True)
|
self.drop_here_image = DropHereLabel(self.common, self, True)
|
||||||
self.drop_here_text = DropHereLabel(self.common, self, False)
|
self.drop_here_text = DropHereLabel(self.common, self, False)
|
||||||
@ -261,6 +261,7 @@ class FileList(QtWidgets.QListWidget):
|
|||||||
|
|
||||||
# Item info widget, with a white background
|
# Item info widget, with a white background
|
||||||
item_info_layout = QtWidgets.QHBoxLayout()
|
item_info_layout = QtWidgets.QHBoxLayout()
|
||||||
|
item_info_layout.setContentsMargins(0, 0, 0, 0)
|
||||||
item_info_layout.addWidget(item_size)
|
item_info_layout.addWidget(item_size)
|
||||||
item_info_layout.addWidget(item.item_button)
|
item_info_layout.addWidget(item.item_button)
|
||||||
item_info = QtWidgets.QWidget()
|
item_info = QtWidgets.QWidget()
|
||||||
|
@ -46,7 +46,7 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||||||
self.common = common
|
self.common = common
|
||||||
self.common.log('OnionShareGui', '__init__')
|
self.common.log('OnionShareGui', '__init__')
|
||||||
self.setMinimumWidth(820)
|
self.setMinimumWidth(820)
|
||||||
self.setMinimumHeight(650)
|
self.setMinimumHeight(660)
|
||||||
|
|
||||||
self.onion = onion
|
self.onion = onion
|
||||||
self.qtapp = qtapp
|
self.qtapp = qtapp
|
||||||
|
@ -142,12 +142,12 @@ class ServerStatus(QtWidgets.QWidget):
|
|||||||
When the widget is resized, try and adjust the display of a v3 onion URL.
|
When the widget is resized, try and adjust the display of a v3 onion URL.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
self.get_url()
|
# Wrap the URL label
|
||||||
url_length=len(self.get_url())
|
url_length=len(self.get_url())
|
||||||
if url_length > 60:
|
if url_length > 60:
|
||||||
width = self.frameGeometry().width()
|
width = self.frameGeometry().width()
|
||||||
if width < 530:
|
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)
|
self.url.setText(wrapped_onion_url)
|
||||||
else:
|
else:
|
||||||
self.url.setText(self.get_url())
|
self.url.setText(self.get_url())
|
||||||
|
Loading…
Reference in New Issue
Block a user