From e1e34623cbea6ff29359a871a99744e749304520 Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Mon, 6 Feb 2012 20:12:02 +0100 Subject: [PATCH] UI purdyness had its flaws - should revisit later --- indra/llui/llbutton.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index e508e6837..c4bdbfc4a 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -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),