diff --git a/aqt/clayout.py b/aqt/clayout.py index c849d7823..70ad35549 100644 --- a/aqt/clayout.py +++ b/aqt/clayout.py @@ -89,6 +89,11 @@ class CardLayout(QDialog): tform.label2.setText(u" →") tform.labelc1.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.css, SIGNAL("textChanged()"), self.saveCard) c(tform.back, SIGNAL("textChanged()"), self.saveCard) @@ -97,6 +102,10 @@ class CardLayout(QDialog): right = QWidget() pform = aqt.forms.preview.Ui_Form() 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 if self.model['type'] == MODEL_CLOZE: cnt = len(self.mm.availOrds( diff --git a/designer/template.ui b/designer/template.ui index 748447b1f..6f802283a 100644 --- a/designer/template.ui +++ b/designer/template.ui @@ -36,7 +36,7 @@ Front Template - + 0 @@ -68,7 +68,7 @@ Styling - + 0 @@ -165,7 +165,7 @@ Back Template - + 0