mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
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:
parent
9bf8ac4432
commit
4183a9f4dc
@ -123,6 +123,7 @@ Format 4
|
|||||||
|
|
||||||
\bind "F11" "ui-toggle fullscreen"
|
\bind "F11" "ui-toggle fullscreen"
|
||||||
|
|
||||||
|
\bind "M-0" "buffer-zoom"
|
||||||
\bind "M-equal" "buffer-zoom-in"
|
\bind "M-equal" "buffer-zoom-in"
|
||||||
\bind "M-plus" "buffer-zoom-in"
|
\bind "M-plus" "buffer-zoom-in"
|
||||||
\bind "M-minus" "buffer-zoom-out"
|
\bind "M-minus" "buffer-zoom-out"
|
||||||
|
@ -729,7 +729,7 @@ BufferParams const & Buffer::masterParams() const
|
|||||||
double Buffer::fontScalingFactor() const
|
double Buffer::fontScalingFactor() const
|
||||||
{
|
{
|
||||||
return isExporting() ? 75.0 * params().html_math_img_scale
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -463,13 +463,15 @@ enum FuncCode
|
|||||||
LFUN_SERVER_GET_STATISTICS, // brokenclock 20141010
|
LFUN_SERVER_GET_STATISTICS, // brokenclock 20141010
|
||||||
LFUN_BUFFER_VIEW_CACHE, // skostysh 20150401
|
LFUN_BUFFER_VIEW_CACHE, // skostysh 20150401
|
||||||
LFUN_BUFFER_MOVE_NEXT, // skostysh 20150408
|
LFUN_BUFFER_MOVE_NEXT, // skostysh 20150408
|
||||||
// 340
|
// 360
|
||||||
LFUN_BUFFER_MOVE_PREVIOUS, // skostysh 20150408
|
LFUN_BUFFER_MOVE_PREVIOUS, // skostysh 20150408
|
||||||
LFUN_TABULAR_FEATURE, // gm, 20151210
|
LFUN_TABULAR_FEATURE, // gm, 20151210
|
||||||
LFUN_BRANCH_INVERT, // rgheck, 20160712
|
LFUN_BRANCH_INVERT, // rgheck, 20160712
|
||||||
LFUN_LYX_ACTIVATE, // skostysh, 20160804
|
LFUN_LYX_ACTIVATE, // skostysh, 20160804
|
||||||
LFUN_ICON_SIZE, // daniel, 20160712
|
LFUN_ICON_SIZE, // daniel, 20160712
|
||||||
|
// 365
|
||||||
LFUN_BUFFER_EXTERNAL_MODIFICATION_CLEAR,// gm, 20170302
|
LFUN_BUFFER_EXTERNAL_MODIFICATION_CLEAR,// gm, 20170302
|
||||||
|
LFUN_BUFFER_ZOOM, // daniel, 20161028
|
||||||
LFUN_LASTACTION // end of the table
|
LFUN_LASTACTION // end of the table
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ bool Length::empty() const
|
|||||||
int Length::inPixels(int text_width, int em_width_base) const
|
int Length::inPixels(int text_width, int em_width_base) const
|
||||||
{
|
{
|
||||||
// Zoom factor specified by user in percent
|
// 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
|
// DPI setting for monitor: pixels/inch
|
||||||
double const dpi = lyxrc.dpi; // screen resolution [pixels/inch]
|
double const dpi = lyxrc.dpi; // screen resolution [pixels/inch]
|
||||||
|
@ -888,6 +888,16 @@ void LyXAction::init()
|
|||||||
{ LFUN_BUFFER_EXTERNAL_MODIFICATION_CLEAR,
|
{ LFUN_BUFFER_EXTERNAL_MODIFICATION_CLEAR,
|
||||||
"buffer-external-modification-clear", ReadOnly, Buffer },
|
"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
|
* \var lyx::FuncCode lyx::LFUN_BUFFER_ZOOM_IN
|
||||||
* \li Action: Increases the zoom of the screen fonts.
|
* \li Action: Increases the zoom of the screen fonts.
|
||||||
|
@ -244,6 +244,7 @@ void LyXRC::setDefaults()
|
|||||||
dpi = 75;
|
dpi = 75;
|
||||||
// Because a screen is typically wider than a piece of paper:
|
// Because a screen is typically wider than a piece of paper:
|
||||||
zoom = 150;
|
zoom = 150;
|
||||||
|
currentZoom = zoom;
|
||||||
allow_geometry_session = true;
|
allow_geometry_session = true;
|
||||||
// Default LaTeX font size:
|
// Default LaTeX font size:
|
||||||
font_sizes[FONT_SIZE_TINY] = "5.0";
|
font_sizes[FONT_SIZE_TINY] = "5.0";
|
||||||
|
@ -293,7 +293,9 @@ public:
|
|||||||
/// Scrolling speed of the mouse wheel
|
/// Scrolling speed of the mouse wheel
|
||||||
double mouse_wheel_speed;
|
double mouse_wheel_speed;
|
||||||
/// Zoom factor for screen fonts
|
/// 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
|
/// Screen font sizes in points for each font size
|
||||||
std::string font_sizes[10];
|
std::string font_sizes[10];
|
||||||
/// Allow the use of scalable fonts? Default is yes.
|
/// Allow the use of scalable fonts? Default is yes.
|
||||||
|
@ -41,19 +41,19 @@ MetricsBase::MetricsBase(BufferView * b, FontInfo f, int w)
|
|||||||
textwidth(w), macro_nesting(0),
|
textwidth(w), macro_nesting(0),
|
||||||
solid_line_thickness_(1), solid_line_offset_(1), dotted_line_thickness_(1)
|
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
|
// derive the line thickness from zoom factor
|
||||||
// the zoom is given in percent
|
// the zoom is given in percent
|
||||||
// (increase thickness at 250%, 450% etc.)
|
// (increase thickness at 250%, 450% etc.)
|
||||||
solid_line_thickness_ = (lyxrc.zoom + 150) / 200;
|
solid_line_thickness_ = (lyxrc.currentZoom + 150) / 200;
|
||||||
// adjust line_offset_ too
|
// adjust line_offset_ too
|
||||||
solid_line_offset_ = 1 + solid_line_thickness_ / 2;
|
solid_line_offset_ = 1 + solid_line_thickness_ / 2;
|
||||||
}
|
}
|
||||||
if (lyxrc.zoom >= 100) {
|
if (lyxrc.currentZoom >= 100) {
|
||||||
// derive the line thickness from zoom factor
|
// derive the line thickness from zoom factor
|
||||||
// the zoom is given in percent
|
// the zoom is given in percent
|
||||||
// (increase thickness at 150%, 250% etc.)
|
// (increase thickness at 150%, 250% etc.)
|
||||||
dotted_line_thickness_ = (lyxrc.zoom + 50) / 100;
|
dotted_line_thickness_ = (lyxrc.currentZoom + 50) / 100;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -363,7 +363,7 @@ QFont makeQFont(FontInfo const & f)
|
|||||||
|
|
||||||
LYXERR(Debug::FONT, "XFLD: " << font.rawName());
|
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());
|
LYXERR(Debug::FONT, "The font has size: " << font.pointSizeF());
|
||||||
|
|
||||||
|
@ -713,6 +713,7 @@ void GuiView::autoSaveThreadFinished()
|
|||||||
void GuiView::saveLayout() const
|
void GuiView::saveLayout() const
|
||||||
{
|
{
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
|
settings.setValue("zoom", lyxrc.currentZoom);
|
||||||
settings.beginGroup("views");
|
settings.beginGroup("views");
|
||||||
settings.beginGroup(QString::number(id_));
|
settings.beginGroup(QString::number(id_));
|
||||||
#if defined(Q_WS_X11) || defined(QPA_XCB)
|
#if defined(Q_WS_X11) || defined(QPA_XCB)
|
||||||
@ -742,6 +743,8 @@ void GuiView::saveUISettings() const
|
|||||||
bool GuiView::restoreLayout()
|
bool GuiView::restoreLayout()
|
||||||
{
|
{
|
||||||
QSettings settings;
|
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("views");
|
||||||
settings.beginGroup(QString::number(id_));
|
settings.beginGroup(QString::number(id_));
|
||||||
QString const icon_key = "icon_size";
|
QString const icon_key = "icon_size";
|
||||||
@ -1999,7 +2002,7 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
|
|||||||
bool const neg_zoom =
|
bool const neg_zoom =
|
||||||
convert<int>(cmd.argument()) < 0 ||
|
convert<int>(cmd.argument()) < 0 ||
|
||||||
(cmd.action() == LFUN_BUFFER_ZOOM_OUT && cmd.argument().empty());
|
(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 =
|
docstring const msg =
|
||||||
bformat(_("Zoom level cannot be less than %1$d%."), zoom_min_);
|
bformat(_("Zoom level cannot be less than %1$d%."), zoom_min_);
|
||||||
flag.message(msg);
|
flag.message(msg);
|
||||||
@ -2008,6 +2011,21 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
|
|||||||
enable = doc_buffer;
|
enable = doc_buffer;
|
||||||
break;
|
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_NEXT:
|
||||||
case LFUN_BUFFER_MOVE_PREVIOUS:
|
case LFUN_BUFFER_MOVE_PREVIOUS:
|
||||||
// we do not cycle when moving
|
// we do not cycle when moving
|
||||||
@ -3969,22 +3987,32 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case LFUN_BUFFER_ZOOM_IN:
|
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
|
// use a signed temp to avoid overflow
|
||||||
int zoom = lyxrc.zoom;
|
int zoom = lyxrc.currentZoom;
|
||||||
if (cmd.argument().empty()) {
|
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;
|
zoom += 20;
|
||||||
else
|
else
|
||||||
zoom -= 20;
|
zoom -= 20;
|
||||||
} else
|
} else {
|
||||||
zoom += convert<int>(cmd.argument());
|
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_))
|
if (zoom < static_cast<int>(zoom_min_))
|
||||||
zoom = 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
|
// The global QPixmapCache is used in GuiPainter to cache text
|
||||||
// painting so we must reset it.
|
// painting so we must reset it.
|
||||||
|
@ -461,7 +461,7 @@ private:
|
|||||||
QLabel * version_control_;
|
QLabel * version_control_;
|
||||||
|
|
||||||
/// Minimum zoom percentage
|
/// Minimum zoom percentage
|
||||||
static unsigned int const zoom_min_ = 10;
|
static int const zoom_min_ = 10;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -213,7 +213,7 @@ public:
|
|||||||
void recomputeWidth() {
|
void recomputeWidth() {
|
||||||
cursor_width_ = lyxrc.cursor_width
|
cursor_width_ = lyxrc.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_; }
|
QRect const & rect() { return rect_; }
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
<ui version="4.0" >
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
<class>PrefScreenFontsUi</class>
|
<class>PrefScreenFontsUi</class>
|
||||||
<widget class="QWidget" name="PrefScreenFontsUi" >
|
<widget class="QWidget" name="PrefScreenFontsUi">
|
||||||
<property name="geometry" >
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
@ -9,53 +10,78 @@
|
|||||||
<height>454</height>
|
<height>454</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle" >
|
<property name="windowTitle">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout">
|
||||||
<property name="margin" >
|
<property name="leftMargin">
|
||||||
<number>9</number>
|
<number>9</number>
|
||||||
</property>
|
</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>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0" >
|
<item row="0" column="0">
|
||||||
<layout class="QHBoxLayout" >
|
<layout class="QHBoxLayout">
|
||||||
<property name="margin" >
|
<property name="spacing">
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing" >
|
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</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>
|
<item>
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout">
|
||||||
<property name="margin" >
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</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>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="1" column="1" >
|
<item row="1" column="1">
|
||||||
<widget class="QComboBox" name="screenSansCO" >
|
<widget class="QComboBox" name="screenSansCO">
|
||||||
<property name="maxVisibleItems" >
|
<property name="maxVisibleItems">
|
||||||
<number>20</number>
|
<number>20</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="duplicatesEnabled" >
|
<property name="duplicatesEnabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="2" >
|
<item row="1" column="2">
|
||||||
<widget class="GuiFontExample" native="1" name="screenSansFE" >
|
<widget class="GuiFontExample" name="screenSansFE" native="true">
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy">
|
||||||
<sizepolicy>
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
||||||
<hsizetype>3</hsizetype>
|
|
||||||
<vsizetype>5</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize" >
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>60</width>
|
<width>60</width>
|
||||||
<height>0</height>
|
<height>0</height>
|
||||||
@ -63,27 +89,25 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" >
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="screenSansLA" >
|
<widget class="QLabel" name="screenSansLA">
|
||||||
<property name="text" >
|
<property name="text">
|
||||||
<string>Sans Seri&f:</string>
|
<string>Sans Seri&f:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy" >
|
<property name="buddy">
|
||||||
<cstring>screenSansCO</cstring>
|
<cstring>screenSansCO</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2" >
|
<item row="0" column="2">
|
||||||
<widget class="GuiFontExample" native="1" name="screenRomanFE" >
|
<widget class="GuiFontExample" name="screenRomanFE" native="true">
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy">
|
||||||
<sizepolicy>
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
||||||
<hsizetype>3</hsizetype>
|
|
||||||
<vsizetype>5</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize" >
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>60</width>
|
<width>60</width>
|
||||||
<height>0</height>
|
<height>0</height>
|
||||||
@ -91,54 +115,52 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1" >
|
<item row="0" column="1">
|
||||||
<widget class="QComboBox" name="screenRomanCO" >
|
<widget class="QComboBox" name="screenRomanCO">
|
||||||
<property name="maxVisibleItems" >
|
<property name="maxVisibleItems">
|
||||||
<number>20</number>
|
<number>20</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="duplicatesEnabled" >
|
<property name="duplicatesEnabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" >
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="screenTypewriterLA" >
|
<widget class="QLabel" name="screenTypewriterLA">
|
||||||
<property name="text" >
|
<property name="text">
|
||||||
<string>T&ypewriter:</string>
|
<string>T&ypewriter:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy" >
|
<property name="buddy">
|
||||||
<cstring>screenTypewriterCO</cstring>
|
<cstring>screenTypewriterCO</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0" >
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="screenRomanLA" >
|
<widget class="QLabel" name="screenRomanLA">
|
||||||
<property name="text" >
|
<property name="text">
|
||||||
<string>R&oman:</string>
|
<string>R&oman:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy" >
|
<property name="buddy">
|
||||||
<cstring>screenRomanCO</cstring>
|
<cstring>screenRomanCO</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="2" >
|
<item row="2" column="2">
|
||||||
<widget class="GuiFontExample" native="1" name="screenTypewriterFE" >
|
<widget class="GuiFontExample" name="screenTypewriterFE" native="true">
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy">
|
||||||
<sizepolicy>
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
||||||
<hsizetype>3</hsizetype>
|
|
||||||
<vsizetype>5</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1" >
|
<item row="2" column="1">
|
||||||
<widget class="QComboBox" name="screenTypewriterCO" >
|
<widget class="QComboBox" name="screenTypewriterCO">
|
||||||
<property name="maxVisibleItems" >
|
<property name="maxVisibleItems">
|
||||||
<number>20</number>
|
<number>20</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="duplicatesEnabled" >
|
<property name="duplicatesEnabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@ -147,35 +169,53 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" >
|
<item row="1" column="0">
|
||||||
<layout class="QHBoxLayout" >
|
<layout class="QHBoxLayout">
|
||||||
<property name="margin" >
|
<property name="spacing">
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing" >
|
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</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>
|
<item>
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout">
|
||||||
<property name="margin" >
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</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>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0" >
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="screenZoomLA" >
|
<widget class="QLabel" name="screenZoomLA">
|
||||||
<property name="text" >
|
<property name="text">
|
||||||
<string>&Zoom %:</string>
|
<string>Default &zoom %:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy" >
|
<property name="buddy">
|
||||||
<cstring>screenZoomSB</cstring>
|
<cstring>screenZoomSB</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1" >
|
<item row="0" column="1">
|
||||||
<widget class="QSpinBox" name="screenZoomSB" >
|
<widget class="QSpinBox" name="screenZoomSB">
|
||||||
<property name="maximum" >
|
<property name="maximum">
|
||||||
<number>999</number>
|
<number>999</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@ -184,13 +224,13 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer>
|
<spacer>
|
||||||
<property name="orientation" >
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeType" >
|
<property name="sizeType">
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
<enum>QSizePolicy::Expanding</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
<height>20</height>
|
<height>20</height>
|
||||||
@ -200,144 +240,153 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" >
|
<item row="2" column="0">
|
||||||
<widget class="QGroupBox" name="GroupBox3" >
|
<widget class="QGroupBox" name="GroupBox3">
|
||||||
<property name="title" >
|
<property name="title">
|
||||||
<string>Font Sizes</string>
|
<string>Font Sizes</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout">
|
||||||
<property name="margin" >
|
<property name="leftMargin">
|
||||||
<number>9</number>
|
<number>9</number>
|
||||||
</property>
|
</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>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="1" >
|
<item row="0" column="1">
|
||||||
<widget class="QLineEdit" name="screenTinyED" />
|
<widget class="QLineEdit" name="screenTinyED"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="3" >
|
<item row="4" column="3">
|
||||||
<widget class="QLineEdit" name="screenHugerED" />
|
<widget class="QLineEdit" name="screenHugerED"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1" >
|
<item row="1" column="1">
|
||||||
<widget class="QLineEdit" name="screenSmallestED" />
|
<widget class="QLineEdit" name="screenSmallestED"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1" >
|
<item row="2" column="1">
|
||||||
<widget class="QLineEdit" name="screenSmallerED" />
|
<widget class="QLineEdit" name="screenSmallerED"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1" >
|
<item row="3" column="1">
|
||||||
<widget class="QLineEdit" name="screenSmallED" />
|
<widget class="QLineEdit" name="screenSmallED"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1" >
|
<item row="4" column="1">
|
||||||
<widget class="QLineEdit" name="screenNormalED" />
|
<widget class="QLineEdit" name="screenNormalED"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="3" >
|
<item row="0" column="3">
|
||||||
<widget class="QLineEdit" name="screenLargeED" />
|
<widget class="QLineEdit" name="screenLargeED"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="3" >
|
<item row="1" column="3">
|
||||||
<widget class="QLineEdit" name="screenLargerED" />
|
<widget class="QLineEdit" name="screenLargerED"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="3" >
|
<item row="2" column="3">
|
||||||
<widget class="QLineEdit" name="screenLargestED" />
|
<widget class="QLineEdit" name="screenLargestED"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2" >
|
<item row="0" column="2">
|
||||||
<widget class="QLabel" name="screenLargeLA" >
|
<widget class="QLabel" name="screenLargeLA">
|
||||||
<property name="text" >
|
<property name="text">
|
||||||
<string>&Large:</string>
|
<string>&Large:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy" >
|
<property name="buddy">
|
||||||
<cstring>screenLargeED</cstring>
|
<cstring>screenLargeED</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="2" >
|
<item row="1" column="2">
|
||||||
<widget class="QLabel" name="screenLargerLA" >
|
<widget class="QLabel" name="screenLargerLA">
|
||||||
<property name="text" >
|
<property name="text">
|
||||||
<string>&Larger:</string>
|
<string>&Larger:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy" >
|
<property name="buddy">
|
||||||
<cstring>screenLargerED</cstring>
|
<cstring>screenLargerED</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="2" >
|
<item row="2" column="2">
|
||||||
<widget class="QLabel" name="screenLargestLA" >
|
<widget class="QLabel" name="screenLargestLA">
|
||||||
<property name="text" >
|
<property name="text">
|
||||||
<string>&Largest:</string>
|
<string>&Largest:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy" >
|
<property name="buddy">
|
||||||
<cstring>screenLargestED</cstring>
|
<cstring>screenLargestED</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="3" >
|
<item row="3" column="3">
|
||||||
<widget class="QLineEdit" name="screenHugeED" />
|
<widget class="QLineEdit" name="screenHugeED"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="2" >
|
<item row="3" column="2">
|
||||||
<widget class="QLabel" name="screenHugeLA" >
|
<widget class="QLabel" name="screenHugeLA">
|
||||||
<property name="text" >
|
<property name="text">
|
||||||
<string>&Huge:</string>
|
<string>&Huge:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy" >
|
<property name="buddy">
|
||||||
<cstring>screenHugeED</cstring>
|
<cstring>screenHugeED</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="2" >
|
<item row="4" column="2">
|
||||||
<widget class="QLabel" name="screenHugestLA" >
|
<widget class="QLabel" name="screenHugestLA">
|
||||||
<property name="text" >
|
<property name="text">
|
||||||
<string>&Hugest:</string>
|
<string>&Hugest:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy" >
|
<property name="buddy">
|
||||||
<cstring>screenHugerED</cstring>
|
<cstring>screenHugerED</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" >
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="screenSmallestLA" >
|
<widget class="QLabel" name="screenSmallestLA">
|
||||||
<property name="text" >
|
<property name="text">
|
||||||
<string>S&mallest:</string>
|
<string>S&mallest:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy" >
|
<property name="buddy">
|
||||||
<cstring>screenSmallestED</cstring>
|
<cstring>screenSmallestED</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" >
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="screenSmallerLA" >
|
<widget class="QLabel" name="screenSmallerLA">
|
||||||
<property name="text" >
|
<property name="text">
|
||||||
<string>S&maller:</string>
|
<string>S&maller:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy" >
|
<property name="buddy">
|
||||||
<cstring>screenSmallerED</cstring>
|
<cstring>screenSmallerED</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" >
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="screenSmallLA" >
|
<widget class="QLabel" name="screenSmallLA">
|
||||||
<property name="text" >
|
<property name="text">
|
||||||
<string>S&mall:</string>
|
<string>S&mall:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy" >
|
<property name="buddy">
|
||||||
<cstring>screenSmallED</cstring>
|
<cstring>screenSmallED</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0" >
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="screenNormalLA" >
|
<widget class="QLabel" name="screenNormalLA">
|
||||||
<property name="text" >
|
<property name="text">
|
||||||
<string>&Normal:</string>
|
<string>&Normal:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy" >
|
<property name="buddy">
|
||||||
<cstring>screenNormalED</cstring>
|
<cstring>screenNormalED</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0" >
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="screenTinyLA" >
|
<widget class="QLabel" name="screenTinyLA">
|
||||||
<property name="text" >
|
<property name="text">
|
||||||
<string>&Tiny:</string>
|
<string>&Tiny:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy" >
|
<property name="buddy">
|
||||||
<cstring>screenTinyED</cstring>
|
<cstring>screenTinyED</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@ -345,12 +394,12 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1" >
|
<item row="2" column="1">
|
||||||
<spacer>
|
<spacer>
|
||||||
<property name="orientation" >
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>40</width>
|
<width>40</width>
|
||||||
<height>20</height>
|
<height>20</height>
|
||||||
@ -358,22 +407,22 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" >
|
<item row="3" column="0">
|
||||||
<widget class="QCheckBox" name="pixmapCacheCB" >
|
<widget class="QCheckBox" name="pixmapCacheCB">
|
||||||
<property name="toolTip" >
|
<property name="toolTip">
|
||||||
<string>Checking this improves performance, but might decrease the on-screen quality of fonts</string>
|
<string>Checking this improves performance, but might decrease the on-screen quality of fonts</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text" >
|
<property name="text">
|
||||||
<string>&Use pixmap cache to speed up font rendering</string>
|
<string>&Use pixmap cache to speed up font rendering</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0" >
|
<item row="4" column="0">
|
||||||
<spacer>
|
<spacer>
|
||||||
<property name="orientation" >
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
<height>6</height>
|
<height>6</height>
|
||||||
@ -407,7 +456,7 @@
|
|||||||
<tabstop>screenHugerED</tabstop>
|
<tabstop>screenHugerED</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<includes>
|
<includes>
|
||||||
<include location="local" >qt_i18n.h</include>
|
<include location="local">qt_i18n.h</include>
|
||||||
</includes>
|
</includes>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
@ -14,7 +14,7 @@ using namespace std;
|
|||||||
void test_inPixels()
|
void test_inPixels()
|
||||||
{
|
{
|
||||||
// want to see non-zero SP
|
// want to see non-zero SP
|
||||||
lyxrc.zoom = 100000;
|
lyxrc.currentZoom = 100000;
|
||||||
lyxrc.dpi = 72;
|
lyxrc.dpi = 72;
|
||||||
for (int i = Length::BP; i <= Length::UNIT_NONE; ++i) {
|
for (int i = Length::BP; i <= Length::UNIT_NONE; ++i) {
|
||||||
Length const l(2342, static_cast<Length::UNIT>(i));
|
Length const l(2342, static_cast<Length::UNIT>(i));
|
||||||
|
Loading…
Reference in New Issue
Block a user