diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 55dbf50fd7e1e61f8501ecf00595b6f1c13a2838..d86709c448a0db179f995624dbdb3a45bd892f15 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 5628205dd4e0661e19eb5d1672d3b1a3efe893cd..ac419d8dc7d983818862b4728375e7b0d3914b30 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<LLButton>("buycurrency");
+	LLTextBox* balance_box = getChild<LLTextBox>("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 93c805f72435bd450773e4a926ba19ad15b29ac3..1a05dbacd24ddf55cb6a659c6ae655a69aead373 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
   <texture name="Progress_11" file_name="icons/Progress_11.png" preload="true" />
   <texture name="Progress_12" file_name="icons/Progress_12.png" preload="true" />
 
-  <texture name="bevel_background" file_name="widgets/bevel_background.png" preload="true" scale.left="12" scale.top="15" scale.right="120" scale.bottom="2"/>
+  <texture name="bevel_background" file_name="widgets/bevel_background.png" preload="true" scale.left="12" scale.top="15" scale.right="108" scale.bottom="2"/>
   <texture name="buy_off" file_name="widgets/buy_off.png" preload="true" scale.left="2" scale.top="15" scale.right="67" scale.bottom="4"/>
   <texture name="buy_over" file_name="widgets/buy_over.png" preload="true" scale.left="2" scale.top="15" scale.right="67" scale.bottom="4"/>
   <texture name="buy_press" file_name="widgets/buy_press.png" preload="true" scale.left="2" scale.top="15" scale.right="67" scale.bottom="4"/>
diff --git a/indra/newview/skins/default/textures/widgets/buy_off.png b/indra/newview/skins/default/textures/widgets/buy_off.png
index 961ad071d4242cf7928137525ad1846d002dff48..ee5979046f56f015254bf2b0eb3d784abe1e3cc7 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 0be19f8a31a51ece6397d0f12579c889fa9699e8..93adb68c86bc69574f701516b01adfd6ea695659 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 d6f587464db39abee6592da3119ea666ee7378b8..3f442d6eaa3077a9e6bbfd4b634c3419b84616a7 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 008aa1acc0880fd33c0d1084cf330ecefb8befac..43513e1ab6a5e09a7df4bbc118407e1ff8905293 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]
     </panel.string>
-    <button
+  <panel
+    height="18"
+    left="-315"
+    width="95"
+    top="1"
+    follows="right|top" 
+    name="balance_bg" 
+    bg_visible="true"
+    background_opaque="true" 
+    bg_opaque_image="bevel_background">
+    <text
      auto_resize="true"
      halign="center"
-	 enabled="false"
      font="SansSerifSmall"
-     follows="right|top"
-     image_overlay=""
-     image_selected="bevel_background"
-     image_unselected="bevel_background"
-     image_pressed="bevel_background"
+     follows="all"
      height="18"
-     right="-275"
-     label_shadow="false"
-     name="buycurrency"
-     label_color_disabled="ButtonLabelColor"
-     image_color_disabled="White"
+     left="0" 
+     name="balance"
      tool_tip="My Balance"
-     pad_left="12"
-     pad_right="12" 
+     v_pad="4"
      top="0"
+     wrap="false" 
+     value="L$20" 
      width="40" />
     <button
      auto_resize="true"
      halign="center"
      font="SansSerifSmall"
-     follows="right|top"
+     follows="right|top|bottom"
      image_hover_unselected="buy_over"
      image_unselected="buy_off"
      image_pressed="buy_press"
@@ -81,6 +84,7 @@
      tool_tip="Click to buy more L$"
      top="0"
      width="55" />
+  </panel>
     <text
      type="string"
      font="SansSerifSmall"