diff options
Diffstat (limited to 'indra/llui/lltabcontainer.cpp')
-rw-r--r-- | indra/llui/lltabcontainer.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 2d9106923e..327dd01612 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 ), @@ -262,8 +266,6 @@ bool LLTabContainer::addChild(LLView* view, S32 tab_group) if (panelp) { - panelp->setSaveToXML(TRUE); - addTabPanel(TabPanelParams().panel(panelp).label(panelp->getLabel()).is_placeholder(dynamic_cast<LLPlaceHolderPanel*>(view) != NULL)); return true; } @@ -906,7 +908,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 +935,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 +959,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; @@ -1013,12 +1017,10 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) { if (textbox) { - textbox->setSaveToXML(false); addChild( textbox, 0 ); } if (btn) { - btn->setSaveToXML(false); addChild( btn, 0 ); } } @@ -1741,24 +1743,20 @@ void LLTabContainer::initButtons() } } - mPrevArrowBtn->setSaveToXML(false); mPrevArrowBtn->setTabStop(FALSE); addChild(mPrevArrowBtn); - mNextArrowBtn->setSaveToXML(false); mNextArrowBtn->setTabStop(FALSE); addChild(mNextArrowBtn); if (mJumpPrevArrowBtn) { - mJumpPrevArrowBtn->setSaveToXML(false); mJumpPrevArrowBtn->setTabStop(FALSE); addChild(mJumpPrevArrowBtn); } if (mJumpNextArrowBtn) { - mJumpNextArrowBtn->setSaveToXML(false); mJumpNextArrowBtn->setTabStop(FALSE); addChild(mJumpNextArrowBtn); } @@ -1897,6 +1895,3 @@ void LLTabContainer::commitHoveredButton(S32 x, S32 y) } } } - - - |