diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 68cb5164b611fa75b843e9b4ff311b3678ad8881..ba3748a5736d1118339cf350d3b6673774b50592 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) diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index 6332b2674ad31b099368e6d7ab5adf05b16425e7..5ba54edf1c70f541c47666c6ff6cfaa646c6e4ee 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -852,3 +852,8 @@ void LLToolBarButton::onMouseCaptureLost() { mIsDragged = false; } + +void LLToolBarButton::reshape(S32 width, S32 height, BOOL called_from_parent) +{ + LLButton::reshape(mWidthRange.clamp(width), height, called_from_parent); +} diff --git a/indra/llui/lltoolbar.h b/indra/llui/lltoolbar.h index 84fa7ec0df5b595ac075026d47f3dfc86c45e39e..a81a5fdb39e4c3dbf5bbbf1374330ac952b7de95 100644 --- a/indra/llui/lltoolbar.h +++ b/indra/llui/lltoolbar.h @@ -62,6 +62,8 @@ class LLToolBarButton : public LLButton BOOL handleMouseDown(S32 x, S32 y, MASK mask); BOOL handleHover(S32 x, S32 y, MASK mask); + void reshape(S32 width, S32 height, BOOL called_from_parent = true); + void setCommandId(const LLCommandId& id) { mId = id; } void setStartDragCallback(tool_startdrag_callback_t cb) { mStartDragItemCallback = cb; } diff --git a/indra/newview/skins/default/xui/en/widgets/toolbar.xml b/indra/newview/skins/default/xui/en/widgets/toolbar.xml index 09967de7cc242ed17ee981311d484c60e8bba80a..be5dfaf18c8a08145588c79371912be5476e9437 100644 --- a/indra/newview/skins/default/xui/en/widgets/toolbar.xml +++ b/indra/newview/skins/default/xui/en/widgets/toolbar.xml @@ -31,6 +31,8 @@ flash_color="EmphasisColor"/> <button_icon pad_left="10" pad_right="10" + image_bottom_pad="10" + image_top_pad="10" image_pressed="PushButton_Press" image_pressed_selected="PushButton_Selected_Press" image_selected="PushButton_Selected_Press"