mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
When using pixmap cache, add word spacing to signature
Fixes bug #9971.
This commit is contained in:
parent
3b6919217b
commit
8d088df4df
@ -90,7 +90,9 @@ void GuiPainter::setQPainterPen(QColor const & col,
|
||||
}
|
||||
|
||||
|
||||
QString GuiPainter::generateStringSignature(QString const & str, FontInfo const & f)
|
||||
QString GuiPainter::generateStringSignature(QString const & str,
|
||||
FontInfo const & f,
|
||||
double wordspacing)
|
||||
{
|
||||
QString sig = str;
|
||||
sig.append(QChar(static_cast<short>(f.family())));
|
||||
@ -100,6 +102,7 @@ QString GuiPainter::generateStringSignature(QString const & str, FontInfo const
|
||||
Color const & color = f.realColor();
|
||||
sig.append(QChar(static_cast<short>(color.baseColor)));
|
||||
sig.append(QChar(static_cast<short>(color.mergeColor)));
|
||||
sig.append(QString::number(wordspacing));
|
||||
if (!monochrome_min_.empty()) {
|
||||
QColor const & min = monochrome_min_.top();
|
||||
QColor const & max = monochrome_max_.top();
|
||||
@ -404,7 +407,7 @@ int GuiPainter::text(int x, int y, docstring const & s,
|
||||
|
||||
if (use_pixmap_cache_) {
|
||||
QPixmap pm;
|
||||
QString key = generateStringSignature(str, f);
|
||||
QString key = generateStringSignature(str, f, wordspacing);
|
||||
|
||||
// Warning: Left bearing is in general negative! Only the case
|
||||
// where left bearing is negative is of interest WRT the
|
||||
|
@ -203,7 +203,8 @@ private:
|
||||
/// possibly apply monochrome mode
|
||||
QColor filterColor(QColor const & col);
|
||||
///
|
||||
QString generateStringSignature(QString const & str, FontInfo const & f);
|
||||
QString generateStringSignature(QString const & str, FontInfo const & f,
|
||||
double wordspacing);
|
||||
};
|
||||
|
||||
} // namespace frontend
|
||||
|
Loading…
Reference in New Issue
Block a user