mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 03:36:39 +00:00
InsetText::draw() Painting tweaks; reduce the frame by two pixels.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22998 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f30f4129e9
commit
b0b7fbad8e
@ -185,13 +185,14 @@ void InsetText::draw(PainterInfo & pi, int x, int y) const
|
||||
TextMetrics & tm = pi.base.bv->textMetrics(&text_);
|
||||
|
||||
if (drawFrame_ || pi.full_repaint) {
|
||||
int const w = tm.width() + 2 * TEXT_TO_INSET_OFFSET;
|
||||
int const w = tm.width() + TEXT_TO_INSET_OFFSET;
|
||||
int const yframe = y - TEXT_TO_INSET_OFFSET - tm.ascent();
|
||||
int const h = tm.height() + 2 * TEXT_TO_INSET_OFFSET;
|
||||
int const xframe = x + TEXT_TO_INSET_OFFSET / 2;
|
||||
if (pi.full_repaint)
|
||||
pi.pain.fillRectangle(x, yframe, w, h, backgroundColor());
|
||||
pi.pain.fillRectangle(xframe, yframe, w, h, backgroundColor());
|
||||
if (drawFrame_)
|
||||
pi.pain.rectangle(x, yframe, w, h, frameColor());
|
||||
pi.pain.rectangle(xframe, yframe, w, h, frameColor());
|
||||
}
|
||||
tm.draw(pi, x + TEXT_TO_INSET_OFFSET, y);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user