mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Fix display of math hull inset in RTL context
The inversion of margin was done in the wrong way for RTL support.
This commit is contained in:
parent
2d95f8fc16
commit
b469c142ad
@ -2050,8 +2050,14 @@ void TextMetrics::drawParagraph(PainterInfo & pi, pit_type const pit, int const
|
|||||||
size_t const nrows = pm.rows().size();
|
size_t const nrows = pm.rows().size();
|
||||||
int const wh = bv_->workHeight();
|
int const wh = bv_->workHeight();
|
||||||
// Remember left and right margin for drawing math numbers
|
// Remember left and right margin for drawing math numbers
|
||||||
Changer changeleft = changeVar(pi.leftx, x + leftMargin(pit));
|
Changer changeleft, changeright;
|
||||||
Changer changeright = changeVar(pi.rightx, x + width() - rightMargin(pit));
|
if (text_->isRTL(pit)) {
|
||||||
|
changeleft = changeVar(pi.leftx, x + rightMargin(pit));
|
||||||
|
changeright = changeVar(pi.rightx, x + width() - leftMargin(pit));
|
||||||
|
} else {
|
||||||
|
changeleft = changeVar(pi.leftx, x + leftMargin(pit));
|
||||||
|
changeright = changeVar(pi.rightx, x + width() - rightMargin(pit));
|
||||||
|
}
|
||||||
|
|
||||||
// Use fast lane in nodraw stage.
|
// Use fast lane in nodraw stage.
|
||||||
if (pi.pain.isNull()) {
|
if (pi.pain.isNull()) {
|
||||||
@ -2100,9 +2106,6 @@ void TextMetrics::drawParagraph(PainterInfo & pi, pit_type const pit, int const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (text_->isRTL(pit))
|
|
||||||
swap(pi.leftx, pi.rightx);
|
|
||||||
|
|
||||||
BookmarksSection::BookmarkPosList bpl =
|
BookmarksSection::BookmarkPosList bpl =
|
||||||
theSession().bookmarks().bookmarksInPar(bv_->buffer().fileName(), pm.id());
|
theSession().bookmarks().bookmarksInPar(bv_->buffer().fileName(), pm.id());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user