From 619415a99a08f66b8247ccd0b427c8483ba22e82 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Wed, 17 Feb 2010 15:32:00 +0200 Subject: Moved shadow drawing code from draw to separate function(drawShadow) to make this code reusable. --HG-- branch : product-engine --- indra/llui/llfloater.cpp | 39 +++++++++++++++++++++++++-------------- indra/llui/llfloater.h | 1 + 2 files changed, 26 insertions(+), 14 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index a55915af35..0199fe3f57 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 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 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) {} -- cgit v1.2.3 From e938d055f427275005d538bf09d3b40e0f680d5f Mon Sep 17 00:00:00 2001 From: Palmer Date: Wed, 17 Feb 2010 17:06:36 -0800 Subject: EXT-5309 : prevent infinite loop in LLConsole. Reviewed by Richard --- indra/llui/llconsole.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llui') 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. -- cgit v1.2.3 From bf668d4a184d52fe520748bbf3f8485380a1c775 Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Thu, 18 Feb 2010 11:36:19 +0200 Subject: Fixed critical bug EXT - 4878 (Tab labels are no longer obeying halign attribute) --HG-- branch : product-engine --- indra/llui/lltabcontainer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llui') 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; -- cgit v1.2.3 From 25800b4b3728b2691a486bbbbd95c9f20e63a1c5 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Thu, 18 Feb 2010 14:43:46 +0200 Subject: Fixed normal bug EXT-5468 - Lists from people panel are not refreshed after filter field has been reseted by (x). --HG-- branch : product-engine --- indra/llui/llsearcheditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui') 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 } -- cgit v1.2.3 From eec9f20d746805e772d38f8b338d882a6afb8df1 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Thu, 18 Feb 2010 16:05:11 +0200 Subject: =?UTF-8?q?fixed=20EXT-5006=20=E2=80=9COne=20inventory=20offer=20c?= =?UTF-8?q?ause=20blinking=20of=20both=20Conversations=20and=20Notificatio?= =?UTF-8?q?ns=20wells=E2=80=9D,=20embedded=20inventory=20offer=20panel=20i?= =?UTF-8?q?nto=20IM=20window;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/llui/llbutton.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llui') 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 getImageUnselected() const { return mImageUnselected; } LLPointer getImageSelected() const { return mImageSelected; } -- cgit v1.2.3 From 2cf2fa6ad2c82fdd7cd41456d4797e75075b9c84 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Thu, 18 Feb 2010 18:28:13 +0200 Subject: Fixed low bug EXT-5225 - Local chat doesn't go translucent when loses focus. Added customizable background image overlay color to control background transparency. Default overlay color is White, as before. --HG-- branch : product-engine --- indra/llui/llfloater.cpp | 5 ++++- indra/llui/llpanel.cpp | 10 ++++++++-- indra/llui/llpanel.h | 8 +++++++- 3 files changed, 19 insertions(+), 4 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 0199fe3f57..8490fba9fa 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -1574,22 +1574,25 @@ void LLFloater::draw() LLUIImage* image = NULL; LLColor4 color; + LLColor4 overlay_color; if (isBackgroundOpaque()) { // NOTE: image may not be set image = getBackgroundImage(); color = getBackgroundColor(); + overlay_color = getBackgroundImageOverlay(); } else { image = getTransparentImage(); color = getTransparentColor(); + overlay_color = getTransparentImageOverlay(); } if (image) { // We're using images for this floater's backgrounds - image->draw(getLocalRect(), UI_VERTEX_COLOR % alpha); + image->draw(getLocalRect(), overlay_color % alpha); } else { diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index d963cf4c98..0cd052eefa 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -80,6 +80,8 @@ LLPanel::Params::Params() background_opaque("background_opaque", false), bg_opaque_color("bg_opaque_color"), bg_alpha_color("bg_alpha_color"), + bg_opaque_image_overlay("bg_opaque_image_overlay"), + bg_alpha_image_overlay("bg_alpha_image_overlay"), bg_opaque_image("bg_opaque_image"), bg_alpha_image("bg_alpha_image"), min_width("min_width", 100), @@ -103,6 +105,8 @@ LLPanel::LLPanel(const LLPanel::Params& p) mBgOpaque(p.background_opaque), mBgOpaqueColor(p.bg_opaque_color()), mBgAlphaColor(p.bg_alpha_color()), + mBgOpaqueImageOverlay(p.bg_opaque_image_overlay), + mBgAlphaImageOverlay(p.bg_alpha_image_overlay), mBgOpaqueImage(p.bg_opaque_image()), mBgAlphaImage(p.bg_alpha_image()), mDefaultBtn(NULL), @@ -199,7 +203,7 @@ void LLPanel::draw() // opaque, in-front look if (mBgOpaqueImage.notNull()) { - mBgOpaqueImage->draw( local_rect, UI_VERTEX_COLOR % alpha ); + mBgOpaqueImage->draw( local_rect, mBgOpaqueImageOverlay % alpha ); } else { @@ -212,7 +216,7 @@ void LLPanel::draw() // transparent, in-back look if (mBgAlphaImage.notNull()) { - mBgAlphaImage->draw( local_rect, UI_VERTEX_COLOR % alpha ); + mBgAlphaImage->draw( local_rect, mBgAlphaImageOverlay % alpha ); } else { @@ -481,6 +485,8 @@ void LLPanel::initFromParams(const LLPanel::Params& p) setTransparentColor(p.bg_alpha_color().get()); mBgOpaqueImage = p.bg_opaque_image(); mBgAlphaImage = p.bg_alpha_image(); + mBgOpaqueImageOverlay = p.bg_opaque_image_overlay; + mBgAlphaImageOverlay = p.bg_alpha_image_overlay; } static LLFastTimer::DeclareTimer FTM_PANEL_SETUP("Panel Setup"); diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h index 4e53fd7ea3..03e3dc0c0e 100644 --- a/indra/llui/llpanel.h +++ b/indra/llui/llpanel.h @@ -77,7 +77,9 @@ public: background_opaque; Optional bg_opaque_color, - bg_alpha_color; + bg_alpha_color, + bg_opaque_image_overlay, + bg_alpha_image_overlay; // opaque image is for "panel in foreground" look Optional bg_opaque_image, bg_alpha_image; @@ -137,6 +139,8 @@ public: const LLColor4& getTransparentColor() const { return mBgAlphaColor; } LLPointer getBackgroundImage() const { return mBgOpaqueImage; } LLPointer getTransparentImage() const { return mBgAlphaImage; } + LLColor4 getBackgroundImageOverlay() { return mBgOpaqueImageOverlay; } + LLColor4 getTransparentImageOverlay() { return mBgAlphaImageOverlay; } void setBackgroundVisible( BOOL b ) { mBgVisible = b; } BOOL isBackgroundVisible() const { return mBgVisible; } void setBackgroundOpaque(BOOL b) { mBgOpaque = b; } @@ -262,6 +266,8 @@ private: BOOL mBgOpaque; // use opaque color or image LLUIColor mBgOpaqueColor; LLUIColor mBgAlphaColor; + LLUIColor mBgOpaqueImageOverlay; + LLUIColor mBgAlphaImageOverlay; LLPointer mBgOpaqueImage; // "panel in front" look LLPointer mBgAlphaImage; // "panel in back" look LLViewBorder* mBorder; -- cgit v1.2.3