diff options
| -rw-r--r-- | indra/llui/lltabcontainer.cpp | 13 | ||||
| -rw-r--r-- | indra/llui/lltabcontainer.h | 9 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/widgets/tab_container.xml | 10 | 
3 files changed, 24 insertions, 8 deletions
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 2d9106923e..83e2e3db50 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -120,6 +120,8 @@ LLTabContainer::Params::Params()  	tab_min_width("tab_min_width"),  	tab_max_width("tab_max_width"),  	tab_height("tab_height"), +	label_pad_bottom("label_pad_bottom"), +	label_pad_left("label_pad_left"),  	tab_position("tab_position"),  	hide_tabs("hide_tabs", false),  	tab_padding_right("tab_padding_right"), @@ -145,6 +147,8 @@ LLTabContainer::LLTabContainer(const LLTabContainer::Params& p)  	mMinTabWidth(0),  	mMaxTabWidth(p.tab_max_width),  	mTabHeight(p.tab_height), +	mLabelPadBottom(p.label_pad_bottom), +	mLabelPadLeft(p.label_pad_left),  	mPrevArrowBtn(NULL),  	mNextArrowBtn(NULL),  	mIsVertical( p.tab_position == LEFT ), @@ -906,7 +910,7 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel)  	if (placeholder)  	{ -		btn_rect.translate(0, -3); // *TODO: make configurable +		btn_rect.translate(0, -6); // *TODO: make configurable  		LLTextBox::Params params;  		params.name(trimmed_label);  		params.rect(btn_rect); @@ -933,6 +937,7 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel)  			p.image_selected(mMiddleTabParams.tab_left_image_selected);  			p.scale_image(true);  			p.font_halign = mFontHalign; +			p.pad_bottom( mLabelPadBottom );  			p.tab_stop(false);  			p.label_shadow(false);  			if (indent) @@ -956,8 +961,9 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel)  			p.tab_stop(false);  			p.label_shadow(false);  			// Try to squeeze in a bit more text -			p.pad_left(4); +			p.pad_left( mLabelPadLeft );  			p.pad_right(2); +			p.pad_bottom( mLabelPadBottom );  			p.font_halign = mFontHalign;  			p.follows.flags = FOLLOWS_LEFT;  			p.follows.flags = FOLLOWS_LEFT; @@ -1897,6 +1903,3 @@ void LLTabContainer::commitHoveredButton(S32 x, S32 y)  		}  	}  } - - - diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h index be9c6c7d06..5d0f194bf9 100644 --- a/indra/llui/lltabcontainer.h +++ b/indra/llui/lltabcontainer.h @@ -79,7 +79,9 @@ public:  		Optional<S32>						tab_width,  											tab_min_width,  											tab_max_width, -											tab_height; +											tab_height, +											label_pad_bottom, +											label_pad_left;  		Optional<bool>						hide_tabs;  		Optional<S32>						tab_padding_right; @@ -261,6 +263,11 @@ private:  	S32								mTotalTabWidth;  	S32								mTabHeight; +	// Padding under the text labels of tab buttons +	S32								mLabelPadBottom; +	// Padding to the left of text labels of tab buttons +	S32								mLabelPadLeft; +  	LLFrameTimer					mDragAndDropDelayTimer;  	LLFontGL::HAlign                mFontHalign; diff --git a/indra/newview/skins/default/xui/en/widgets/tab_container.xml b/indra/newview/skins/default/xui/en/widgets/tab_container.xml index 477c6fb8b8..0174782c5b 100644 --- a/indra/newview/skins/default/xui/en/widgets/tab_container.xml +++ b/indra/newview/skins/default/xui/en/widgets/tab_container.xml @@ -1,9 +1,15 @@  <?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<!-- +label_pad_bottom - vertical padding under tab button labels +label_pad_left - padding to the left of tab button labels +-->  <tab_container tab_min_width="60"                 tab_max_width="150"                 font_halign="center"                 font="SansSerifSmall"  -               tab_height="21"> +               tab_height="21" +               label_pad_bottom="2" +               label_pad_left="4">    <first_tab tab_top_image_unselected="TabTop_Left_Off"                 tab_top_image_selected="TabTop_Left_Selected"                 tab_bottom_image_unselected="Toolbar_Left_Off" @@ -22,4 +28,4 @@                 tab_bottom_image_selected="Toolbar_Right_Selected"                 tab_left_image_unselected="TabTop_Middle_Off"                 tab_left_image_selected="TabTop_Middle_Selected"/> -</tab_container>
\ No newline at end of file +</tab_container>  | 
