From 2d830ab23b7ec25b6aea35b722c4b952b036f026 Mon Sep 17 00:00:00 2001 From: Stefan Schimanski Date: Sat, 26 Jan 2008 01:14:37 +0000 Subject: [PATCH] * move the Pixmap Cache check box where it belongs: screen fonts git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22677 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiPrefs.cpp | 16 ++++++----- src/frontends/qt4/ui/PrefScreenFontsUi.ui | 11 +++++-- src/frontends/qt4/ui/PrefUi.ui | 35 ----------------------- 3 files changed, 18 insertions(+), 44 deletions(-) diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp index ee5c28ab38..0e923ec50c 100644 --- a/src/frontends/qt4/GuiPrefs.cpp +++ b/src/frontends/qt4/GuiPrefs.cpp @@ -437,6 +437,8 @@ PrefScreenFonts::PrefScreenFonts(GuiPreferences * form, QWidget * parent) this, SIGNAL(changed())); connect(screenHugerED, SIGNAL(textChanged(QString)), this, SIGNAL(changed())); + connect(pixmapCacheCB, SIGNAL(toggled(bool)), + this, SIGNAL(changed())); screenTinyED->setValidator(new QDoubleValidator(screenTinyED)); screenSmallestED->setValidator(new QDoubleValidator(screenSmallestED)); @@ -474,6 +476,7 @@ void PrefScreenFonts::apply(LyXRC & rc) const rc.font_sizes[FONT_SIZE_LARGEST] = fromqstr(screenLargestED->text()); rc.font_sizes[FONT_SIZE_HUGE] = fromqstr(screenHugeED->text()); rc.font_sizes[FONT_SIZE_HUGER] = fromqstr(screenHugerED->text()); + rc.use_pixmap_cache = pixmapCacheCB->isChecked(); if (rc.font_sizes != oldrc.font_sizes || rc.roman_font_name != oldrc.roman_font_name @@ -515,6 +518,12 @@ void PrefScreenFonts::update(LyXRC const & rc) screenLargestED->setText(toqstr(rc.font_sizes[FONT_SIZE_LARGEST])); screenHugeED->setText(toqstr(rc.font_sizes[FONT_SIZE_HUGE])); screenHugerED->setText(toqstr(rc.font_sizes[FONT_SIZE_HUGER])); + + pixmapCacheCB->setChecked(rc.use_pixmap_cache); +#if defined(Q_WS_X11) + pixmapCacheGB->setEnabled(false); +#endif + } @@ -1631,8 +1640,6 @@ PrefUserInterface::PrefUserInterface(GuiPreferences * form, QWidget * parent) this, SIGNAL(changed())); connect(tooltipCB, SIGNAL(toggled(bool)), this, SIGNAL(changed())); - connect(pixmapCacheCB, SIGNAL(toggled(bool)), - this, SIGNAL(changed())); lastfilesSB->setMaximum(maxlastfiles); } @@ -1654,7 +1661,6 @@ void PrefUserInterface::apply(LyXRC & rc) const rc.make_backup = autoSaveCB->isChecked(); rc.num_lastfiles = lastfilesSB->value(); rc.use_tooltip = tooltipCB->isChecked(); - rc.use_pixmap_cache = pixmapCacheCB->isChecked(); } @@ -1675,10 +1681,6 @@ void PrefUserInterface::update(LyXRC const & rc) autoSaveCB->setChecked(rc.make_backup); lastfilesSB->setValue(rc.num_lastfiles); tooltipCB->setChecked(rc.use_tooltip); - pixmapCacheCB->setChecked(rc.use_pixmap_cache); -#if defined(Q_WS_X11) - pixmapCacheGB->setEnabled(false); -#endif } diff --git a/src/frontends/qt4/ui/PrefScreenFontsUi.ui b/src/frontends/qt4/ui/PrefScreenFontsUi.ui index 5a23fdc17a..d94627af67 100644 --- a/src/frontends/qt4/ui/PrefScreenFontsUi.ui +++ b/src/frontends/qt4/ui/PrefScreenFontsUi.ui @@ -5,8 +5,8 @@ 0 0 - 342 - 365 + 371 + 482 @@ -353,6 +353,13 @@ + + + + Use Pixmap Cache to speed up font rendering + + + diff --git a/src/frontends/qt4/ui/PrefUi.ui b/src/frontends/qt4/ui/PrefUi.ui index 614eb8bcea..3ed020782b 100644 --- a/src/frontends/qt4/ui/PrefUi.ui +++ b/src/frontends/qt4/ui/PrefUi.ui @@ -128,40 +128,6 @@ p, li { white-space: pre-wrap; } - - - - Pixmap Cache - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - true - - - - 9 - - - 6 - - - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Checking this improves performance, but might decrease the on-screen quality of fonts.</p></body></html> - - - Enable Pi&xmap Cache - - - - - - @@ -346,7 +312,6 @@ p, li { white-space: pre-wrap; } cursorFollowsCB sortEnvironmentsCB macroEditStyleCO - pixmapCacheCB qt_helpers.h -- 2.39.5