summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2009-10-14 01:51:49 +0000
committerLeyla Farazha <leyla@lindenlab.com>2009-10-14 01:51:49 +0000
commitd6db0f8b297686c6ae97ace23d0714c4ae95b1f3 (patch)
tree54ab1b9a9994f7a477a9363d6dcb7d7af9df0290 /indra/llui
parent09108591cd61bd84d3b5b661573e8df49cdbedb8 (diff)
EXT-1393 "none" does not appear in object group list
EXT-1479 I18N: string in /en/widgets/location_input.xml wont honor its translation and made tabs height customizable reviewed by Richard
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/lltabcontainer.cpp13
-rw-r--r--indra/llui/lltabcontainer.h5
2 files changed, 11 insertions, 7 deletions
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index b1067ad6f3..3ca05ff0ff 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -107,9 +107,10 @@ static LLDefaultChildRegistry::Register<LLTabContainer> r2("tab_container");
LLTabContainer::Params::Params()
: tab_width("tab_width"),
- tab_position("tab_position"),
tab_min_width("tab_min_width"),
tab_max_width("tab_max_width"),
+ tab_height("tab_height"),
+ tab_position("tab_position"),
hide_tabs("hide_tabs", false),
tab_padding_right("tab_padding_right"),
tab_top_image_unselected("tab_top_image_unselected"),
@@ -136,6 +137,7 @@ LLTabContainer::LLTabContainer(const LLTabContainer::Params& p)
mLockedTabCount(0),
mMinTabWidth(0),
mMaxTabWidth(p.tab_max_width),
+ mTabHeight(p.tab_height),
mPrevArrowBtn(NULL),
mNextArrowBtn(NULL),
mIsVertical( p.tab_position == LEFT ),
@@ -802,7 +804,6 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel)
static LLUICachedControl<S32> tabcntrv_pad ("UITabCntrvPad", 0);
static LLUICachedControl<S32> tabcntr_button_panel_overlap ("UITabCntrButtonPanelOverlap", 0);
- static LLUICachedControl<S32> tabcntr_tab_height ("UITabCntrTabHeight", 0);
static LLUICachedControl<S32> tab_padding ("UITabPadding", 0);
if (child->getParent() == this)
{
@@ -830,14 +831,14 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel)
{
if( getTabPosition() == LLTabContainer::TOP )
{
- S32 tab_height = mIsVertical ? BTN_HEIGHT : tabcntr_tab_height;
+ S32 tab_height = mIsVertical ? BTN_HEIGHT : mTabHeight;
tab_panel_top = getRect().getHeight() - getTopBorderHeight() - (tab_height - tabcntr_button_panel_overlap);
tab_panel_bottom = LLPANEL_BORDER_WIDTH;
}
else
{
tab_panel_top = getRect().getHeight() - getTopBorderHeight();
- tab_panel_bottom = (tabcntr_tab_height - tabcntr_button_panel_overlap); // Run to the edge, covering up the border
+ tab_panel_bottom = (mTabHeight - tabcntr_button_panel_overlap); // Run to the edge, covering up the border
}
}
else
@@ -886,13 +887,13 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel)
}
else if( getTabPosition() == LLTabContainer::TOP )
{
- btn_rect.setLeftTopAndSize( 0, getRect().getHeight() - getTopBorderHeight() + tab_fudge, button_width, tabcntr_tab_height );
+ btn_rect.setLeftTopAndSize( 0, getRect().getHeight() - getTopBorderHeight() + tab_fudge, button_width, mTabHeight);
tab_img = mImageTopUnselected.get();
tab_selected_img = mImageTopSelected.get();
}
else
{
- btn_rect.setOriginAndSize( 0, 0 + tab_fudge, button_width, tabcntr_tab_height );
+ btn_rect.setOriginAndSize( 0, 0 + tab_fudge, button_width, mTabHeight);
tab_img = mImageBottomUnselected.get();
tab_selected_img = mImageBottomSelected.get();
}
diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h
index 7bbecc1abc..e3af5384b1 100644
--- a/indra/llui/lltabcontainer.h
+++ b/indra/llui/lltabcontainer.h
@@ -67,7 +67,9 @@ public:
Optional<TabPosition, TabPositions> tab_position;
Optional<S32> tab_width,
tab_min_width,
- tab_max_width;
+ tab_max_width,
+ tab_height;
+
Optional<bool> hide_tabs;
Optional<S32> tab_padding_right;
@@ -246,6 +248,7 @@ private:
S32 mMaxTabWidth;
S32 mTotalTabWidth;
+ S32 mTabHeight;
LLFrameTimer mDragAndDropDelayTimer;