mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 11:16:55 +00:00
partial fonts fix. Like Juergen said we really need our own dialog.
Not that there's any point until qfont_loader reads lyxrc... git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5663 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9d23bc01cc
commit
1199867058
@ -1,3 +1,7 @@
|
||||
2002-11-17 John Levon <levon@movementarian.org>
|
||||
|
||||
* QPrefsDialog.C: partial fonts fix
|
||||
|
||||
2002-11-17 John Levon <levon@movementarian.org>
|
||||
|
||||
* QPrefsDialog.h:
|
||||
|
@ -567,53 +567,61 @@ void QPrefsDialog::select_lyxpipe()
|
||||
pathsModule->lyxserverDirED->setText(file.c_str());
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
QFont fontFromString(QString const & s) {
|
||||
QFont f;
|
||||
#if QT_VERSION >= 300
|
||||
f.fromString(s);
|
||||
return f;
|
||||
#else
|
||||
f.setRawName(s);
|
||||
return f;
|
||||
#endif
|
||||
}
|
||||
|
||||
QString const fontToString(QFont const & f) {
|
||||
#if QT_VERSION >= 300
|
||||
return f.toString();
|
||||
#else
|
||||
return f.rawName();
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void QPrefsDialog::change_roman()
|
||||
{
|
||||
#if QT_VERSION >= 300
|
||||
QFont f;
|
||||
f.fromString(screenfontsModule->screenRomanED->text());
|
||||
QFont f(fontFromString(screenfontsModule->screenRomanED->text()));
|
||||
|
||||
// Qt designers hadn't heard of references
|
||||
bool ok;
|
||||
QFontDialog::getFont(&ok, f);
|
||||
f = QFontDialog::getFont(&ok, f);
|
||||
if (ok)
|
||||
screenfontsModule->screenRomanED->setText(f.toString());
|
||||
#else
|
||||
// ??
|
||||
#endif
|
||||
screenfontsModule->screenRomanED->setText(fontToString(f));
|
||||
}
|
||||
|
||||
|
||||
|
||||
void QPrefsDialog::change_sans()
|
||||
{
|
||||
#if QT_VERSION >= 300
|
||||
QFont f;
|
||||
f.fromString(screenfontsModule->screenSansED->text());
|
||||
QFont f(fontFromString(screenfontsModule->screenSansED->text()));
|
||||
|
||||
// Qt designers hadn't heard of references
|
||||
bool ok;
|
||||
QFontDialog::getFont(&ok, f);
|
||||
f = QFontDialog::getFont(&ok, f);
|
||||
if (ok)
|
||||
screenfontsModule->screenSansED->setText(f.toString());
|
||||
#else
|
||||
// ?? rawName is no good
|
||||
#endif
|
||||
screenfontsModule->screenSansED->setText(fontToString(f));
|
||||
}
|
||||
|
||||
|
||||
|
||||
void QPrefsDialog::change_typewriter()
|
||||
{
|
||||
#if QT_VERSION >= 300
|
||||
QFont f;
|
||||
f.fromString(screenfontsModule->screenTypewriterED->text());
|
||||
QFont f(fontFromString(screenfontsModule->screenTypewriterED->text()));
|
||||
|
||||
// Qt designers hadn't heard of references
|
||||
bool ok;
|
||||
QFontDialog::getFont(&ok, f);
|
||||
f = QFontDialog::getFont(&ok, f);
|
||||
if (ok)
|
||||
screenfontsModule->screenTypewriterED->setText(f.toString());
|
||||
#else
|
||||
// ?? rawName is no good
|
||||
#endif
|
||||
screenfontsModule->screenTypewriterED->setText(fontToString(f));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user