mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix some tabs in preferences not having margins
This commit is contained in:
parent
5e68de686b
commit
36dac43b93
@ -300,7 +300,7 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="cover_grid_tab">
|
||||
<widget class="QTabWidget" name="cover_grid_tab">
|
||||
<attribute name="icon">
|
||||
<iconset resource="../../../../resources/images.qrc">
|
||||
<normaloff>:/images/grid.png</normaloff>:/images/grid.png</iconset>
|
||||
@ -308,9 +308,6 @@
|
||||
<attribute name="title">
|
||||
<string>Cover &grid</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget_2">
|
||||
<property name="tabPosition">
|
||||
<enum>QTabWidget::West</enum>
|
||||
</property>
|
||||
@ -714,9 +711,6 @@ A value of zero means calculate automatically.</string>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="book_details_tab">
|
||||
<attribute name="icon">
|
||||
|
@ -509,6 +509,13 @@ class ScrollingTabWidget(QTabWidget):
|
||||
|
||||
def wrap_widget(self, page):
|
||||
sw = QScrollArea(self)
|
||||
pl = page.layout()
|
||||
if pl is not None:
|
||||
cm = pl.contentsMargins()
|
||||
# For some reasons designer insists on setting zero margins for
|
||||
# widgets added to a tab widget, which looks horrible.
|
||||
if (cm.left(), cm.top(), cm.right(), cm.bottom()) == (0, 0, 0, 0):
|
||||
pl.setContentsMargins(9, 9, 9, 9)
|
||||
name = 'STW{}'.format(abs(id(self)))
|
||||
sw.setObjectName(name)
|
||||
sw.setWidget(page)
|
||||
|
Loading…
x
Reference in New Issue
Block a user