InsetCollapsable::draw(): Rename 'top' local variable to baseline as that's what it is really.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20100 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-09-06 12:00:32 +00:00
parent 718e4ba012
commit 2d8b08b63c

View File

@ -251,17 +251,17 @@ void InsetCollapsable::draw(PainterInfo & pi, int x, int y) const
// Draw button first -- top, left or only
Dimension dimc = dimensionCollapsed();
TextMetrics const & tm = pi.base.bv->textMetrics(&text_);
int const top = y - tm.ascent();
int const baseline = y - tm.ascent();
if (geometry() == TopButton ||
geometry() == LeftButton ||
geometry() == ButtonOnly) {
button_dim.x1 = xx + 0;
button_dim.x2 = xx + dimc.width();
button_dim.y1 = top;
button_dim.y2 = top + dimc.height();
button_dim.y1 = baseline;
button_dim.y2 = baseline + dimc.height();
pi.pain.buttonText(xx, top + dimc.asc, layout_.labelstring, layout_.labelfont, mouse_hover_);
pi.pain.buttonText(xx, baseline + dimc.asc, layout_.labelstring, layout_.labelfont, mouse_hover_);
} else {
button_dim.x1 = 0;
button_dim.y1 = 0;
@ -273,19 +273,19 @@ void InsetCollapsable::draw(PainterInfo & pi, int x, int y) const
switch (geometry()) {
case LeftButton:
textx = xx + dimc.width();
texty = top;
texty = baseline;
InsetText::draw(pi, textx, texty);
break;
case TopButton:
textx = xx;
texty = top + dimc.height();
texty = baseline + dimc.height();
InsetText::draw(pi, textx, texty);
break;
case ButtonOnly:
break;
case NoButton:
textx = xx;
texty = top;
texty = baseline;
InsetText::draw(pi, textx, texty);
break;
case SubLabel: