summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llbutton.cpp10
-rw-r--r--indra/llui/llbutton.h10
2 files changed, 16 insertions, 4 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 14b77925f2..a4a8cc4e17 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -85,6 +85,7 @@ LLButton::Params::Params()
image_right_pad("image_right_pad"),
image_top_pad("image_top_pad"),
image_bottom_pad("image_bottom_pad"),
+ imgoverlay_label_space("imgoverlay_label_space", 1),
label_color("label_color"),
label_color_selected("label_color_selected"), // requires is_toggle true
label_color_disabled("label_color_disabled"),
@@ -148,6 +149,7 @@ LLButton::LLButton(const LLButton::Params& p)
mImageOverlayRightPad(p.image_right_pad),
mImageOverlayTopPad(p.image_top_pad),
mImageOverlayBottomPad(p.image_bottom_pad),
+ mImgOverlayLabelSpace(p.imgoverlay_label_space),
mIsToggle(p.is_toggle),
mScaleImage(p.scale_image),
mDropShadowedText(p.label_shadow),
@@ -783,9 +785,9 @@ void LLButton::draw()
switch(mImageOverlayAlignment)
{
case LLFontGL::LEFT:
- text_left += overlay_width + 1;
+ text_left += overlay_width + mImgOverlayLabelSpace;
mImageOverlay->draw(
- mImageOverlayLeftPad,
+ mLeftHPad,
center_y - (overlay_height / 2),
overlay_width,
overlay_height,
@@ -800,9 +802,9 @@ void LLButton::draw()
overlay_color);
break;
case LLFontGL::RIGHT:
- text_right -= overlay_width + 1;
+ text_right -= overlay_width + mImgOverlayLabelSpace;
mImageOverlay->draw(
- getRect().getWidth() - mImageOverlayRightPad - overlay_width,
+ getRect().getWidth() - mRightHPad - overlay_width,
center_y - (overlay_height / 2),
overlay_width,
overlay_height,
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index 8e5f19602f..3fbc5c6785 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -112,6 +112,11 @@ public:
Optional<S32> image_top_pad;
Optional<S32> image_bottom_pad;
+ /**
+ * Space between image_overlay and label
+ */
+ Optional<S32> imgoverlay_label_space;
+
// callbacks
Optional<CommitCallbackParam> click_callback, // alias -> commit_callback
mouse_down_callback,
@@ -333,6 +338,11 @@ private:
S32 mImageOverlayTopPad;
S32 mImageOverlayBottomPad;
+ /*
+ * Space between image_overlay and label
+ */
+ S32 mImgOverlayLabelSpace;
+
F32 mHoverGlowStrength;
F32 mCurGlowStrength;