From 2d8b08b63ca1bc0caf1d08831515dbf5c0b7319c Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Thu, 6 Sep 2007 12:00:32 +0000 Subject: [PATCH] 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 --- src/insets/InsetCollapsable.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/insets/InsetCollapsable.cpp b/src/insets/InsetCollapsable.cpp index 5d4e052a93..fa596d8e7c 100644 --- a/src/insets/InsetCollapsable.cpp +++ b/src/insets/InsetCollapsable.cpp @@ -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: -- 2.39.2