mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +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)
|
void QDocumentDialog::sansChanged(int item)
|
||||||
{
|
{
|
||||||
string const font = tex_fonts_sans[item];
|
string const font = tex_fonts_sans[item];
|
||||||
|
bool scaleable = form_->controller().providesScale(font);
|
||||||
fontModule->scaleSansSB->setEnabled(
|
fontModule->scaleSansSB->setEnabled(scaleable);
|
||||||
form_->controller().providesScale(font));
|
fontModule->scaleSansLA->setEnabled(scaleable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void QDocumentDialog::ttChanged(int item)
|
void QDocumentDialog::ttChanged(int item)
|
||||||
{
|
{
|
||||||
string const font = tex_fonts_monospaced[item];
|
string const font = tex_fonts_monospaced[item];
|
||||||
|
bool scaleable = form_->controller().providesScale(font);
|
||||||
fontModule->scaleTypewriterSB->setEnabled(
|
fontModule->scaleTypewriterSB->setEnabled(scaleable);
|
||||||
form_->controller().providesScale(font));
|
fontModule->scaleTypewriterLA->setEnabled(scaleable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1085,30 +1085,27 @@ void QDocumentDialog::update(BufferParams const & params)
|
|||||||
params.fontsize);
|
params.fontsize);
|
||||||
|
|
||||||
int n = findToken(tex_fonts_roman, params.fontsRoman);
|
int n = findToken(tex_fonts_roman, params.fontsRoman);
|
||||||
if (n >= 0)
|
if (n >= 0) {
|
||||||
fontModule->fontsRomanCO->setCurrentIndex(n);
|
fontModule->fontsRomanCO->setCurrentIndex(n);
|
||||||
|
romanChanged(n);
|
||||||
|
}
|
||||||
|
|
||||||
n = findToken(tex_fonts_sans, params.fontsSans);
|
n = findToken(tex_fonts_sans, params.fontsSans);
|
||||||
if (n >= 0)
|
if (n >= 0) {
|
||||||
fontModule->fontsSansCO->setCurrentIndex(n);
|
fontModule->fontsSansCO->setCurrentIndex(n);
|
||||||
|
sansChanged(n);
|
||||||
|
}
|
||||||
|
|
||||||
n = findToken(tex_fonts_monospaced, params.fontsTypewriter);
|
n = findToken(tex_fonts_monospaced, params.fontsTypewriter);
|
||||||
if (n >= 0)
|
if (n >= 0) {
|
||||||
fontModule->fontsTypewriterCO->setCurrentIndex(n);
|
fontModule->fontsTypewriterCO->setCurrentIndex(n);
|
||||||
|
ttChanged(n);
|
||||||
|
}
|
||||||
|
|
||||||
fontModule->fontScCB->setChecked(params.fontsSC);
|
fontModule->fontScCB->setChecked(params.fontsSC);
|
||||||
fontModule->fontOsfCB->setChecked(params.fontsOSF);
|
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->scaleSansSB->setValue(params.fontsSansScale);
|
||||||
fontModule->scaleTypewriterSB->setValue(
|
fontModule->scaleTypewriterSB->setValue(params.fontsTypewriterScale);
|
||||||
params.fontsTypewriterScale);
|
|
||||||
fontModule->scaleSansSB->setEnabled(
|
|
||||||
form_->controller().providesScale(params.fontsSans));
|
|
||||||
fontModule->scaleTypewriterSB->setEnabled(
|
|
||||||
form_->controller().providesScale(params.fontsTypewriter));
|
|
||||||
n = findToken(ControlDocument::fontfamilies, params.fontsDefaultFamily);
|
n = findToken(ControlDocument::fontfamilies, params.fontsDefaultFamily);
|
||||||
if (n >= 0)
|
if (n >= 0)
|
||||||
fontModule->fontsDefaultCO->setCurrentIndex(n);
|
fontModule->fontsDefaultCO->setCurrentIndex(n);
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>344</width>
|
<width>409</width>
|
||||||
<height>394</height>
|
<height>232</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle" >
|
<property name="windowTitle" >
|
||||||
@ -22,76 +22,36 @@
|
|||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="3" column="0" >
|
<item row="0" column="1" >
|
||||||
<spacer>
|
<widget class="QComboBox" name="fontsDefaultCO" />
|
||||||
<property name="orientation" >
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType" >
|
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" >
|
|
||||||
<size>
|
|
||||||
<width>326</width>
|
|
||||||
<height>16</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" >
|
<item row="4" column="1" >
|
||||||
<widget class="QGroupBox" name="fontAdvancedGB" >
|
<widget class="QComboBox" name="fontsRomanCO" />
|
||||||
<property name="title" >
|
</item>
|
||||||
<string>Advanced Options</string>
|
<item row="2" column="1" >
|
||||||
</property>
|
<widget class="QComboBox" name="fontsSansCO" />
|
||||||
<layout class="QGridLayout" >
|
</item>
|
||||||
<property name="margin" >
|
<item row="3" column="2" >
|
||||||
<number>9</number>
|
<widget class="QLabel" name="scaleTypewriterLA" >
|
||||||
</property>
|
|
||||||
<property name="spacing" >
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0" >
|
|
||||||
<widget class="QCheckBox" name="fontScCB" >
|
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>Use true S&mall Caps</string>
|
<string>Sc&ale (%):</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy" >
|
||||||
|
<cstring>scaleTypewriterSB</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" >
|
<item row="2" column="2" >
|
||||||
<widget class="QCheckBox" name="fontOsfCB" >
|
<widget class="QLabel" name="scaleSansLA" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>Use &Old Style Figures</string>
|
<string>S&cale (%):</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy" >
|
||||||
|
<cstring>scaleSansSB</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
<item row="0" column="2" >
|
||||||
</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" >
|
<widget class="QLabel" name="TextLabel2_2" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>&Base Size:</string>
|
<string>&Base Size:</string>
|
||||||
@ -101,27 +61,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" colspan="2" >
|
<item row="2" column="3" >
|
||||||
<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" >
|
<widget class="QSpinBox" name="scaleSansSB" >
|
||||||
<property name="maximum" >
|
<property name="maximum" >
|
||||||
<number>200</number>
|
<number>200</number>
|
||||||
@ -131,80 +71,30 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item rowspan="2" row="1" column="0" colspan="2" >
|
<item row="0" column="3" >
|
||||||
<widget class="QLabel" name="scaleSansLA" >
|
<widget class="QComboBox" name="fontsizeCO" />
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0" >
|
||||||
|
<widget class="QLabel" name="fontsSansLA" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>S&cale Sans Serif %:</string>
|
<string>&Sans Serif:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy" >
|
<property name="buddy" >
|
||||||
<cstring>scaleSansSB</cstring>
|
<cstring>fontsSansCO</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>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" >
|
<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" >
|
<widget class="QLabel" name="fontsDefaultLA" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>&Default Family:</string>
|
<string>&Default Family:</string>
|
||||||
@ -214,27 +104,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" >
|
<item row="4" 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" >
|
<widget class="QLabel" name="fontsRomanLA" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>&Roman:</string>
|
<string>&Roman:</string>
|
||||||
@ -244,20 +114,80 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
<item row="5" column="1" >
|
||||||
|
<widget class="QCheckBox" name="fontScCB" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Use true S&mall Caps</string>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType" >
|
||||||
|
<enum>QSizePolicy::Expanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" >
|
||||||
|
<size>
|
||||||
|
<width>391</width>
|
||||||
|
<height>21</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11" />
|
<layoutdefault spacing="6" margin="11" />
|
||||||
<pixmapfunction></pixmapfunction>
|
<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>
|
<includes>
|
||||||
<include location="local" >qt_helpers.h</include>
|
<include location="local" >qt_helpers.h</include>
|
||||||
</includes>
|
</includes>
|
||||||
<tabstops>
|
|
||||||
<tabstop>fontsRomanCO</tabstop>
|
|
||||||
<tabstop>fontsizeCO</tabstop>
|
|
||||||
</tabstops>
|
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
Loading…
Reference in New Issue
Block a user