mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
work around badly behaved gtk+ theme
This commit is contained in:
parent
64a3d70c59
commit
e77c10ef3c
2 changed files with 12 additions and 3 deletions
|
@ -89,6 +89,11 @@ class CardLayout(QDialog):
|
||||||
tform.label2.setText(u" →")
|
tform.label2.setText(u" →")
|
||||||
tform.labelc1.setText(u" ↗")
|
tform.labelc1.setText(u" ↗")
|
||||||
tform.labelc2.setText(u" ↘")
|
tform.labelc2.setText(u" ↘")
|
||||||
|
if self.style().objectName() == "gtk+":
|
||||||
|
# gtk+ requires margins in inner layout
|
||||||
|
tform.tlayout1.setContentsMargins(0, 11, 0, 0)
|
||||||
|
tform.tlayout2.setContentsMargins(0, 11, 0, 0)
|
||||||
|
tform.tlayout3.setContentsMargins(0, 11, 0, 0)
|
||||||
c(tform.front, SIGNAL("textChanged()"), self.saveCard)
|
c(tform.front, SIGNAL("textChanged()"), self.saveCard)
|
||||||
c(tform.css, SIGNAL("textChanged()"), self.saveCard)
|
c(tform.css, SIGNAL("textChanged()"), self.saveCard)
|
||||||
c(tform.back, SIGNAL("textChanged()"), self.saveCard)
|
c(tform.back, SIGNAL("textChanged()"), self.saveCard)
|
||||||
|
@ -97,6 +102,10 @@ class CardLayout(QDialog):
|
||||||
right = QWidget()
|
right = QWidget()
|
||||||
pform = aqt.forms.preview.Ui_Form()
|
pform = aqt.forms.preview.Ui_Form()
|
||||||
pform.setupUi(right)
|
pform.setupUi(right)
|
||||||
|
if self.style().objectName() == "gtk+":
|
||||||
|
# gtk+ requires margins in inner layout
|
||||||
|
pform.frontPrevBox.setContentsMargins(0, 11, 0, 0)
|
||||||
|
pform.backPrevBox.setContentsMargins(0, 11, 0, 0)
|
||||||
# for cloze notes, show that it's one of n cards
|
# for cloze notes, show that it's one of n cards
|
||||||
if self.model['type'] == MODEL_CLOZE:
|
if self.model['type'] == MODEL_CLOZE:
|
||||||
cnt = len(self.mm.availOrds(
|
cnt = len(self.mm.availOrds(
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Front Template</string>
|
<string>Front Template</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="tlayout1">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Styling</string>
|
<string>Styling</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="tlayout2">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
|
@ -165,7 +165,7 @@
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Back Template</string>
|
<string>Back Template</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="tlayout3">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
|
|
Loading…
Reference in a new issue