summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/llbutton.cpp7
-rw-r--r--indra/llui/llbutton.h3
-rw-r--r--indra/llui/lltabcontainer.cpp2
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llappviewer.cpp1
-rw-r--r--indra/newview/skins/default/xui/en/widgets/button.xml1
6 files changed, 9 insertions, 16 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 7721137e29..e9f6288f44 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -63,7 +63,6 @@ template class LLButton* LLView::getChild<class LLButton>(
// globals loaded from settings.xml
S32 LLBUTTON_H_PAD = 0;
-S32 LLBUTTON_V_PAD = 0;
S32 BTN_HEIGHT_SMALL= 0;
S32 BTN_HEIGHT = 0;
@@ -93,6 +92,7 @@ LLButton::Params::Params()
flash_color("flash_color"),
pad_right("pad_right", LLUI::sSettingGroups["config"]->getS32("ButtonHPad")),
pad_left("pad_left", LLUI::sSettingGroups["config"]->getS32("ButtonHPad")),
+ pad_bottom("pad_bottom"),
click_callback("click_callback"),
mouse_down_callback("mouse_down_callback"),
mouse_up_callback("mouse_up_callback"),
@@ -148,6 +148,7 @@ LLButton::LLButton(const LLButton::Params& p)
mHAlign(p.font_halign),
mLeftHPad(p.pad_left),
mRightHPad(p.pad_right),
+ mBottomVPad(p.pad_bottom),
mHoverGlowStrength(p.hover_glow_amount),
mCommitOnReturn(p.commit_on_return),
mFadeWhenDisabled(FALSE),
@@ -839,7 +840,9 @@ void LLButton::draw()
// LLFontGL::render expects S32 max_chars variable but process in a separate way -1 value.
// Due to U32_MAX is equal to S32 -1 value I have rest this value for non-ellipses mode.
// Not sure if it is really needed. Probably S32_MAX should be always passed as max_chars.
- mLastDrawCharsCount = mGLFont->render(label, 0, (F32)x, (F32)(LLBUTTON_V_PAD + y_offset),
+ mLastDrawCharsCount = mGLFont->render(label, 0,
+ (F32)x,
+ (F32)(mBottomVPad + y_offset),
label_color % alpha,
mHAlign, LLFontGL::BOTTOM,
LLFontGL::NORMAL,
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index 4c7400220d..5e28b8cdff 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -49,7 +49,6 @@
// PLEASE please use these "constants" when building your own buttons.
// They are loaded from settings.xml at run time.
extern S32 LLBUTTON_H_PAD;
-extern S32 LLBUTTON_V_PAD;
extern S32 BTN_HEIGHT_SMALL;
extern S32 BTN_HEIGHT;
@@ -105,6 +104,7 @@ public:
// layout
Optional<S32> pad_right;
Optional<S32> pad_left;
+ Optional<S32> pad_bottom; // under text label
// callbacks
Optional<CommitCallbackParam> click_callback, // alias -> commit_callback
@@ -310,6 +310,7 @@ private:
LLFontGL::HAlign mHAlign;
S32 mLeftHPad;
S32 mRightHPad;
+ S32 mBottomVPad; // under text label
F32 mHoverGlowStrength;
F32 mCurGlowStrength;
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index d7d61cf6cb..2d9106923e 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -906,7 +906,7 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel)
if (placeholder)
{
- btn_rect.translate(0, -LLBUTTON_V_PAD-2);
+ btn_rect.translate(0, -3); // *TODO: make configurable
LLTextBox::Params params;
params.name(trimmed_label);
params.rect(btn_rect);
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 289e900eaf..a31842bf10 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -1068,17 +1068,6 @@
<key>Value</key>
<integer>23</integer>
</map>
- <key>ButtonVPad</key>
- <map>
- <key>Comment</key>
- <string>Default vertical spacing between buttons (pixels)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>CacheLocation</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 9a1b749ba7..13754eb06d 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -391,7 +391,6 @@ bool handleCrashSubmitBehaviorChanged(const LLSD& newvalue)
static void settings_to_globals()
{
LLBUTTON_H_PAD = gSavedSettings.getS32("ButtonHPad");
- LLBUTTON_V_PAD = gSavedSettings.getS32("ButtonVPad");
BTN_HEIGHT_SMALL = gSavedSettings.getS32("ButtonHeightSmall");
BTN_HEIGHT = gSavedSettings.getS32("ButtonHeight");
diff --git a/indra/newview/skins/default/xui/en/widgets/button.xml b/indra/newview/skins/default/xui/en/widgets/button.xml
index 28ed560543..d7aa71a441 100644
--- a/indra/newview/skins/default/xui/en/widgets/button.xml
+++ b/indra/newview/skins/default/xui/en/widgets/button.xml
@@ -18,5 +18,6 @@
font="SansSerifSmall"
hover_glow_amount="0.15"
halign="center"
+ pad_bottom="2"
scale_image="true">
</button>