summaryrefslogtreecommitdiff
path: root/indra/llui/llbutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llbutton.cpp')
-rw-r--r--indra/llui/llbutton.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 68cb5164b6..ba3748a573 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -1002,7 +1002,7 @@ void LLButton::resize(LLUIString label)
if (mImageOverlay)
{
S32 overlay_width = mImageOverlay->getWidth();
- F32 scale_factor = getRect().getHeight() / (F32)mImageOverlay->getHeight();
+ F32 scale_factor = (getRect().getHeight() - (mImageOverlayBottomPad + mImageOverlayTopPad)) / (F32)mImageOverlay->getHeight();
overlay_width = llround((F32)overlay_width * scale_factor);
switch(mImageOverlayAlignment)