diff options
Diffstat (limited to 'linden/indra/newview/llstatusbar.cpp')
-rw-r--r-- | linden/indra/newview/llstatusbar.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/linden/indra/newview/llstatusbar.cpp b/linden/indra/newview/llstatusbar.cpp index a358f1e..22c0a2a 100644 --- a/linden/indra/newview/llstatusbar.cpp +++ b/linden/indra/newview/llstatusbar.cpp | |||
@@ -209,7 +209,13 @@ void LLStatusBar::draw() | |||
209 | { | 209 | { |
210 | refresh(); | 210 | refresh(); |
211 | 211 | ||
212 | LLView::draw(); | 212 | if (mBgVisible) |
213 | { | ||
214 | gl_drop_shadow(0, mRect.getHeight(), mRect.getWidth(), 0, | ||
215 | LLUI::sColorsGroup->getColor("ColorDropShadow"), | ||
216 | LLUI::sConfigGroup->getS32("DropShadowFloater") ); | ||
217 | } | ||
218 | LLPanel::draw(); | ||
213 | } | 219 | } |
214 | 220 | ||
215 | 221 | ||
@@ -262,6 +268,12 @@ void LLStatusBar::refresh() | |||
262 | const S32 MENU_RIGHT = gMenuBarView->getRightmostMenuEdge(); | 268 | const S32 MENU_RIGHT = gMenuBarView->getRightmostMenuEdge(); |
263 | S32 x = MENU_RIGHT + MENU_PARCEL_SPACING; | 269 | S32 x = MENU_RIGHT + MENU_PARCEL_SPACING; |
264 | S32 y = 0; | 270 | S32 y = 0; |
271 | |||
272 | // reshape menu bar to its content's width | ||
273 | if (MENU_RIGHT != gMenuBarView->getRect().getWidth()) | ||
274 | { | ||
275 | gMenuBarView->reshape(MENU_RIGHT, gMenuBarView->getRect().getHeight()); | ||
276 | } | ||
265 | 277 | ||
266 | LLViewerRegion *region = gAgent.getRegion(); | 278 | LLViewerRegion *region = gAgent.getRegion(); |
267 | LLParcel *parcel = gParcelMgr->getAgentParcel(); | 279 | LLParcel *parcel = gParcelMgr->getAgentParcel(); |
@@ -448,6 +460,7 @@ void LLStatusBar::setVisibleForMouselook(bool visible) | |||
448 | mSGBandwidth->setVisible(visible); | 460 | mSGBandwidth->setVisible(visible); |
449 | mSGPacketLoss->setVisible(visible); | 461 | mSGPacketLoss->setVisible(visible); |
450 | mBtnBuyCurrency->setVisible(visible); | 462 | mBtnBuyCurrency->setVisible(visible); |
463 | setBackgroundVisible(visible); | ||
451 | } | 464 | } |
452 | 465 | ||
453 | void LLStatusBar::debitBalance(S32 debit) | 466 | void LLStatusBar::debitBalance(S32 debit) |
@@ -484,8 +497,8 @@ void LLStatusBar::setBalance(S32 balance) | |||
484 | 497 | ||
485 | void LLStatusBar::setHealth(S32 health) | 498 | void LLStatusBar::setHealth(S32 health) |
486 | { | 499 | { |
487 | char buffer[MAX_STRING]; | 500 | char buffer[MAX_STRING]; /* Flawfinder: ignore */ |
488 | sprintf(buffer, "%d%%", health); | 501 | snprintf(buffer, MAX_STRING, "%d%%", health); /* Flawfinder: ignore */ |
489 | //llinfos << "Setting health to: " << buffer << llendl; | 502 | //llinfos << "Setting health to: " << buffer << llendl; |
490 | mTextHealth->setText(buffer); | 503 | mTextHealth->setText(buffer); |
491 | 504 | ||