mirror of
https://github.com/wassname/sloth.git
synced 2026-10-01 12:30:35 +08:00
Small fix to FloatingLayout
This commit is contained in:
1 parent
faa4801efb
commit
c415b6c8c6
1 file changed
+2
-2
@@ -44,11 +44,11 @@ class FloatingLayout(QLayout):
|
||||
w = max(w, item.minimumSize().width())
|
||||
h = max(h, item.minimumSize().height())
|
||||
|
||||
current_width = self.contentsRect().width()
|
||||
left, top, right, bottom = self.getContentsMargins()
|
||||
current_width = self.contentsRect().width() - left - right
|
||||
if current_width > 0:
|
||||
h = self.heightForWidth(current_width)
|
||||
|
||||
left, top, right, bottom = self.getContentsMargins()
|
||||
w += left + right
|
||||
h += top + bottom
|
||||
|
||||
|
||||
Reference in new issue
Block a user