diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 7721137e291624a5628d10c15510d284614e9bda..e9f6288f44c94aa87469a1548885f3bbdb196a69 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 4c7400220d1883eeda4cb52ab25571683ec85aba..5e28b8cdff5a14e8fd02951c27f4565af35f40d1 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 @@ class LLButton // 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 @@ class LLButton 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 d7d61cf6cb1cc0c50f46b75c7a837d673ace3b76..2d9106923e35d476cb08d22d1acc88781abbc3bd 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 289e900eaff12dfcd59ba76ac89c2f1e8038f7db..a31842bf10eb0f90494d8e0312245efa42a12716 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 9a1b749ba7f1d2084bc0d267d13858d13d811746..13754eb06d28241fb64df04865d1619a41be2755 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 28ed56054328059e32d7edf3c0414da51fd3f5e7..d7aa71a441e7056c645c348f50fc1ee9cc3d8ef5 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>