summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llbutton.h2
-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/llsearcheditor.cpp2
-rw-r--r--indra/llui/lltabcontainer.cpp3
6 files changed, 33 insertions, 17 deletions
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index 8f35db1007..6a0d8ef3d6 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -257,6 +257,8 @@ public:
void setForcePressedState(bool b) { mForcePressedState = b; }
+ void setAutoResize(bool auto_resize) { mAutoResize = auto_resize; }
+
protected:
LLPointer<LLUIImage> getImageUnselected() const { return mImageUnselected; }
LLPointer<LLUIImage> getImageSelected() const { return mImageSelected; }
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/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp
index 491eeeab54..e6c5e3f334 100644
--- a/indra/llui/llsearcheditor.cpp
+++ b/indra/llui/llsearcheditor.cpp
@@ -155,7 +155,7 @@ void LLSearchEditor::setFocus( BOOL b )
void LLSearchEditor::onClearButtonClick(const LLSD& data)
{
- setText(LLStringUtil::null);
+ mSearchEditor->selectAll();
mSearchEditor->doDelete(); // force keystroke callback
}
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;