Make the drop count adjust size based on its sizeHint

This commit is contained in:
Micah Lee 2018-02-10 18:36:38 -08:00
parent 2c174b92b9
commit 5bf67cc5d1

View File

@ -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: