Preferences shows current zoom instead of preference's default zoom (#10455)

- Adds a currentZoom variable which holds the current zoom level.

- The zoom stored in preferences is used as default zoom level (default binding:
  M+0).

- The currentZoom is saved and restored via QSettings.

- Adds LFUN buffer-zoom for (re)setting zoom.
This commit is contained in:
Daniel Ramöller 2016-10-29 10:28:34 +02:00 committed by Guillaume MM
parent 9bf8ac4432
commit 4183a9f4dc
14 changed files with 270 additions and 177 deletions

View File

@ -123,6 +123,7 @@ Format 4
\bind "F11" "ui-toggle fullscreen"
\bind "M-0" "buffer-zoom"
\bind "M-equal" "buffer-zoom-in"
\bind "M-plus" "buffer-zoom-in"
\bind "M-minus" "buffer-zoom-out"

View File

@ -729,7 +729,7 @@ BufferParams const & Buffer::masterParams() const
double Buffer::fontScalingFactor() const
{
return isExporting() ? 75.0 * params().html_math_img_scale
: 0.01 * lyxrc.dpi * lyxrc.zoom * lyxrc.preview_scale_factor * params().display_pixel_ratio;
: 0.01 * lyxrc.dpi * lyxrc.currentZoom * lyxrc.preview_scale_factor * params().display_pixel_ratio;
}

View File

@ -463,13 +463,15 @@ enum FuncCode
LFUN_SERVER_GET_STATISTICS, // brokenclock 20141010
LFUN_BUFFER_VIEW_CACHE, // skostysh 20150401
LFUN_BUFFER_MOVE_NEXT, // skostysh 20150408
// 340
// 360
LFUN_BUFFER_MOVE_PREVIOUS, // skostysh 20150408
LFUN_TABULAR_FEATURE, // gm, 20151210
LFUN_BRANCH_INVERT, // rgheck, 20160712
LFUN_LYX_ACTIVATE, // skostysh, 20160804
LFUN_ICON_SIZE, // daniel, 20160712
// 365
LFUN_BUFFER_EXTERNAL_MODIFICATION_CLEAR,// gm, 20170302
LFUN_BUFFER_ZOOM, // daniel, 20161028
LFUN_LASTACTION // end of the table
};

View File

@ -202,7 +202,7 @@ bool Length::empty() const
int Length::inPixels(int text_width, int em_width_base) const
{
// Zoom factor specified by user in percent
double const zoom = lyxrc.zoom / 100.0; // [percent]
double const zoom = lyxrc.currentZoom / 100.0; // [percent]
// DPI setting for monitor: pixels/inch
double const dpi = lyxrc.dpi; // screen resolution [pixels/inch]

View File

@ -888,6 +888,16 @@ void LyXAction::init()
{ LFUN_BUFFER_EXTERNAL_MODIFICATION_CLEAR,
"buffer-external-modification-clear", ReadOnly, Buffer },
/*!
* \var lyx::FuncCode lyx::LFUN_BUFFER_ZOOM
* \li Action: Sets the zoom of the screen fonts.
* \li Syntax: buffer-zoom [<ZOOM>]
* \li Params: <ZOOM>: The zoom in % points (neg. or pos.), the default is to reset to zoom savd in preferences.
* \li Origin: daniel, 28 Oct 2016
* \endvar
*/
{ LFUN_BUFFER_ZOOM, "buffer-zoom", ReadOnly, Buffer },
/*!
* \var lyx::FuncCode lyx::LFUN_BUFFER_ZOOM_IN
* \li Action: Increases the zoom of the screen fonts.

View File

@ -244,6 +244,7 @@ void LyXRC::setDefaults()
dpi = 75;
// Because a screen is typically wider than a piece of paper:
zoom = 150;
currentZoom = zoom;
allow_geometry_session = true;
// Default LaTeX font size:
font_sizes[FONT_SIZE_TINY] = "5.0";

View File

@ -293,7 +293,9 @@ public:
/// Scrolling speed of the mouse wheel
double mouse_wheel_speed;
/// Zoom factor for screen fonts
unsigned int zoom;
int zoom;
/// Current zoom factor for screen fonts
int currentZoom;
/// Screen font sizes in points for each font size
std::string font_sizes[10];
/// Allow the use of scalable fonts? Default is yes.

View File

@ -41,19 +41,19 @@ MetricsBase::MetricsBase(BufferView * b, FontInfo f, int w)
textwidth(w), macro_nesting(0),
solid_line_thickness_(1), solid_line_offset_(1), dotted_line_thickness_(1)
{
if (lyxrc.zoom >= 200) {
if (lyxrc.currentZoom >= 200) {
// derive the line thickness from zoom factor
// the zoom is given in percent
// (increase thickness at 250%, 450% etc.)
solid_line_thickness_ = (lyxrc.zoom + 150) / 200;
solid_line_thickness_ = (lyxrc.currentZoom + 150) / 200;
// adjust line_offset_ too
solid_line_offset_ = 1 + solid_line_thickness_ / 2;
}
if (lyxrc.zoom >= 100) {
if (lyxrc.currentZoom >= 100) {
// derive the line thickness from zoom factor
// the zoom is given in percent
// (increase thickness at 150%, 250% etc.)
dotted_line_thickness_ = (lyxrc.zoom + 50) / 100;
dotted_line_thickness_ = (lyxrc.currentZoom + 50) / 100;
}
}

View File

@ -363,7 +363,7 @@ QFont makeQFont(FontInfo const & f)
LYXERR(Debug::FONT, "XFLD: " << font.rawName());
font.setPointSizeF(f.realSize() * lyxrc.zoom / 100.0);
font.setPointSizeF(f.realSize() * lyxrc.currentZoom / 100.0);
LYXERR(Debug::FONT, "The font has size: " << font.pointSizeF());

View File

@ -713,6 +713,7 @@ void GuiView::autoSaveThreadFinished()
void GuiView::saveLayout() const
{
QSettings settings;
settings.setValue("zoom", lyxrc.currentZoom);
settings.beginGroup("views");
settings.beginGroup(QString::number(id_));
#if defined(Q_WS_X11) || defined(QPA_XCB)
@ -742,6 +743,8 @@ void GuiView::saveUISettings() const
bool GuiView::restoreLayout()
{
QSettings settings;
lyxrc.currentZoom = settings.value("zoom", lyxrc.zoom).toInt();
lyx::dispatch(FuncRequest(LFUN_BUFFER_ZOOM, convert<docstring>(lyxrc.currentZoom)));
settings.beginGroup("views");
settings.beginGroup(QString::number(id_));
QString const icon_key = "icon_size";
@ -1999,7 +2002,7 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
bool const neg_zoom =
convert<int>(cmd.argument()) < 0 ||
(cmd.action() == LFUN_BUFFER_ZOOM_OUT && cmd.argument().empty());
if (lyxrc.zoom <= zoom_min_ && neg_zoom) {
if (lyxrc.currentZoom <= zoom_min_ && neg_zoom) {
docstring const msg =
bformat(_("Zoom level cannot be less than %1$d%."), zoom_min_);
flag.message(msg);
@ -2008,6 +2011,21 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
enable = doc_buffer;
break;
}
case LFUN_BUFFER_ZOOM: {
bool const less_than_min_zoom =
!cmd.argument().empty() && convert<int>(cmd.argument()) < zoom_min_;
if (lyxrc.currentZoom <= zoom_min_ && less_than_min_zoom) {
docstring const msg =
bformat(_("Zoom level cannot be less than %1$d%."), zoom_min_);
flag.message(msg);
enable = false;
}
else
enable = doc_buffer;
break;
}
case LFUN_BUFFER_MOVE_NEXT:
case LFUN_BUFFER_MOVE_PREVIOUS:
// we do not cycle when moving
@ -3969,22 +3987,32 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
break;
case LFUN_BUFFER_ZOOM_IN:
case LFUN_BUFFER_ZOOM_OUT: {
case LFUN_BUFFER_ZOOM_OUT:
case LFUN_BUFFER_ZOOM: {
// use a signed temp to avoid overflow
int zoom = lyxrc.zoom;
int zoom = lyxrc.currentZoom;
if (cmd.argument().empty()) {
if (cmd.action() == LFUN_BUFFER_ZOOM_IN)
if (cmd.action() == LFUN_BUFFER_ZOOM)
zoom = lyxrc.zoom;
else if (cmd.action() == LFUN_BUFFER_ZOOM_IN)
zoom += 20;
else
zoom -= 20;
} else
zoom += convert<int>(cmd.argument());
} else {
if (cmd.action() == LFUN_BUFFER_ZOOM)
zoom = convert<int>(cmd.argument());
else if (cmd.action() == LFUN_BUFFER_ZOOM_IN)
zoom += convert<int>(cmd.argument());
else
zoom -= convert<int>(cmd.argument());
}
if (zoom < static_cast<int>(zoom_min_))
zoom = zoom_min_;
lyxrc.zoom = zoom;
dr.setMessage(bformat(_("Zoom level is now %1$d%"), lyxrc.zoom));
lyxrc.currentZoom = zoom;
dr.setMessage(bformat(_("Zoom level is now %1$d%"), lyxrc.currentZoom));
// The global QPixmapCache is used in GuiPainter to cache text
// painting so we must reset it.

View File

@ -461,7 +461,7 @@ private:
QLabel * version_control_;
/// Minimum zoom percentage
static unsigned int const zoom_min_ = 10;
static int const zoom_min_ = 10;
};

View File

@ -213,7 +213,7 @@ public:
void recomputeWidth() {
cursor_width_ = lyxrc.cursor_width
? lyxrc.cursor_width
: 1 + int((lyxrc.zoom + 50) / 200.0);
: 1 + int((lyxrc.currentZoom + 50) / 200.0);
}
QRect const & rect() { return rect_; }

View File

@ -1,7 +1,8 @@
<ui version="4.0" >
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>PrefScreenFontsUi</class>
<widget class="QWidget" name="PrefScreenFontsUi" >
<property name="geometry" >
<widget class="QWidget" name="PrefScreenFontsUi">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
@ -9,53 +10,78 @@
<height>454</height>
</rect>
</property>
<property name="windowTitle" >
<property name="windowTitle">
<string/>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<layout class="QGridLayout">
<property name="leftMargin">
<number>9</number>
</property>
<property name="spacing" >
<property name="topMargin">
<number>9</number>
</property>
<property name="rightMargin">
<number>9</number>
</property>
<property name="bottomMargin">
<number>9</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<item row="0" column="0" >
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<item row="0" column="0">
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QGridLayout" >
<property name="margin" >
<layout class="QGridLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="spacing" >
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<item row="1" column="1" >
<widget class="QComboBox" name="screenSansCO" >
<property name="maxVisibleItems" >
<item row="1" column="1">
<widget class="QComboBox" name="screenSansCO">
<property name="maxVisibleItems">
<number>20</number>
</property>
<property name="duplicatesEnabled" >
<property name="duplicatesEnabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="2" >
<widget class="GuiFontExample" native="1" name="screenSansFE" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>3</hsizetype>
<vsizetype>5</vsizetype>
<item row="1" column="2">
<widget class="GuiFontExample" name="screenSansFE" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<property name="minimumSize">
<size>
<width>60</width>
<height>0</height>
@ -63,27 +89,25 @@
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="screenSansLA" >
<property name="text" >
<item row="1" column="0">
<widget class="QLabel" name="screenSansLA">
<property name="text">
<string>Sans Seri&amp;f:</string>
</property>
<property name="buddy" >
<property name="buddy">
<cstring>screenSansCO</cstring>
</property>
</widget>
</item>
<item row="0" column="2" >
<widget class="GuiFontExample" native="1" name="screenRomanFE" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>3</hsizetype>
<vsizetype>5</vsizetype>
<item row="0" column="2">
<widget class="GuiFontExample" name="screenRomanFE" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<property name="minimumSize">
<size>
<width>60</width>
<height>0</height>
@ -91,54 +115,52 @@
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QComboBox" name="screenRomanCO" >
<property name="maxVisibleItems" >
<item row="0" column="1">
<widget class="QComboBox" name="screenRomanCO">
<property name="maxVisibleItems">
<number>20</number>
</property>
<property name="duplicatesEnabled" >
<property name="duplicatesEnabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="screenTypewriterLA" >
<property name="text" >
<item row="2" column="0">
<widget class="QLabel" name="screenTypewriterLA">
<property name="text">
<string>T&amp;ypewriter:</string>
</property>
<property name="buddy" >
<property name="buddy">
<cstring>screenTypewriterCO</cstring>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="screenRomanLA" >
<property name="text" >
<item row="0" column="0">
<widget class="QLabel" name="screenRomanLA">
<property name="text">
<string>R&amp;oman:</string>
</property>
<property name="buddy" >
<property name="buddy">
<cstring>screenRomanCO</cstring>
</property>
</widget>
</item>
<item row="2" column="2" >
<widget class="GuiFontExample" native="1" name="screenTypewriterFE" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>3</hsizetype>
<vsizetype>5</vsizetype>
<item row="2" column="2">
<widget class="GuiFontExample" name="screenTypewriterFE" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QComboBox" name="screenTypewriterCO" >
<property name="maxVisibleItems" >
<item row="2" column="1">
<widget class="QComboBox" name="screenTypewriterCO">
<property name="maxVisibleItems">
<number>20</number>
</property>
<property name="duplicatesEnabled" >
<property name="duplicatesEnabled">
<bool>false</bool>
</property>
</widget>
@ -147,35 +169,53 @@
</item>
</layout>
</item>
<item row="1" column="0" >
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<item row="1" column="0">
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QGridLayout" >
<property name="margin" >
<layout class="QGridLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="spacing" >
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QLabel" name="screenZoomLA" >
<property name="text" >
<string>&amp;Zoom %:</string>
<item row="0" column="0">
<widget class="QLabel" name="screenZoomLA">
<property name="text">
<string>Default &amp;zoom %:</string>
</property>
<property name="buddy" >
<property name="buddy">
<cstring>screenZoomSB</cstring>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QSpinBox" name="screenZoomSB" >
<property name="maximum" >
<item row="0" column="1">
<widget class="QSpinBox" name="screenZoomSB">
<property name="maximum">
<number>999</number>
</property>
</widget>
@ -184,13 +224,13 @@
</item>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
@ -200,144 +240,153 @@
</item>
</layout>
</item>
<item row="2" column="0" >
<widget class="QGroupBox" name="GroupBox3" >
<property name="title" >
<item row="2" column="0">
<widget class="QGroupBox" name="GroupBox3">
<property name="title">
<string>Font Sizes</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<layout class="QGridLayout">
<property name="leftMargin">
<number>9</number>
</property>
<property name="spacing" >
<property name="topMargin">
<number>9</number>
</property>
<property name="rightMargin">
<number>9</number>
</property>
<property name="bottomMargin">
<number>9</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<item row="0" column="1" >
<widget class="QLineEdit" name="screenTinyED" />
<item row="0" column="1">
<widget class="QLineEdit" name="screenTinyED"/>
</item>
<item row="4" column="3" >
<widget class="QLineEdit" name="screenHugerED" />
<item row="4" column="3">
<widget class="QLineEdit" name="screenHugerED"/>
</item>
<item row="1" column="1" >
<widget class="QLineEdit" name="screenSmallestED" />
<item row="1" column="1">
<widget class="QLineEdit" name="screenSmallestED"/>
</item>
<item row="2" column="1" >
<widget class="QLineEdit" name="screenSmallerED" />
<item row="2" column="1">
<widget class="QLineEdit" name="screenSmallerED"/>
</item>
<item row="3" column="1" >
<widget class="QLineEdit" name="screenSmallED" />
<item row="3" column="1">
<widget class="QLineEdit" name="screenSmallED"/>
</item>
<item row="4" column="1" >
<widget class="QLineEdit" name="screenNormalED" />
<item row="4" column="1">
<widget class="QLineEdit" name="screenNormalED"/>
</item>
<item row="0" column="3" >
<widget class="QLineEdit" name="screenLargeED" />
<item row="0" column="3">
<widget class="QLineEdit" name="screenLargeED"/>
</item>
<item row="1" column="3" >
<widget class="QLineEdit" name="screenLargerED" />
<item row="1" column="3">
<widget class="QLineEdit" name="screenLargerED"/>
</item>
<item row="2" column="3" >
<widget class="QLineEdit" name="screenLargestED" />
<item row="2" column="3">
<widget class="QLineEdit" name="screenLargestED"/>
</item>
<item row="0" column="2" >
<widget class="QLabel" name="screenLargeLA" >
<property name="text" >
<item row="0" column="2">
<widget class="QLabel" name="screenLargeLA">
<property name="text">
<string>&amp;Large:</string>
</property>
<property name="buddy" >
<property name="buddy">
<cstring>screenLargeED</cstring>
</property>
</widget>
</item>
<item row="1" column="2" >
<widget class="QLabel" name="screenLargerLA" >
<property name="text" >
<item row="1" column="2">
<widget class="QLabel" name="screenLargerLA">
<property name="text">
<string>&amp;Larger:</string>
</property>
<property name="buddy" >
<property name="buddy">
<cstring>screenLargerED</cstring>
</property>
</widget>
</item>
<item row="2" column="2" >
<widget class="QLabel" name="screenLargestLA" >
<property name="text" >
<item row="2" column="2">
<widget class="QLabel" name="screenLargestLA">
<property name="text">
<string>&amp;Largest:</string>
</property>
<property name="buddy" >
<property name="buddy">
<cstring>screenLargestED</cstring>
</property>
</widget>
</item>
<item row="3" column="3" >
<widget class="QLineEdit" name="screenHugeED" />
<item row="3" column="3">
<widget class="QLineEdit" name="screenHugeED"/>
</item>
<item row="3" column="2" >
<widget class="QLabel" name="screenHugeLA" >
<property name="text" >
<item row="3" column="2">
<widget class="QLabel" name="screenHugeLA">
<property name="text">
<string>&amp;Huge:</string>
</property>
<property name="buddy" >
<property name="buddy">
<cstring>screenHugeED</cstring>
</property>
</widget>
</item>
<item row="4" column="2" >
<widget class="QLabel" name="screenHugestLA" >
<property name="text" >
<item row="4" column="2">
<widget class="QLabel" name="screenHugestLA">
<property name="text">
<string>&amp;Hugest:</string>
</property>
<property name="buddy" >
<property name="buddy">
<cstring>screenHugerED</cstring>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="screenSmallestLA" >
<property name="text" >
<item row="1" column="0">
<widget class="QLabel" name="screenSmallestLA">
<property name="text">
<string>S&amp;mallest:</string>
</property>
<property name="buddy" >
<property name="buddy">
<cstring>screenSmallestED</cstring>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="screenSmallerLA" >
<property name="text" >
<item row="2" column="0">
<widget class="QLabel" name="screenSmallerLA">
<property name="text">
<string>S&amp;maller:</string>
</property>
<property name="buddy" >
<property name="buddy">
<cstring>screenSmallerED</cstring>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="screenSmallLA" >
<property name="text" >
<item row="3" column="0">
<widget class="QLabel" name="screenSmallLA">
<property name="text">
<string>S&amp;mall:</string>
</property>
<property name="buddy" >
<property name="buddy">
<cstring>screenSmallED</cstring>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QLabel" name="screenNormalLA" >
<property name="text" >
<item row="4" column="0">
<widget class="QLabel" name="screenNormalLA">
<property name="text">
<string>&amp;Normal:</string>
</property>
<property name="buddy" >
<property name="buddy">
<cstring>screenNormalED</cstring>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="screenTinyLA" >
<property name="text" >
<item row="0" column="0">
<widget class="QLabel" name="screenTinyLA">
<property name="text">
<string>&amp;Tiny:</string>
</property>
<property name="buddy" >
<property name="buddy">
<cstring>screenTinyED</cstring>
</property>
</widget>
@ -345,12 +394,12 @@
</layout>
</widget>
</item>
<item row="2" column="1" >
<item row="2" column="1">
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
@ -358,22 +407,22 @@
</property>
</spacer>
</item>
<item row="3" column="0" >
<widget class="QCheckBox" name="pixmapCacheCB" >
<property name="toolTip" >
<item row="3" column="0">
<widget class="QCheckBox" name="pixmapCacheCB">
<property name="toolTip">
<string>Checking this improves performance, but might decrease the on-screen quality of fonts</string>
</property>
<property name="text" >
<property name="text">
<string>&amp;Use pixmap cache to speed up font rendering</string>
</property>
</widget>
</item>
<item row="4" column="0" >
<item row="4" column="0">
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>6</height>
@ -407,7 +456,7 @@
<tabstop>screenHugerED</tabstop>
</tabstops>
<includes>
<include location="local" >qt_i18n.h</include>
<include location="local">qt_i18n.h</include>
</includes>
<resources/>
<connections/>

View File

@ -14,7 +14,7 @@ using namespace std;
void test_inPixels()
{
// want to see non-zero SP
lyxrc.zoom = 100000;
lyxrc.currentZoom = 100000;
lyxrc.dpi = 72;
for (int i = Length::BP; i <= Length::UNIT_NONE; ++i) {
Length const l(2342, static_cast<Length::UNIT>(i));