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>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="cover_grid_tab">
|
<widget class="QTabWidget" name="cover_grid_tab">
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
<iconset resource="../../../../resources/images.qrc">
|
<iconset resource="../../../../resources/images.qrc">
|
||||||
<normaloff>:/images/grid.png</normaloff>:/images/grid.png</iconset>
|
<normaloff>:/images/grid.png</normaloff>:/images/grid.png</iconset>
|
||||||
@ -308,9 +308,6 @@
|
|||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Cover &grid</string>
|
<string>Cover &grid</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QTabWidget" name="tabWidget_2">
|
|
||||||
<property name="tabPosition">
|
<property name="tabPosition">
|
||||||
<enum>QTabWidget::West</enum>
|
<enum>QTabWidget::West</enum>
|
||||||
</property>
|
</property>
|
||||||
@ -714,9 +711,6 @@ A value of zero means calculate automatically.</string>
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="book_details_tab">
|
<widget class="QWidget" name="book_details_tab">
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
|
@ -509,6 +509,13 @@ class ScrollingTabWidget(QTabWidget):
|
|||||||
|
|
||||||
def wrap_widget(self, page):
|
def wrap_widget(self, page):
|
||||||
sw = QScrollArea(self)
|
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)))
|
name = 'STW{}'.format(abs(id(self)))
|
||||||
sw.setObjectName(name)
|
sw.setObjectName(name)
|
||||||
sw.setWidget(page)
|
sw.setWidget(page)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user