mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 11:16:55 +00:00
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:
parent
718e4ba012
commit
2d8b08b63c
@ -251,17 +251,17 @@ void InsetCollapsable::draw(PainterInfo & pi, int x, int y) const
|
|||||||
// Draw button first -- top, left or only
|
// Draw button first -- top, left or only
|
||||||
Dimension dimc = dimensionCollapsed();
|
Dimension dimc = dimensionCollapsed();
|
||||||
TextMetrics const & tm = pi.base.bv->textMetrics(&text_);
|
TextMetrics const & tm = pi.base.bv->textMetrics(&text_);
|
||||||
int const top = y - tm.ascent();
|
int const baseline = y - tm.ascent();
|
||||||
|
|
||||||
if (geometry() == TopButton ||
|
if (geometry() == TopButton ||
|
||||||
geometry() == LeftButton ||
|
geometry() == LeftButton ||
|
||||||
geometry() == ButtonOnly) {
|
geometry() == ButtonOnly) {
|
||||||
button_dim.x1 = xx + 0;
|
button_dim.x1 = xx + 0;
|
||||||
button_dim.x2 = xx + dimc.width();
|
button_dim.x2 = xx + dimc.width();
|
||||||
button_dim.y1 = top;
|
button_dim.y1 = baseline;
|
||||||
button_dim.y2 = top + dimc.height();
|
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 {
|
} else {
|
||||||
button_dim.x1 = 0;
|
button_dim.x1 = 0;
|
||||||
button_dim.y1 = 0;
|
button_dim.y1 = 0;
|
||||||
@ -273,19 +273,19 @@ void InsetCollapsable::draw(PainterInfo & pi, int x, int y) const
|
|||||||
switch (geometry()) {
|
switch (geometry()) {
|
||||||
case LeftButton:
|
case LeftButton:
|
||||||
textx = xx + dimc.width();
|
textx = xx + dimc.width();
|
||||||
texty = top;
|
texty = baseline;
|
||||||
InsetText::draw(pi, textx, texty);
|
InsetText::draw(pi, textx, texty);
|
||||||
break;
|
break;
|
||||||
case TopButton:
|
case TopButton:
|
||||||
textx = xx;
|
textx = xx;
|
||||||
texty = top + dimc.height();
|
texty = baseline + dimc.height();
|
||||||
InsetText::draw(pi, textx, texty);
|
InsetText::draw(pi, textx, texty);
|
||||||
break;
|
break;
|
||||||
case ButtonOnly:
|
case ButtonOnly:
|
||||||
break;
|
break;
|
||||||
case NoButton:
|
case NoButton:
|
||||||
textx = xx;
|
textx = xx;
|
||||||
texty = top;
|
texty = baseline;
|
||||||
InsetText::draw(pi, textx, texty);
|
InsetText::draw(pi, textx, texty);
|
||||||
break;
|
break;
|
||||||
case SubLabel:
|
case SubLabel:
|
||||||
|
Loading…
Reference in New Issue
Block a user