summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorChuck Linden <chuck@lindenlab.com>2010-02-18 21:32:53 -0500
committerChuck Linden <chuck@lindenlab.com>2010-02-18 21:32:53 -0500
commit6704b1ea7ff97cbeaca4e4a2a049c9581fb9a573 (patch)
tree7dc425220f12a86263117772f09c75db37d84abf /indra/llui
parente0249da7fd8af278b286b444da96fd2b5a54354e (diff)
parenta226668381ce7866f28ff78884d73b9738a91c23 (diff)
Automated merge with file:///Users/chuck/Documents/hg/viewer-hotfix
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llconsole.cpp3
-rw-r--r--indra/llui/llfloater.cpp39
-rw-r--r--indra/llui/llfloater.h1
-rw-r--r--indra/llui/lltabcontainer.cpp3
4 files changed, 30 insertions, 16 deletions
diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp
index a4f69e7ac1..badbddc3cc 100644
--- a/indra/llui/llconsole.cpp
+++ b/indra/llui/llconsole.cpp
@@ -300,7 +300,8 @@ void LLConsole::Paragraph::updateLines(F32 screen_width, const LLFontGL* font, b
S32 paragraph_offset = 0; //Offset into the paragraph text.
// Wrap lines that are longer than the view is wide.
- while( paragraph_offset < (S32)mParagraphText.length() )
+ while( paragraph_offset < (S32)mParagraphText.length() &&
+ mParagraphText[paragraph_offset] != 0)
{
S32 skip_chars; // skip '\n'
// Figure out if a word-wrapped line fits here.
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index f3cd112b9a..3e0c5ced1a 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -1565,25 +1565,13 @@ void LLFloater::draw()
// draw background
if( isBackgroundVisible() )
{
+ drawShadow(this);
+
S32 left = LLPANEL_BORDER_WIDTH;
S32 top = getRect().getHeight() - LLPANEL_BORDER_WIDTH;
S32 right = getRect().getWidth() - LLPANEL_BORDER_WIDTH;
S32 bottom = LLPANEL_BORDER_WIDTH;
- static LLUICachedControl<S32> shadow_offset_S32 ("DropShadowFloater", 0);
- static LLUIColor shadow_color_cached = LLUIColorTable::instance().getColor("ColorDropShadow");
- LLColor4 shadow_color = shadow_color_cached;
- F32 shadow_offset = (F32)shadow_offset_S32;
-
- if (!isBackgroundOpaque())
- {
- shadow_offset *= 0.2f;
- shadow_color.mV[VALPHA] *= 0.5f;
- }
- gl_drop_shadow(left, top, right, bottom,
- shadow_color % alpha,
- llround(shadow_offset));
-
LLUIImage* image = NULL;
LLColor4 color;
if (isBackgroundOpaque())
@@ -1666,6 +1654,29 @@ void LLFloater::draw()
}
}
+void LLFloater::drawShadow(LLPanel* panel)
+{
+ F32 alpha = panel->getDrawContext().mAlpha;
+ S32 left = LLPANEL_BORDER_WIDTH;
+ S32 top = panel->getRect().getHeight() - LLPANEL_BORDER_WIDTH;
+ S32 right = panel->getRect().getWidth() - LLPANEL_BORDER_WIDTH;
+ S32 bottom = LLPANEL_BORDER_WIDTH;
+
+ static LLUICachedControl<S32> shadow_offset_S32 ("DropShadowFloater", 0);
+ static LLUIColor shadow_color_cached = LLUIColorTable::instance().getColor("ColorDropShadow");
+ LLColor4 shadow_color = shadow_color_cached;
+ F32 shadow_offset = (F32)shadow_offset_S32;
+
+ if (!panel->isBackgroundOpaque())
+ {
+ shadow_offset *= 0.2f;
+ shadow_color.mV[VALPHA] *= 0.5f;
+ }
+ gl_drop_shadow(left, top, right, bottom,
+ shadow_color % alpha,
+ llround(shadow_offset));
+}
+
void LLFloater::setCanMinimize(BOOL can_minimize)
{
// if removing minimize/restore button programmatically,
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 2166d8db8a..19e8288807 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -222,6 +222,7 @@ public:
virtual BOOL handleScrollWheel(S32 x, S32 y, S32 mask);
virtual void draw();
+ virtual void drawShadow(LLPanel* panel);
virtual void onOpen(const LLSD& key) {}
virtual void onClose(bool app_quitting) {}
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index e810b6fe8f..9a715cca0b 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -214,7 +214,8 @@ LLTabContainer::Params::Params()
last_tab("last_tab"),
use_custom_icon_ctrl("use_custom_icon_ctrl", false),
tab_icon_ctrl_pad("tab_icon_ctrl_pad", 0),
- use_ellipses("use_ellipses")
+ use_ellipses("use_ellipses"),
+ font_halign("font_halign")
{
name(std::string("tab_container"));
mouse_opaque = false;