mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
fix display properties, tweak wording
This commit is contained in:
parent
0a015de0fa
commit
65cdd8a7da
2 changed files with 95 additions and 9 deletions
|
@ -209,26 +209,29 @@ class DisplayProperties(QDialog):
|
||||||
self.fwidget("useFamily", type).setCheckState(Qt.Checked)
|
self.fwidget("useFamily", type).setCheckState(Qt.Checked)
|
||||||
self.fwidget("fontFamily", type).setCurrentFont(QFont(
|
self.fwidget("fontFamily", type).setCurrentFont(QFont(
|
||||||
getattr(field, type + 'FontFamily')))
|
getattr(field, type + 'FontFamily')))
|
||||||
|
self.fwidget("fontFamily", type).setEnabled(True)
|
||||||
else:
|
else:
|
||||||
self.fwidget("useFamily", type).setCheckState(Qt.Unchecked)
|
self.fwidget("useFamily", type).setCheckState(Qt.Unchecked)
|
||||||
self.fwidget("fontFamily", type).hide()
|
self.fwidget("fontFamily", type).setEnabled(False)
|
||||||
# size
|
# size
|
||||||
if getattr(field, type + 'FontSize'):
|
if getattr(field, type + 'FontSize'):
|
||||||
self.fwidget("useSize", type).setCheckState(Qt.Checked)
|
self.fwidget("useSize", type).setCheckState(Qt.Checked)
|
||||||
self.fwidget("fontSize", type).setValue(
|
self.fwidget("fontSize", type).setValue(
|
||||||
getattr(field, type + 'FontSize'))
|
getattr(field, type + 'FontSize'))
|
||||||
|
self.fwidget("fontSize", type).setEnabled(True)
|
||||||
else:
|
else:
|
||||||
self.fwidget("useSize", type).setCheckState(Qt.Unchecked)
|
self.fwidget("useSize", type).setCheckState(Qt.Unchecked)
|
||||||
self.fwidget("fontSize", type).hide()
|
self.fwidget("fontSize", type).setEnabled(False)
|
||||||
# colour
|
# colour
|
||||||
if type == "quiz":
|
if type == "quiz":
|
||||||
if getattr(field, type + 'FontColour'):
|
if getattr(field, type + 'FontColour'):
|
||||||
self.fwidget("useColour", type).setCheckState(Qt.Checked)
|
self.fwidget("useColour", type).setCheckState(Qt.Checked)
|
||||||
self.fwidget("fontColour", type).setPalette(QPalette(QColor(
|
self.fwidget("fontColour", type).setPalette(QPalette(QColor(
|
||||||
getattr(field, type + 'FontColour'))))
|
getattr(field, type + 'FontColour'))))
|
||||||
|
self.fwidget("fontColour", type).setEnabled(True)
|
||||||
else:
|
else:
|
||||||
self.fwidget("useColour", type).setCheckState(Qt.Unchecked)
|
self.fwidget("useColour", type).setCheckState(Qt.Unchecked)
|
||||||
self.fwidget("fontColour", type).hide()
|
self.fwidget("fontColour", type).setEnabled(False)
|
||||||
self.currentField = field
|
self.currentField = field
|
||||||
|
|
||||||
def saveField(self, *args):
|
def saveField(self, *args):
|
||||||
|
|
|
@ -102,7 +102,7 @@
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="title" >
|
<attribute name="title" >
|
||||||
<string>Card</string>
|
<string>Cards</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout" >
|
<layout class="QVBoxLayout" name="verticalLayout" >
|
||||||
<item>
|
<item>
|
||||||
|
@ -272,7 +272,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>297</width>
|
<width>297</width>
|
||||||
<height>437</height>
|
<height>289</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="title" >
|
<attribute name="title" >
|
||||||
|
@ -298,7 +298,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label" >
|
<widget class="QLabel" name="label" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string> <b>When quizzing/adding/editing</b></string>
|
<string> <b>When reviewing and editing:</b></string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -366,6 +366,9 @@
|
||||||
<property name="maximum" >
|
<property name="maximum" >
|
||||||
<number>300</number>
|
<number>300</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="value" >
|
||||||
|
<number>14</number>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" >
|
<item row="2" column="0" >
|
||||||
|
@ -405,7 +408,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_2" >
|
<widget class="QLabel" name="label_2" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string> <b>When adding/editing</b></string>
|
<string> <b>When editing (overrides above):</b></string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -601,8 +604,8 @@
|
||||||
<slot>reject()</slot>
|
<slot>reject()</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel" >
|
<hint type="sourcelabel" >
|
||||||
<x>275</x>
|
<x>315</x>
|
||||||
<y>522</y>
|
<y>385</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel" >
|
<hint type="destinationlabel" >
|
||||||
<x>325</x>
|
<x>325</x>
|
||||||
|
@ -610,5 +613,85 @@
|
||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>useFamily</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>fontFamily</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>107</x>
|
||||||
|
<y>187</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>178</x>
|
||||||
|
<y>194</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>useSize</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>fontSize</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>134</x>
|
||||||
|
<y>226</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>205</x>
|
||||||
|
<y>224</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>useColour</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>fontColour</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>93</x>
|
||||||
|
<y>256</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>175</x>
|
||||||
|
<y>253</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>useFamilyEdit</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>fontFamilyEdit</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>122</x>
|
||||||
|
<y>299</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>215</x>
|
||||||
|
<y>301</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>useSizeEdit</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>fontSizeEdit</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>129</x>
|
||||||
|
<y>340</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>210</x>
|
||||||
|
<y>337</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
</connections>
|
</connections>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
Loading…
Reference in a new issue