UI purdyness had its flaws - should revisit later

This commit is contained in:
Siana Gearz
2012-02-06 20:12:02 +01:00
parent 787a18d3a8
commit e1e34623cb

View File

@@ -611,7 +611,6 @@ void LLButton::draw()
S32 text_left = mLeftHPad;
S32 text_right = getRect().getWidth() - mRightHPad;
S32 text_width = getRect().getWidth() - mLeftHPad - mRightHPad;
S32 text_middle = text_left + text_width/2;
// draw overlay image
if (mImageOverlay.notNull() && mImageOverlay->getWidth() > 1)
@@ -646,7 +645,6 @@ void LLButton::draw()
case LLFontGL::LEFT:
text_left += overlay_width + 1;
text_width -= overlay_width + 1;
text_middle += (overlay_width+1)/4;
mImageOverlay->draw(
mLeftHPad,
center_y - (overlay_height / 2),
@@ -665,7 +663,6 @@ void LLButton::draw()
case LLFontGL::RIGHT:
text_right -= overlay_width + 1;
text_width -= overlay_width + 1;
text_middle += (overlay_width+1)/4;
mImageOverlay->draw(
getRect().getWidth() - mRightHPad - overlay_width,
center_y - (overlay_height / 2),
@@ -691,10 +688,7 @@ void LLButton::draw()
x = text_right;
break;
case LLFontGL::HCENTER:
{
S32 actual_width = mGLFont->getWidth(label.c_str());
x = llmax(text_middle, text_left + actual_width/2);
}
x = text_left + (text_width / 2);
break;
case LLFontGL::LEFT:
default:
@@ -710,7 +704,6 @@ void LLButton::draw()
x++;
}
mGLFont->render(label, 0,
(F32)x,
(F32)(LLBUTTON_V_PAD + y_offset),