From 088059724dd76739b42b73a65f5a0ceee68afb97 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Sun, 8 Aug 2010 20:32:26 +0000 Subject: [PATCH] Remove DPI from preference dialog. The variable is kept in LyXRC, since we do need the value in the code. If this is a problem, I can define some QApplication::getDPI() and give up configurability altogether. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35095 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiPrefs.cpp | 6 +- src/frontends/qt4/ui/PrefScreenFontsUi.ui | 330 ++++++++++------------ 2 files changed, 148 insertions(+), 188 deletions(-) diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp index fd66d384c1..932d0c1ad6 100644 --- a/src/frontends/qt4/GuiPrefs.cpp +++ b/src/frontends/qt4/GuiPrefs.cpp @@ -900,8 +900,6 @@ PrefScreenFonts::PrefScreenFonts(GuiPreferences * form) this, SIGNAL(changed())); connect(screenZoomSB, SIGNAL(valueChanged(int)), this, SIGNAL(changed())); - connect(screenDpiSB, SIGNAL(valueChanged(int)), - this, SIGNAL(changed())); connect(screenTinyED, SIGNAL(textChanged(QString)), this, SIGNAL(changed())); connect(screenSmallestED, SIGNAL(textChanged(QString)), @@ -950,7 +948,6 @@ void PrefScreenFonts::apply(LyXRC & rc) const rc.typewriter_font_name, rc.typewriter_font_foundry); rc.zoom = screenZoomSB->value(); - rc.dpi = screenDpiSB->value(); rc.font_sizes[FONT_SIZE_TINY] = widgetToDoubleStr(screenTinyED); rc.font_sizes[FONT_SIZE_SCRIPT] = widgetToDoubleStr(screenSmallestED); rc.font_sizes[FONT_SIZE_FOOTNOTE] = widgetToDoubleStr(screenSmallerED); @@ -967,7 +964,7 @@ void PrefScreenFonts::apply(LyXRC & rc) const || rc.roman_font_name != oldrc.roman_font_name || rc.sans_font_name != oldrc.sans_font_name || rc.typewriter_font_name != oldrc.typewriter_font_name - || rc.zoom != oldrc.zoom || rc.dpi != oldrc.dpi) { + || rc.zoom != oldrc.zoom) { // The global QPixmapCache is used in GuiPainter to cache text // painting so we must reset it in case any of the above // parameter is changed. @@ -992,7 +989,6 @@ void PrefScreenFonts::update(LyXRC const & rc) selectTypewriter(screenTypewriterCO->currentText()); screenZoomSB->setValue(rc.zoom); - screenDpiSB->setValue(rc.dpi); doubleToWidget(screenTinyED, rc.font_sizes[FONT_SIZE_TINY]); doubleToWidget(screenSmallestED, rc.font_sizes[FONT_SIZE_SCRIPT]); doubleToWidget(screenSmallerED, rc.font_sizes[FONT_SIZE_FOOTNOTE]); diff --git a/src/frontends/qt4/ui/PrefScreenFontsUi.ui b/src/frontends/qt4/ui/PrefScreenFontsUi.ui index df7bdead0a..2432cf0a3b 100644 --- a/src/frontends/qt4/ui/PrefScreenFontsUi.ui +++ b/src/frontends/qt4/ui/PrefScreenFontsUi.ui @@ -1,53 +1,41 @@ - + PrefScreenFontsUi - - + + 0 0 - 288 - 355 + 359 + 454 - + - - - - - 6 - - - 0 - + + + - - - 0 - - - 6 - - - - + + + + 20 - + false - - - - + + + + 0 0 - + 60 0 @@ -55,25 +43,25 @@ - - - + + + Sans Seri&f: - + screenSansCO - - - - + + + + 0 0 - + 60 0 @@ -81,52 +69,52 @@ - - - + + + 20 - + false - - - + + + T&ypewriter: - + screenTypewriterCO - - - + + + R&oman: - + screenRomanCO - - - - + + + + 0 0 - - - + + + 20 - + false @@ -135,52 +123,23 @@ - - - - 6 - - - 0 - + + - - - 0 - - - 6 - - - - - Screen &DPI: - - - screenDpiSB - - - - - - - 999 - - - - - - + + + + &Zoom %: - + screenZoomSB - - - + + + 999 @@ -189,13 +148,13 @@ - + Qt::Horizontal - + QSizePolicy::Expanding - + 20 20 @@ -205,144 +164,150 @@ - - - + + + Font Sizes - - + + 11 - - 6 + + 11 + + + 11 + + + 11 - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - + + + &Large: - + screenLargeED - - - + + + &Larger: - + screenLargerED - - - + + + &Largest: - + screenLargestED - - + + - - - + + + &Huge: - + screenHugeED - - - + + + &Hugest: - + screenHugerED - - - + + + S&mallest: - + screenSmallestED - - - + + + S&maller: - + screenSmallerED - - - + + + S&mall: - + screenSmallED - - - + + + &Normal: - + screenNormalED - - - + + + &Tiny: - + screenTinyED @@ -350,12 +315,12 @@ - - - + + + Qt::Horizontal - + 40 20 @@ -363,22 +328,22 @@ - - - + + + Checking this improves performance, but might decrease the on-screen quality of fonts - + &Use pixmap cache to speed up font rendering - - - + + + Qt::Vertical - + 20 6 @@ -400,7 +365,6 @@ screenSansCO screenTypewriterCO screenZoomSB - screenDpiSB screenTinyED screenSmallestED screenSmallerED @@ -413,7 +377,7 @@ screenHugerED - qt_i18n.h + qt_i18n.h -- 2.39.2