From 5bf67cc5d10eca9cf976f9c9c94c81b63a97b9d0 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Sat, 10 Feb 2018 18:36:38 -0800 Subject: [PATCH] Make the drop count adjust size based on its sizeHint --- onionshare_gui/file_selection.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/onionshare_gui/file_selection.py b/onionshare_gui/file_selection.py index 72ab9c3b..b097e501 100644 --- a/onionshare_gui/file_selection.py +++ b/onionshare_gui/file_selection.py @@ -145,7 +145,8 @@ class FileList(QtWidgets.QListWidget): count = len(event.mimeData().urls()) self.drop_count.setText('+{}'.format(count)) - self.drop_count.setGeometry(self.width() - 60, self.height() - 40, 50, 30) + size_hint = self.drop_count.sizeHint() + self.drop_count.setGeometry(self.width() - size_hint.width() - 10, self.height() - size_hint.height() - 10, size_hint.width(), size_hint.height()) self.drop_count.show() event.accept() else: