From 37392b4b776705b9a0953bda241d351539a2bec9 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Fri, 4 Jun 2010 09:15:44 -0700 Subject: removed duplicate winmm entry for debug builds --- indra/newview/viewer_manifest.py | 1 - 1 file changed, 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 2a966f4adf..668e21c253 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -349,7 +349,6 @@ class WindowsManifest(ViewerManifest): self.path("qtwebkitd4.dll") self.path("qtxmlpatternsd4.dll") self.path("ssleay32.dll") - self.path("winmm.dll") # For WebKit/Qt plugin runtimes (image format plugins) if self.prefix(src="imageformats", dst="imageformats"): -- cgit v1.2.3 From 05d7addde73511d303f9203d0dc007ebb2e5b299 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Fri, 4 Jun 2010 12:24:40 -0700 Subject: made LLStringUtil::null const --- indra/llcommon/llstring.h | 4 ++-- indra/newview/llnamelistctrl.cpp | 4 ++-- indra/newview/llnamelistctrl.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index ad8f8632a2..8071c8aa2d 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -249,7 +249,7 @@ public: ///////////////////////////////////////////////////////////////////////////////////////// // Static Utility functions that operate on std::strings - static std::basic_string null; + static const std::basic_string null; typedef std::map format_map_t; LL_COMMON_API static void getTokens(const std::basic_string& instr, std::vector >& tokens, const std::basic_string& delims); @@ -371,7 +371,7 @@ private: LL_COMMON_API static size_type getSubstitution(const std::basic_string& instr, size_type& start, std::vector >& tokens); }; -template std::basic_string LLStringUtilBase::null; +template const std::basic_string LLStringUtilBase::null; template std::string LLStringUtilBase::sLocale; typedef LLStringUtilBase LLStringUtil; diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index d605d4430e..d09f729943 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -72,7 +72,7 @@ LLNameListCtrl::LLNameListCtrl(const LLNameListCtrl::Params& p) // public void LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPosition pos, - BOOL enabled, std::string& suffix) + BOOL enabled, const std::string& suffix) { //llinfos << "LLNameListCtrl::addNameItem " << agent_id << llendl; @@ -268,7 +268,7 @@ LLScrollListItem* LLNameListCtrl::addElement(const LLSD& element, EAddPosition p LLScrollListItem* LLNameListCtrl::addNameItemRow( const LLNameListCtrl::NameItem& name_item, EAddPosition pos, - std::string& suffix) + const std::string& suffix) { LLUUID id = name_item.value().asUUID(); LLNameListItem* item = NULL; diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h index 1c26ee5db4..ee71db7540 100644 --- a/indra/newview/llnamelistctrl.h +++ b/indra/newview/llnamelistctrl.h @@ -90,11 +90,11 @@ public: // Add a user to the list by name. It will be added, the name // requested from the cache, and updated as necessary. void addNameItem(const LLUUID& agent_id, EAddPosition pos = ADD_BOTTOM, - BOOL enabled = TRUE, std::string& suffix = LLStringUtil::null); + BOOL enabled = TRUE, const std::string& suffix = LLStringUtil::null); void addNameItem(NameItem& item, EAddPosition pos = ADD_BOTTOM); /*virtual*/ LLScrollListItem* addElement(const LLSD& element, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL); - LLScrollListItem* addNameItemRow(const NameItem& value, EAddPosition pos = ADD_BOTTOM, std::string& suffix = LLStringUtil::null); + LLScrollListItem* addNameItemRow(const NameItem& value, EAddPosition pos = ADD_BOTTOM, const std::string& suffix = LLStringUtil::null); // Add a user to the list by name. It will be added, the name // requested from the cache, and updated as necessary. -- cgit v1.2.3 From 46e1253ee11cd2aca41314ec4e9c053bddd7a0b4 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Fri, 4 Jun 2010 14:25:51 -0700 Subject: DEV-50015 FIX Implement changes to the Buy L$ button in the top bar of the viewer reviewed by Mani --- indra/llui/lltextbase.cpp | 11 ++----- indra/newview/llstatusbar.cpp | 17 ++++++----- indra/newview/skins/default/textures/textures.xml | 2 +- .../skins/default/textures/widgets/buy_off.png | Bin 54754 -> 399 bytes .../skins/default/textures/widgets/buy_over.png | Bin 54772 -> 415 bytes .../skins/default/textures/widgets/buy_press.png | Bin 54861 -> 461 bytes .../skins/default/xui/en/panel_status_bar.xml | 34 ++++++++++++--------- 7 files changed, 33 insertions(+), 31 deletions(-) (limited to 'indra') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 55dbf50fd7..d86709c448 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1101,7 +1101,7 @@ S32 LLTextBase::getLeftOffset(S32 width) case LLFontGL::LEFT: return mHPad; case LLFontGL::HCENTER: - return mHPad + (mVisibleTextRect.getWidth() - width - mHPad) / 2; + return mHPad + llmax(0, (mVisibleTextRect.getWidth() - width - mHPad) / 2); case LLFontGL::RIGHT: return mVisibleTextRect.getWidth() - width; default: @@ -1207,11 +1207,6 @@ void LLTextBase::reflow() // grow line height as necessary based on reported height of this segment line_height = llmax(line_height, segment_height); remaining_pixels -= segment_width; - if (remaining_pixels < 0) - { - // getNumChars() and getDimensions() should return consistent results - remaining_pixels = 0; - } seg_offset += character_count; @@ -1893,7 +1888,7 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round, { // Figure out which line we're nearest to. LLRect visible_region = getVisibleDocumentRect(); - + // binary search for line that starts before local_y line_list_t::const_iterator line_iter = std::lower_bound(mLineInfoList.begin(), mLineInfoList.end(), local_y - mVisibleTextRect.mBottom + visible_region.mBottom, compare_bottom()); @@ -1903,7 +1898,7 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round, } S32 pos = getLength(); - S32 start_x = mVisibleTextRect.mLeft + line_iter->mRect.mLeft; + S32 start_x = mVisibleTextRect.mLeft + line_iter->mRect.mLeft - visible_region.mLeft; segment_set_t::iterator line_seg_iter; S32 line_seg_offset; diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 5628205dd4..ac419d8dc7 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -394,18 +394,21 @@ void LLStatusBar::setBalance(S32 balance) { std::string money_str = LLResMgr::getInstance()->getMonetaryString( balance ); - LLButton* btn_buy_currency = getChild("buycurrency"); + LLTextBox* balance_box = getChild("balance"); LLStringUtil::format_map_t string_args; string_args["[AMT]"] = llformat("%s", money_str.c_str()); std::string label_str = getString("buycurrencylabel", string_args); - btn_buy_currency->setLabel(label_str); + balance_box->setValue(label_str); - // Resize the balance button so that the label fits it, and the button expands to the left. - // *TODO: LLButton should have an option where to expand. + // Resize the L$ balance background to be wide enough for your balance plus the buy button { - S32 saved_right = btn_buy_currency->getRect().mRight; - btn_buy_currency->autoResize(); - btn_buy_currency->translate(saved_right - btn_buy_currency->getRect().mRight, 0); + const S32 HPAD = 24; + LLRect balance_rect = balance_box->getTextBoundingRect(); + LLRect buy_rect = getChildView("buyL")->getRect(); + LLView* balance_bg_view = getChildView("balance_bg"); + LLRect balance_bg_rect = balance_bg_view->getRect(); + balance_bg_rect.mLeft = balance_bg_rect.mRight - (buy_rect.getWidth() + balance_rect.getWidth() + HPAD); + balance_bg_view->setShape(balance_bg_rect); } if (mBalance && (fabs((F32)(mBalance - balance)) > gSavedSettings.getF32("UISndMoneyChangeThreshold"))) diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 93c805f724..1a05dbacd2 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -667,7 +667,7 @@ with the same filename but different name - + diff --git a/indra/newview/skins/default/textures/widgets/buy_off.png b/indra/newview/skins/default/textures/widgets/buy_off.png index 961ad071d4..ee5979046f 100644 Binary files a/indra/newview/skins/default/textures/widgets/buy_off.png and b/indra/newview/skins/default/textures/widgets/buy_off.png differ diff --git a/indra/newview/skins/default/textures/widgets/buy_over.png b/indra/newview/skins/default/textures/widgets/buy_over.png index 0be19f8a31..93adb68c86 100644 Binary files a/indra/newview/skins/default/textures/widgets/buy_over.png and b/indra/newview/skins/default/textures/widgets/buy_over.png differ diff --git a/indra/newview/skins/default/textures/widgets/buy_press.png b/indra/newview/skins/default/textures/widgets/buy_press.png index d6f587464d..3f442d6eaa 100644 Binary files a/indra/newview/skins/default/textures/widgets/buy_press.png and b/indra/newview/skins/default/textures/widgets/buy_press.png differ diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml index 008aa1acc0..43513e1ab6 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -41,32 +41,35 @@ name="buycurrencylabel"> L$ [AMT] -