mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
* clean layout of font panel in document dialog
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16007 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1278f826c9
commit
72aeab403f
@ -560,18 +560,18 @@ void QDocumentDialog::romanChanged(int item)
|
||||
void QDocumentDialog::sansChanged(int item)
|
||||
{
|
||||
string const font = tex_fonts_sans[item];
|
||||
|
||||
fontModule->scaleSansSB->setEnabled(
|
||||
form_->controller().providesScale(font));
|
||||
bool scaleable = form_->controller().providesScale(font);
|
||||
fontModule->scaleSansSB->setEnabled(scaleable);
|
||||
fontModule->scaleSansLA->setEnabled(scaleable);
|
||||
}
|
||||
|
||||
|
||||
void QDocumentDialog::ttChanged(int item)
|
||||
{
|
||||
string const font = tex_fonts_monospaced[item];
|
||||
|
||||
fontModule->scaleTypewriterSB->setEnabled(
|
||||
form_->controller().providesScale(font));
|
||||
bool scaleable = form_->controller().providesScale(font);
|
||||
fontModule->scaleTypewriterSB->setEnabled(scaleable);
|
||||
fontModule->scaleTypewriterLA->setEnabled(scaleable);
|
||||
}
|
||||
|
||||
|
||||
@ -1085,30 +1085,27 @@ void QDocumentDialog::update(BufferParams const & params)
|
||||
params.fontsize);
|
||||
|
||||
int n = findToken(tex_fonts_roman, params.fontsRoman);
|
||||
if (n >= 0)
|
||||
if (n >= 0) {
|
||||
fontModule->fontsRomanCO->setCurrentIndex(n);
|
||||
romanChanged(n);
|
||||
}
|
||||
|
||||
n = findToken(tex_fonts_sans, params.fontsSans);
|
||||
if (n >= 0)
|
||||
if (n >= 0) {
|
||||
fontModule->fontsSansCO->setCurrentIndex(n);
|
||||
sansChanged(n);
|
||||
}
|
||||
|
||||
n = findToken(tex_fonts_monospaced, params.fontsTypewriter);
|
||||
if (n >= 0)
|
||||
if (n >= 0) {
|
||||
fontModule->fontsTypewriterCO->setCurrentIndex(n);
|
||||
ttChanged(n);
|
||||
}
|
||||
|
||||
fontModule->fontScCB->setChecked(params.fontsSC);
|
||||
fontModule->fontOsfCB->setChecked(params.fontsOSF);
|
||||
fontModule->fontScCB->setEnabled(
|
||||
form_->controller().providesSC(params.fontsRoman));
|
||||
fontModule->fontOsfCB->setEnabled(
|
||||
form_->controller().providesOSF(params.fontsRoman));
|
||||
fontModule->scaleSansSB->setValue(params.fontsSansScale);
|
||||
fontModule->scaleTypewriterSB->setValue(
|
||||
params.fontsTypewriterScale);
|
||||
fontModule->scaleSansSB->setEnabled(
|
||||
form_->controller().providesScale(params.fontsSans));
|
||||
fontModule->scaleTypewriterSB->setEnabled(
|
||||
form_->controller().providesScale(params.fontsTypewriter));
|
||||
fontModule->scaleTypewriterSB->setValue(params.fontsTypewriterScale);
|
||||
n = findToken(ControlDocument::fontfamilies, params.fontsDefaultFamily);
|
||||
if (n >= 0)
|
||||
fontModule->fontsDefaultCO->setCurrentIndex(n);
|
||||
|
@ -8,8 +8,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>344</width>
|
||||
<height>394</height>
|
||||
<width>409</width>
|
||||
<height>232</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
@ -22,7 +22,139 @@
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QComboBox" name="fontsDefaultCO" />
|
||||
</item>
|
||||
<item row="4" column="1" >
|
||||
<widget class="QComboBox" name="fontsRomanCO" />
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QComboBox" name="fontsSansCO" />
|
||||
</item>
|
||||
<item row="3" column="2" >
|
||||
<widget class="QLabel" name="scaleTypewriterLA" >
|
||||
<property name="text" >
|
||||
<string>Sc&ale (%):</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>scaleTypewriterSB</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2" >
|
||||
<widget class="QLabel" name="scaleSansLA" >
|
||||
<property name="text" >
|
||||
<string>S&cale (%):</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>scaleSansSB</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" >
|
||||
<widget class="QLabel" name="TextLabel2_2" >
|
||||
<property name="text" >
|
||||
<string>&Base Size:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>fontsizeCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3" >
|
||||
<widget class="QSpinBox" name="scaleSansSB" >
|
||||
<property name="maximum" >
|
||||
<number>200</number>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3" >
|
||||
<widget class="QComboBox" name="fontsizeCO" />
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="fontsSansLA" >
|
||||
<property name="text" >
|
||||
<string>&Sans Serif:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>fontsSansCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QLabel" name="fontsTypewriterLA" >
|
||||
<property name="text" >
|
||||
<string>&Typewriter:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>fontsTypewriterCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="fontsDefaultLA" >
|
||||
<property name="text" >
|
||||
<string>&Default Family:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>fontsDefaultCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" >
|
||||
<widget class="QLabel" name="fontsRomanLA" >
|
||||
<property name="text" >
|
||||
<string>&Roman:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>fontsRomanCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1" >
|
||||
<widget class="QCheckBox" name="fontScCB" >
|
||||
<property name="text" >
|
||||
<string>Use true S&mall Caps</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1" >
|
||||
<widget class="QCheckBox" name="fontOsfCB" >
|
||||
<property name="text" >
|
||||
<string>Use &Old Style Figures</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3" >
|
||||
<widget class="QSpinBox" name="scaleTypewriterSB" >
|
||||
<property name="maximum" >
|
||||
<number>200</number>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" >
|
||||
<widget class="QComboBox" name="fontsTypewriterCO" />
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>182</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="4" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
@ -32,232 +164,30 @@
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>326</width>
|
||||
<height>16</height>
|
||||
<width>391</width>
|
||||
<height>21</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QGroupBox" name="fontAdvancedGB" >
|
||||
<property name="title" >
|
||||
<string>Advanced Options</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QCheckBox" name="fontScCB" >
|
||||
<property name="text" >
|
||||
<string>Use true S&mall Caps</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QCheckBox" name="fontOsfCB" >
|
||||
<property name="text" >
|
||||
<string>Use &Old Style Figures</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QGroupBox" name="fontSizesGB" >
|
||||
<property name="title" >
|
||||
<string>Sizes</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="1" colspan="2" >
|
||||
<widget class="QComboBox" name="fontsizeCO" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>5</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="TextLabel2_2" >
|
||||
<property name="text" >
|
||||
<string>&Base Size:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>fontsizeCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="scaleTypewriterLA" >
|
||||
<property name="text" >
|
||||
<string>Sc&ale Typewriter %:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>scaleTypewriterSB</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item rowspan="2" row="2" column="2" >
|
||||
<widget class="QSpinBox" name="scaleTypewriterSB" >
|
||||
<property name="maximum" >
|
||||
<number>200</number>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" >
|
||||
<widget class="QSpinBox" name="scaleSansSB" >
|
||||
<property name="maximum" >
|
||||
<number>200</number>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item rowspan="2" row="1" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="scaleSansLA" >
|
||||
<property name="text" >
|
||||
<string>S&cale Sans Serif %:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>scaleSansSB</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QGroupBox" name="fontsGB" >
|
||||
<property name="title" >
|
||||
<string>Families</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QComboBox" name="fontsRomanCO" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>5</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QComboBox" name="fontsSansCO" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>5</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" >
|
||||
<widget class="QComboBox" name="fontsDefaultCO" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>5</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QComboBox" name="fontsTypewriterCO" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>5</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QLabel" name="fontsDefaultLA" >
|
||||
<property name="text" >
|
||||
<string>&Default Family:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>fontsDefaultCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="fontsTypewriterLA" >
|
||||
<property name="text" >
|
||||
<string>&Typewriter:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>fontsRomanCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="fontsSansLA" >
|
||||
<property name="text" >
|
||||
<string>&Sans Serif:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>fontsRomanCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="fontsRomanLA" >
|
||||
<property name="text" >
|
||||
<string>&Roman:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>fontsRomanCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11" />
|
||||
<pixmapfunction></pixmapfunction>
|
||||
<tabstops>
|
||||
<tabstop>fontsDefaultCO</tabstop>
|
||||
<tabstop>fontsizeCO</tabstop>
|
||||
<tabstop>fontsSansCO</tabstop>
|
||||
<tabstop>scaleSansSB</tabstop>
|
||||
<tabstop>fontsTypewriterCO</tabstop>
|
||||
<tabstop>scaleTypewriterSB</tabstop>
|
||||
<tabstop>fontsRomanCO</tabstop>
|
||||
<tabstop>fontScCB</tabstop>
|
||||
<tabstop>fontOsfCB</tabstop>
|
||||
</tabstops>
|
||||
<includes>
|
||||
<include location="local" >qt_helpers.h</include>
|
||||
</includes>
|
||||
<tabstops>
|
||||
<tabstop>fontsRomanCO</tabstop>
|
||||
<tabstop>fontsizeCO</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
Loading…
Reference in New Issue
Block a user