smaller font properties dialog

This commit is contained in:
Damien Elmes 2009-01-07 12:05:05 +09:00
parent 81991673cb
commit 5d038b759b
3 changed files with 455 additions and 530 deletions

View file

@ -48,7 +48,7 @@ class Config(dict):
'interfaceLang': "",
'syncUsername': "",
'syncPassword': "",
'showFontPreview': True,
'showFontPreview': False,
'showToolbar': True,
'recentDeckPaths': [],
'saveAfterAnswer': True,

View file

@ -68,8 +68,7 @@ class DisplayProperties(QDialog):
self.main.config['showFontPreview'] = True
else:
self.dialog.previewGroup.hide()
self.setMinimumWidth(350)
self.setMaximumWidth(350)
self.setFixedWidth(340)
self.main.config['showFontPreview'] = False
def setupCards(self):

View file

@ -5,22 +5,16 @@
<rect>
<x>0</x>
<y>0</y>
<width>794</width>
<height>700</height>
<width>763</width>
<height>399</height>
</rect>
</property>
<property name="sizePolicy" >
<sizepolicy vsizetype="MinimumExpanding" hsizetype="Preferred" >
<sizepolicy vsizetype="Expanding" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>0</width>
<height>700</height>
</size>
</property>
<property name="windowTitle" >
<string>Fonts &amp; Colours</string>
</property>
@ -28,7 +22,7 @@
<iconset>
<normaloff>:/icons/fonts.png</normaloff>:/icons/fonts.png</iconset>
</property>
<layout class="QVBoxLayout" >
<layout class="QVBoxLayout" name="_3" >
<property name="spacing" >
<number>6</number>
</property>
@ -46,23 +40,11 @@
<item row="0" column="0" >
<widget class="QFrame" name="frame" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Fixed" >
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</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" >
<enum>QFrame::NoFrame</enum>
</property>
@ -84,16 +66,6 @@
<property name="margin" >
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="spacing" >
<number>6</number>
</property>
<property name="margin" >
<number>0</number>
</property>
</layout>
</item>
<item>
<widget class="QWidget" native="1" name="modelArea" />
</item>
@ -105,7 +77,37 @@
<property name="spacing" >
<number>6</number>
</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" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Fixed" >
@ -118,25 +120,20 @@
</property>
</widget>
</item>
<item row="1" column="1" >
<item>
<widget class="QComboBox" name="cardList" />
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox_5" >
<property name="title" >
<string>Card properties</string>
</property>
<layout class="QVBoxLayout" >
<property name="spacing" >
<number>6</number>
</property>
<property name="margin" >
<number>3</number>
<widget class="Line" name="line" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" >
<layout class="QGridLayout" name="_2" >
<property name="margin" >
<number>0</number>
</property>
@ -252,23 +249,36 @@
</property>
</widget>
</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>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
<widget class="QWidget" name="tab_2" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>297</width>
<height>437</height>
</rect>
</property>
<attribute name="title" >
<string>Fields</string>
</property>
<layout class="QVBoxLayout" >
<property name="spacing" >
<number>6</number>
</property>
<property name="margin" >
<number>3</number>
</property>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2" >
<item>
<widget class="QListWidget" name="fieldList" >
<property name="sizePolicy" >
@ -293,7 +303,7 @@
</widget>
</item>
<item>
<layout class="QGridLayout" >
<layout class="QGridLayout" name="_4" >
<property name="margin" >
<number>0</number>
</property>
@ -400,7 +410,7 @@
</widget>
</item>
<item>
<layout class="QGridLayout" >
<layout class="QGridLayout" name="_5" >
<property name="margin" >
<number>0</number>
</property>
@ -467,6 +477,23 @@
</item>
</layout>
</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>
<layout class="QHBoxLayout" name="horizontalLayout" >
<item>
@ -502,7 +529,6 @@
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</item>
@ -524,7 +550,7 @@
<item>
<widget class="QTextEdit" name="question" >
<property name="sizePolicy" >
<sizepolicy vsizetype="MinimumExpanding" hsizetype="Expanding" >
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -543,7 +569,7 @@
<item>
<widget class="QTextEdit" name="answer" >
<property name="sizePolicy" >
<sizepolicy vsizetype="MinimumExpanding" hsizetype="Expanding" >
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -561,26 +587,6 @@
</layout>
</widget>
<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>answer</tabstop>
</tabstops>
@ -588,86 +594,6 @@
<include location="../icons.qrc" />
</resources>
<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>
<sender>closeButton</sender>
<signal>clicked()</signal>
@ -675,12 +601,12 @@
<slot>reject()</slot>
<hints>
<hint type="sourcelabel" >
<x>294</x>
<y>667</y>
<x>275</x>
<y>522</y>
</hint>
<hint type="destinationlabel" >
<x>388</x>
<y>-16</y>
<x>325</x>
<y>525</y>
</hint>
</hints>
</connection>