mirror of
https://github.com/onionshare/onionshare.git
synced 2025-06-06 22:09:15 -04:00
#704 wrap the upload filename label if too long
This commit is contained in:
parent
31cdac46c6
commit
baa75cc93c
1 changed files with 3 additions and 5 deletions
|
@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
"""
|
||||
import os
|
||||
import subprocess
|
||||
import textwrap
|
||||
from datetime import datetime
|
||||
from PyQt5 import QtCore, QtWidgets, QtGui
|
||||
|
||||
|
@ -305,10 +306,7 @@ class Uploads(QtWidgets.QScrollArea):
|
|||
try:
|
||||
for upload in self.uploads.values():
|
||||
for item in upload.files.values():
|
||||
if item.filename_label_width > width:
|
||||
item.filename_label.setText(item.filename[:25] + '[...]')
|
||||
item.filename_label.setText(textwrap.fill(item.filename, 30))
|
||||
item.adjustSize()
|
||||
if width > item.filename_label_width:
|
||||
item.filename_label.setText(item.filename)
|
||||
except:
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue