summaryrefslogtreecommitdiff
path: root/indra/llui/llbutton.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-02-05 16:47:38 -0800
committerLeyla Farazha <leyla@lindenlab.com>2010-02-05 16:47:38 -0800
commit91b2ff00ae874f938919373c0db3de0721c7bf25 (patch)
treee0c4c8e11cd4a158c1f7d53fea7434eee3781d97 /indra/llui/llbutton.cpp
parent617a7a0ebdd47aeea578456f4ed0d91ab8582a0b (diff)
parent68ea862c96a96be631505e88ae870d6aab066eb9 (diff)
Merge
Diffstat (limited to 'indra/llui/llbutton.cpp')
-rw-r--r--indra/llui/llbutton.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 4944ed4fe7..14b77925f2 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -771,12 +771,7 @@ void LLButton::draw()
center_x++;
}
- S32 text_width_delta = overlay_width + 1;
- // if image paddings set, they should participate in scaling process
- S32 image_size_delta = mImageOverlayTopPad + mImageOverlayBottomPad;
- overlay_width = overlay_width - image_size_delta;
- overlay_height = overlay_height - image_size_delta;
-
+ center_y += (mImageOverlayBottomPad - mImageOverlayTopPad);
// fade out overlay images on disabled buttons
LLColor4 overlay_color = mImageOverlayColor.get();
if (!enabled)
@@ -788,10 +783,9 @@ void LLButton::draw()
switch(mImageOverlayAlignment)
{
case LLFontGL::LEFT:
- text_left += overlay_width + mImageOverlayRightPad + 1;
- text_width -= text_width_delta;
+ text_left += overlay_width + 1;
mImageOverlay->draw(
- mLeftHPad,
+ mImageOverlayLeftPad,
center_y - (overlay_height / 2),
overlay_width,
overlay_height,
@@ -806,10 +800,9 @@ void LLButton::draw()
overlay_color);
break;
case LLFontGL::RIGHT:
- text_right -= overlay_width + mImageOverlayLeftPad+ 1;
- text_width -= text_width_delta;
+ text_right -= overlay_width + 1;
mImageOverlay->draw(
- getRect().getWidth() - mRightHPad - overlay_width,
+ getRect().getWidth() - mImageOverlayRightPad - overlay_width,
center_y - (overlay_height / 2),
overlay_width,
overlay_height,