From 7a7bc8d33bba19530bf71c210d996a3faf711cd1 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Fri, 23 Oct 2009 14:10:42 -0700 Subject: EXT-1742 Navbar should have a dropshadow that covers the sidepanel EXT-1563 I18N: Alt-arrow instructions in tab tooltips wont honor their translation reviewed by james --- indra/llui/lltabcontainer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/llui/lltabcontainer.cpp') diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 3ca05ff0ff..10d89dc78d 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -44,6 +44,7 @@ #include "lluictrlfactory.h" #include "llrender.h" #include "llfloater.h" +#include "lltrans.h" //---------------------------------------------------------------------------- @@ -940,8 +941,8 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) else { std::string tooltip = trimmed_label; - tooltip += "\nAlt-Left arrow for previous tab"; - tooltip += "\nAlt-Right arrow for next tab"; + tooltip += "\n" + LLTrans::getString("TooltipAltLeft"); + tooltip += "\n" + LLTrans::getString("TooltipAltRight"); LLButton::Params p; p.name(std::string(child->getName()) + " tab"); -- cgit v1.2.3 From a0e766da94d786d306a86667a27728524ca6eedb Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 28 Oct 2009 14:56:31 -0700 Subject: EXT-1697 tab label type not to spec EXT-1870 Remove default tooltips from tab_container widget EXT-1699 right and left tab edges don't align with edges of tab content area EXT-1869 tabs flash when your cursor passes over data fields reviewed by richard --- indra/llui/lltabcontainer.cpp | 38 ++++++++++---------------------------- 1 file changed, 10 insertions(+), 28 deletions(-) (limited to 'indra/llui/lltabcontainer.cpp') diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 10d89dc78d..05ef67f20a 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -153,7 +153,9 @@ LLTabContainer::LLTabContainer(const LLTabContainer::Params& p) mImageBottomUnselected(p.tab_bottom_image_unselected), mImageBottomSelected(p.tab_bottom_image_selected), mImageLeftUnselected(p.tab_left_image_unselected), - mImageLeftSelected(p.tab_left_image_selected) + mImageLeftSelected(p.tab_left_image_selected), + mFontHalign(p.font_halign), + mFont(p.font.isProvided() ? p.font() : (mIsVertical ? LLFontGL::getFontSansSerif() : LLFontGL::getFontSansSerifSmall())) { static LLUICachedControl tabcntr_vert_tab_min_width ("UITabCntrVertTabMinWidth", 0); @@ -399,12 +401,6 @@ void LLTabContainer::draw() } } } - LLUI::pushMatrix(); - { - LLUI::translate((F32)tuple->mButton->getRect().mLeft, (F32)tuple->mButton->getRect().mBottom, 0.f); - tuple->mButton->draw(); - } - LLUI::popMatrix(); idx++; } @@ -639,12 +635,6 @@ BOOL LLTabContainer::handleToolTip( S32 x, S32 y, MASK mask) } } } - - for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) - { - LLTabTuple* tuple = *iter; - tuple->mButton->setVisible( FALSE ); - } } return handled; } @@ -811,8 +801,6 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) // already a child of mine return; } - const LLFontGL* font = - (mIsVertical ? LLFontGL::getFontSansSerif() : LLFontGL::getFontSansSerifSmall()); // Store the original label for possible xml export. child->setLabel(label); @@ -822,7 +810,7 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) S32 button_width = mMinTabWidth; if (!mIsVertical) { - button_width = llclamp(font->getWidth(trimmed_label) + tab_padding, mMinTabWidth, mMaxTabWidth); + button_width = llclamp(mFont->getWidth(trimmed_label) + tab_padding, mMinTabWidth, mMaxTabWidth); } // Tab panel @@ -909,7 +897,7 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) params.name(trimmed_label); params.rect(btn_rect); params.initial_value(trimmed_label); - params.font(font); + params.font(mFont); textbox = LLUICtrlFactory::create (params); LLButton::Params p; @@ -925,12 +913,12 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) p.rect(btn_rect); p.follows.flags(FOLLOWS_TOP | FOLLOWS_LEFT); p.click_callback.function(boost::bind(&LLTabContainer::onTabBtn, this, _2, child)); - p.font(font); + p.font(mFont); p.label(trimmed_label); p.image_unselected(mImageLeftUnselected); p.image_selected(mImageLeftSelected); p.scale_image(true); - p.font_halign = LLFontGL::LEFT; + p.font_halign = mFontHalign; p.tab_stop(false); if (indent) { @@ -940,18 +928,13 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) } else { - std::string tooltip = trimmed_label; - tooltip += "\n" + LLTrans::getString("TooltipAltLeft"); - tooltip += "\n" + LLTrans::getString("TooltipAltRight"); - LLButton::Params p; p.name(std::string(child->getName()) + " tab"); p.rect(btn_rect); p.click_callback.function(boost::bind(&LLTabContainer::onTabBtn, this, _2, child)); - p.font(font); + p.font(mFont); p.label(trimmed_label); p.visible(false); - p.tool_tip(tooltip); p.scale_image(true); p.image_unselected(tab_img); p.image_selected(tab_selected_img); @@ -959,7 +942,7 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) // Try to squeeze in a bit more text p.pad_left(4); p.pad_right(2); - p.font_halign = LLFontGL::LEFT; + p.font_halign = mFontHalign; p.follows.flags = FOLLOWS_LEFT; p.follows.flags = FOLLOWS_LEFT; @@ -1445,7 +1428,6 @@ void LLTabContainer::setTabImage(LLPanel* child, std::string image_name, const L if (!mIsVertical) { - const LLFontGL* fontp = LLFontGL::getFontSansSerifSmall(); // remove current width from total tab strip width mTotalTabWidth -= tuple->mButton->getRect().getWidth(); @@ -1456,7 +1438,7 @@ void LLTabContainer::setTabImage(LLPanel* child, std::string image_name, const L tuple->mPadding = image_overlay_width; tuple->mButton->setRightHPad(6); - tuple->mButton->reshape(llclamp(fontp->getWidth(tuple->mButton->getLabelSelected()) + tab_padding + tuple->mPadding, mMinTabWidth, mMaxTabWidth), + tuple->mButton->reshape(llclamp(mFont->getWidth(tuple->mButton->getLabelSelected()) + tab_padding + tuple->mPadding, mMinTabWidth, mMaxTabWidth), tuple->mButton->getRect().getHeight()); // add back in button width to total tab strip width mTotalTabWidth += tuple->mButton->getRect().getWidth(); -- cgit v1.2.3 From 6a9de7c8ee7d3be289fbd42741a327d42b6ea9eb Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 28 Oct 2009 18:00:39 -0700 Subject: merge fix --- indra/llui/lltabcontainer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/lltabcontainer.cpp') diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 08f16a12d4..cde4c75518 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -155,7 +155,7 @@ LLTabContainer::LLTabContainer(const LLTabContainer::Params& p) mTotalTabWidth(0), mTabPosition(p.tab_position), mFontHalign(p.font_halign), - mFont(p.font.isProvided() ? p.font() : (mIsVertical ? LLFontGL::getFontSansSerif() : LLFontGL::getFontSansSerifSmall())) + mFont(p.font.isProvided() ? p.font() : (mIsVertical ? LLFontGL::getFontSansSerif() : LLFontGL::getFontSansSerifSmall())), mFirstTabParams(p.first_tab), mMiddleTabParams(p.middle_tab), mLastTabParams(p.last_tab) -- cgit v1.2.3