From 682d6f997ee2275226cf547f661b594325301abf Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Tue, 29 Jun 2010 22:27:45 +0300 Subject: Made accordion headers 3px taller. - Increased height off all accordion headers by 3 pixels by changing HEADER_HEIGHT constant from llaccordionctrltab.cpp. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/667/ --HG-- branch : product-engine --- indra/llui/llaccordionctrltab.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index 20e4b7867c..09cb15d7a8 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -44,7 +44,7 @@ static const std::string DD_BUTTON_NAME = "dd_button"; static const std::string DD_TEXTBOX_NAME = "dd_textbox"; static const std::string DD_HEADER_NAME = "dd_header"; -static const S32 HEADER_HEIGHT = 20; +static const S32 HEADER_HEIGHT = 23; static const S32 HEADER_IMAGE_LEFT_OFFSET = 5; static const S32 HEADER_TEXT_LEFT_OFFSET = 30; static const F32 AUTO_OPEN_TIME = 1.f; -- cgit v1.2.3 From 1a3b463af3b3b0668505f406162a7e2d3b557ee7 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Wed, 30 Jun 2010 20:02:51 +0300 Subject: EXT-7737 ADDITIONAL FIX Added changing of color to emphasis for selected outfit accordion header. - Added method to accordion which allows to set color of its header's title and used it when highliting selected outfit. - Set alias for emphasis color in colors.xml to let selected outfit color be easily changed via xml in case such decision is made(because leaving it green doesn't seem a very good idea). - Also added alias for accordion header text color to avoid breaking of this fix if in header_text_color from accordion_tab.xml. --HG-- branch : product-engine --- indra/llui/llaccordionctrltab.cpp | 19 +++++++++++++++++++ indra/llui/llaccordionctrltab.h | 3 +++ 2 files changed, 22 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index 09cb15d7a8..584d45612e 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -78,6 +78,8 @@ public: void setTitleFontStyle(std::string style); + void setTitleColor(LLUIColor); + void setSelected(bool is_selected) { mIsSelected = is_selected; } virtual void onMouseEnter(S32 x, S32 y, MASK mask); @@ -192,6 +194,14 @@ void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::setTitleFontStyle(std::string } } +void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::setTitleColor(LLUIColor color) +{ + if(mHeaderTextbox) + { + mHeaderTextbox->setColor(color); + } +} + void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::draw() { S32 width = getRect().getWidth(); @@ -520,6 +530,15 @@ void LLAccordionCtrlTab::setTitleFontStyle(std::string style) } } +void LLAccordionCtrlTab::setTitleColor(LLUIColor color) +{ + LLAccordionCtrlTabHeader* header = findChild(DD_HEADER_NAME); + if (header) + { + header->setTitleColor(color); + } +} + boost::signals2::connection LLAccordionCtrlTab::setFocusReceivedCallback(const focus_signal_t::slot_type& cb) { LLAccordionCtrlTabHeader* header = findChild(DD_HEADER_NAME); diff --git a/indra/llui/llaccordionctrltab.h b/indra/llui/llaccordionctrltab.h index e17ecc5319..5646a355d0 100644 --- a/indra/llui/llaccordionctrltab.h +++ b/indra/llui/llaccordionctrltab.h @@ -124,6 +124,9 @@ public: // Set text font style in LLAccordionCtrlTabHeader void setTitleFontStyle(std::string style); + // Set text color in LLAccordionCtrlTabHeader + void setTitleColor(LLUIColor color); + boost::signals2::connection setFocusReceivedCallback(const focus_signal_t::slot_type& cb); boost::signals2::connection setFocusLostCallback(const focus_signal_t::slot_type& cb); -- cgit v1.2.3 From 5d743c3c58b37dc6e9f261babfd5181906af752b Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 30 Jun 2010 13:15:33 -0700 Subject: EXT-8172 FIX notification of missing media plugins causes an infinite loop reviewed by Nyx --- indra/llui/llnotifications.cpp | 32 ++++++++++++++------------------ indra/llui/llnotifications.h | 2 -- 2 files changed, 14 insertions(+), 20 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 7b8f51ae3c..621e72ce38 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -560,21 +560,6 @@ void LLNotification::setResponseFunctor(const LLNotificationResponderPtr& respon mResponder = responder; } -bool LLNotification::payloadContainsAll(const std::vector& required_fields) const -{ - for(std::vector::const_iterator required_fields_it = required_fields.begin(); - required_fields_it != required_fields.end(); - required_fields_it++) - { - std::string required_field_name = *required_fields_it; - if( ! getPayload().has(required_field_name)) - { - return false; // a required field was not found - } - } - return true; // all required fields were found -} - bool LLNotification::isEquivalentTo(LLNotificationPtr that) const { if (this->mTemplatep->mName != that->mTemplatep->mName) @@ -583,11 +568,22 @@ bool LLNotification::isEquivalentTo(LLNotificationPtr that) const } if (this->mTemplatep->mUnique) { + const LLSD& these_substitutions = this->getSubstitutions(); + const LLSD& those_substitutions = that->getSubstitutions(); + // highlander bit sez there can only be one of these - return - this->payloadContainsAll(that->mTemplatep->mUniqueContext) && - that->payloadContainsAll(this->mTemplatep->mUniqueContext); + for (std::vector::const_iterator it = mTemplatep->mUniqueContext.begin(), end_it = mTemplatep->mUniqueContext.end(); + it != end_it; + ++it) + { + if (these_substitutions.get(*it).asString() != those_substitutions.get(*it).asString()) + { + return false; + } + } + return true; } + return false; } diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index c942a32512..8bfada0e71 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -400,8 +400,6 @@ private: void cancel(); - bool payloadContainsAll(const std::vector& required_fields) const; - public: // constructor from a saved notification -- cgit v1.2.3