mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 07:22:23 -04:00
smaller font properties dialog
This commit is contained in:
parent
81991673cb
commit
5d038b759b
3 changed files with 455 additions and 530 deletions
|
@ -48,7 +48,7 @@ class Config(dict):
|
||||||
'interfaceLang': "",
|
'interfaceLang': "",
|
||||||
'syncUsername': "",
|
'syncUsername': "",
|
||||||
'syncPassword': "",
|
'syncPassword': "",
|
||||||
'showFontPreview': True,
|
'showFontPreview': False,
|
||||||
'showToolbar': True,
|
'showToolbar': True,
|
||||||
'recentDeckPaths': [],
|
'recentDeckPaths': [],
|
||||||
'saveAfterAnswer': True,
|
'saveAfterAnswer': True,
|
||||||
|
|
|
@ -68,8 +68,7 @@ class DisplayProperties(QDialog):
|
||||||
self.main.config['showFontPreview'] = True
|
self.main.config['showFontPreview'] = True
|
||||||
else:
|
else:
|
||||||
self.dialog.previewGroup.hide()
|
self.dialog.previewGroup.hide()
|
||||||
self.setMinimumWidth(350)
|
self.setFixedWidth(340)
|
||||||
self.setMaximumWidth(350)
|
|
||||||
self.main.config['showFontPreview'] = False
|
self.main.config['showFontPreview'] = False
|
||||||
|
|
||||||
def setupCards(self):
|
def setupCards(self):
|
||||||
|
|
|
@ -5,22 +5,16 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>794</width>
|
<width>763</width>
|
||||||
<height>700</height>
|
<height>399</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
<sizepolicy vsizetype="MinimumExpanding" hsizetype="Preferred" >
|
<sizepolicy vsizetype="Expanding" hsizetype="Preferred" >
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize" >
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>700</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle" >
|
<property name="windowTitle" >
|
||||||
<string>Fonts & Colours</string>
|
<string>Fonts & Colours</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -28,7 +22,7 @@
|
||||||
<iconset>
|
<iconset>
|
||||||
<normaloff>:/icons/fonts.png</normaloff>:/icons/fonts.png</iconset>
|
<normaloff>:/icons/fonts.png</normaloff>:/icons/fonts.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" >
|
<layout class="QVBoxLayout" name="_3" >
|
||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
|
@ -46,23 +40,11 @@
|
||||||
<item row="0" column="0" >
|
<item row="0" column="0" >
|
||||||
<widget class="QFrame" name="frame" >
|
<widget class="QFrame" name="frame" >
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
<sizepolicy vsizetype="Preferred" hsizetype="Fixed" >
|
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize" >
|
|
||||||
<size>
|
|
||||||
<width>330</width>
|
|
||||||
<height>16</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize" >
|
|
||||||
<size>
|
|
||||||
<width>330</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape" >
|
<property name="frameShape" >
|
||||||
<enum>QFrame::NoFrame</enum>
|
<enum>QFrame::NoFrame</enum>
|
||||||
</property>
|
</property>
|
||||||
|
@ -84,16 +66,6 @@
|
||||||
<property name="margin" >
|
<property name="margin" >
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" >
|
|
||||||
<property name="spacing" >
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" native="1" name="modelArea" />
|
<widget class="QWidget" native="1" name="modelArea" />
|
||||||
</item>
|
</item>
|
||||||
|
@ -105,7 +77,37 @@
|
||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="1" column="0" >
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3" >
|
||||||
|
<item>
|
||||||
|
<widget class="QTabWidget" name="tabWidget" >
|
||||||
|
<property name="sizePolicy" >
|
||||||
|
<sizepolicy vsizetype="Expanding" hsizetype="Preferred" >
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="currentIndex" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="tab" >
|
||||||
|
<property name="geometry" >
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>297</width>
|
||||||
|
<height>289</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<attribute name="title" >
|
||||||
|
<string>Card</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout" >
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2" >
|
||||||
|
<item>
|
||||||
<widget class="QLabel" name="label_3" >
|
<widget class="QLabel" name="label_3" >
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
<sizepolicy vsizetype="Preferred" hsizetype="Fixed" >
|
<sizepolicy vsizetype="Preferred" hsizetype="Fixed" >
|
||||||
|
@ -118,25 +120,20 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1" >
|
<item>
|
||||||
<widget class="QComboBox" name="cardList" />
|
<widget class="QComboBox" name="cardList" />
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_5" >
|
<widget class="Line" name="line" >
|
||||||
<property name="title" >
|
<property name="orientation" >
|
||||||
<string>Card properties</string>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" >
|
|
||||||
<property name="spacing" >
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin" >
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout" name="_2" >
|
||||||
<property name="margin" >
|
<property name="margin" >
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
|
@ -252,23 +249,36 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="8" column="0" >
|
||||||
|
<spacer name="verticalSpacer" >
|
||||||
|
<property name="orientation" >
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0" >
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
<widget class="QWidget" name="tab_2" >
|
||||||
<item>
|
<property name="geometry" >
|
||||||
<widget class="QGroupBox" name="groupBox" >
|
<rect>
|
||||||
<property name="title" >
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>297</width>
|
||||||
|
<height>437</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<attribute name="title" >
|
||||||
<string>Fields</string>
|
<string>Fields</string>
|
||||||
</property>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" >
|
<layout class="QVBoxLayout" name="verticalLayout_2" >
|
||||||
<property name="spacing" >
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin" >
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QListWidget" name="fieldList" >
|
<widget class="QListWidget" name="fieldList" >
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
|
@ -293,7 +303,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout" name="_4" >
|
||||||
<property name="margin" >
|
<property name="margin" >
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
|
@ -400,7 +410,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout" name="_5" >
|
||||||
<property name="margin" >
|
<property name="margin" >
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
|
@ -467,6 +477,23 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_2" >
|
||||||
|
<property name="orientation" >
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0" >
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout" >
|
<layout class="QHBoxLayout" name="horizontalLayout" >
|
||||||
<item>
|
<item>
|
||||||
|
@ -502,7 +529,6 @@
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
@ -524,7 +550,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTextEdit" name="question" >
|
<widget class="QTextEdit" name="question" >
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
<sizepolicy vsizetype="MinimumExpanding" hsizetype="Expanding" >
|
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -543,7 +569,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTextEdit" name="answer" >
|
<widget class="QTextEdit" name="answer" >
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
<sizepolicy vsizetype="MinimumExpanding" hsizetype="Expanding" >
|
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -561,26 +587,6 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>cardList</tabstop>
|
|
||||||
<tabstop>questionFont</tabstop>
|
|
||||||
<tabstop>questionSize</tabstop>
|
|
||||||
<tabstop>questionColour</tabstop>
|
|
||||||
<tabstop>questionAlign</tabstop>
|
|
||||||
<tabstop>answerFont</tabstop>
|
|
||||||
<tabstop>answerSize</tabstop>
|
|
||||||
<tabstop>answerColour</tabstop>
|
|
||||||
<tabstop>answerAlign</tabstop>
|
|
||||||
<tabstop>fieldList</tabstop>
|
|
||||||
<tabstop>useFamily</tabstop>
|
|
||||||
<tabstop>fontFamily</tabstop>
|
|
||||||
<tabstop>useSize</tabstop>
|
|
||||||
<tabstop>fontSize</tabstop>
|
|
||||||
<tabstop>useColour</tabstop>
|
|
||||||
<tabstop>fontColour</tabstop>
|
|
||||||
<tabstop>useFamilyEdit</tabstop>
|
|
||||||
<tabstop>fontFamilyEdit</tabstop>
|
|
||||||
<tabstop>useSizeEdit</tabstop>
|
|
||||||
<tabstop>fontSizeEdit</tabstop>
|
|
||||||
<tabstop>question</tabstop>
|
<tabstop>question</tabstop>
|
||||||
<tabstop>answer</tabstop>
|
<tabstop>answer</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
|
@ -588,86 +594,6 @@
|
||||||
<include location="../icons.qrc" />
|
<include location="../icons.qrc" />
|
||||||
</resources>
|
</resources>
|
||||||
<connections>
|
<connections>
|
||||||
<connection>
|
|
||||||
<sender>useFamily</sender>
|
|
||||||
<signal>toggled(bool)</signal>
|
|
||||||
<receiver>fontFamily</receiver>
|
|
||||||
<slot>setShown(bool)</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel" >
|
|
||||||
<x>118</x>
|
|
||||||
<y>503</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel" >
|
|
||||||
<x>329</x>
|
|
||||||
<y>503</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>useSize</sender>
|
|
||||||
<signal>toggled(bool)</signal>
|
|
||||||
<receiver>fontSize</receiver>
|
|
||||||
<slot>setShown(bool)</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel" >
|
|
||||||
<x>155</x>
|
|
||||||
<y>533</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel" >
|
|
||||||
<x>329</x>
|
|
||||||
<y>533</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>useColour</sender>
|
|
||||||
<signal>toggled(bool)</signal>
|
|
||||||
<receiver>fontColour</receiver>
|
|
||||||
<slot>setShown(bool)</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel" >
|
|
||||||
<x>129</x>
|
|
||||||
<y>563</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel" >
|
|
||||||
<x>329</x>
|
|
||||||
<y>562</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>useFamilyEdit</sender>
|
|
||||||
<signal>toggled(bool)</signal>
|
|
||||||
<receiver>fontFamilyEdit</receiver>
|
|
||||||
<slot>setShown(bool)</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel" >
|
|
||||||
<x>138</x>
|
|
||||||
<y>617</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel" >
|
|
||||||
<x>329</x>
|
|
||||||
<y>617</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>useSizeEdit</sender>
|
|
||||||
<signal>toggled(bool)</signal>
|
|
||||||
<receiver>fontSizeEdit</receiver>
|
|
||||||
<slot>setShown(bool)</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel" >
|
|
||||||
<x>126</x>
|
|
||||||
<y>647</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel" >
|
|
||||||
<x>326</x>
|
|
||||||
<y>647</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
<connection>
|
||||||
<sender>closeButton</sender>
|
<sender>closeButton</sender>
|
||||||
<signal>clicked()</signal>
|
<signal>clicked()</signal>
|
||||||
|
@ -675,12 +601,12 @@
|
||||||
<slot>reject()</slot>
|
<slot>reject()</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel" >
|
<hint type="sourcelabel" >
|
||||||
<x>294</x>
|
<x>275</x>
|
||||||
<y>667</y>
|
<y>522</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel" >
|
<hint type="destinationlabel" >
|
||||||
<x>388</x>
|
<x>325</x>
|
||||||
<y>-16</y>
|
<y>525</y>
|
||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
|
|
Loading…
Reference in a new issue