From caa367e5d435a70647c56460741a52b14f41ec9e Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Tue, 11 Aug 2009 06:37:35 +0000 Subject: svn merge -r 129543-130091 skinning-19 -> viewer-2.0.0-3 EXT-172 - adding non-unicode support for group name line_editor EXT-310 text was squished, moved things around so there was was more space between text blocks. EXT-313 "me" panel EXT-314 changed out arrow character for arrow art, added arrow art to textures.xml EXT-315 replaced word "mute" with "block" EXT-322 moved Use Chat Bubbles text box from _chat.xml to _advanced.xml EXT-323 killed some two items EXT-324 and EXT-322 removed small avatar names checkbox and added show chat bubbled checkbox EXT-330 Sidetray filter - text overlaps search icon inside textbox EXT-261 I18N: Labels in /character/avatar_lad.xml are not localizable EXT-392 Rearranged floater_inventory_items_properties.xml to match spec DEV-35897 Filters in sidebar remain active even after user has changed/closed tab DEV-36886 I18N: hardcoded currency format in panel_status_bar.xml/status/buycurrency DEV-36987 - Pressed states needed for widgets DEV-36795 Remove slurl tooltip from navigation bar location box DEV-37184 Move "Block List" out of topmenu and make a button in Prefs > Privacy --- indra/llui/llbutton.cpp | 234 +++++++------------- indra/llui/llbutton.h | 115 ++++------ indra/llui/llcheckboxctrl.cpp | 1 - indra/llui/llcombobox.cpp | 21 +- indra/llui/llcombobox.h | 3 - indra/llui/llflyoutbutton.cpp | 7 - indra/llui/llflyoutbutton.h | 1 - indra/llui/llfocusmgr.cpp | 8 +- indra/llui/llfocusmgr.h | 4 +- indra/llui/lllineeditor.cpp | 6 +- indra/llui/llmultislider.h | 2 +- indra/llui/llscrollbar.cpp | 9 +- indra/llui/llslider.cpp | 42 +++- indra/llui/llslider.h | 10 +- indra/llui/lluictrlfactory.h | 8 + indra/newview/llfloaterlagmeter.cpp | 24 +- indra/newview/llimpanel.cpp | 29 --- indra/newview/llimview.cpp | 24 +- indra/newview/lllocationinputctrl.cpp | 2 +- indra/newview/llpanelpeople.cpp | 3 + indra/newview/llpanelplaces.cpp | 5 + indra/newview/llsidetray.cpp | 2 + indra/newview/llstatusbar.cpp | 8 +- indra/newview/llviewerwindow.cpp | 4 +- .../default/textures/icons/ForwardArrow_Off.png | Bin 0 -> 220 bytes .../default/textures/icons/ForwardArrow_Press.png | Bin 0 -> 220 bytes indra/newview/skins/default/textures/textures.xml | 17 +- .../skins/default/textures/widgets/Arrow_Down.png | Bin 0 -> 3066 bytes .../skins/default/textures/widgets/Arrow_Up.png | Bin 0 -> 363 bytes .../skins/default/xui/en/floater_buy_land.xml | 24 +- .../xui/en/floater_inventory_item_properties.xml | 244 +++++++++++++-------- .../skins/default/xui/en/menu_nearby_chat.xml | 2 +- indra/newview/skins/default/xui/en/menu_viewer.xml | 4 +- .../skins/default/xui/en/panel_group_general.xml | 1 + indra/newview/skins/default/xui/en/panel_notes.xml | 182 +++++---------- .../newview/skins/default/xui/en/panel_people.xml | 49 +++-- .../skins/default/xui/en/panel_pick_info.xml | 32 ++- .../skins/default/xui/en/panel_pick_list_item.xml | 60 +++-- indra/newview/skins/default/xui/en/panel_picks.xml | 104 +++------ .../default/xui/en/panel_preferences_advanced.xml | 26 ++- .../default/xui/en/panel_preferences_chat.xml | 9 - .../default/xui/en/panel_preferences_general.xml | 12 +- .../newview/skins/default/xui/en/panel_profile.xml | 214 ++++++++---------- .../skins/default/xui/en/panel_profile_view.xml | 79 ++++--- .../skins/default/xui/en/panel_status_bar.xml | 4 + indra/newview/skins/default/xui/en/strings.xml | 194 +++++++++++++++- .../skins/default/xui/en/widgets/check_box.xml | 4 +- .../skins/default/xui/en/widgets/radio_item.xml | 4 +- .../skins/default/xui/en/widgets/slider_bar.xml | 2 + 49 files changed, 933 insertions(+), 906 deletions(-) create mode 100644 indra/newview/skins/default/textures/icons/ForwardArrow_Off.png create mode 100644 indra/newview/skins/default/textures/icons/ForwardArrow_Press.png create mode 100644 indra/newview/skins/default/textures/widgets/Arrow_Down.png create mode 100644 indra/newview/skins/default/textures/widgets/Arrow_Up.png diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index fc3af34951..ac368fd785 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -70,6 +70,8 @@ LLButton::Params::Params() image_hover_unselected("image_hover_unselected"), image_disabled_selected("image_disabled_selected"), image_disabled("image_disabled"), + image_pressed("image_pressed"), + image_pressed_selected("image_pressed_selected"), image_overlay("image_overlay"), image_overlay_alignment("image_overlay_alignment", std::string("center")), label_color("label_color"), @@ -108,7 +110,6 @@ LLButton::LLButton(const LLButton::Params& p) mFlashing( FALSE ), mCurGlowStrength(0.f), mNeedsHighlight(FALSE), - mImagep( NULL ), mUnselectedLabel(p.label()), mSelectedLabel(p.label_selected()), mGLFont(p.font), @@ -118,6 +119,8 @@ LLButton::LLButton(const LLButton::Params& p) mImageSelected(p.image_selected), mImageDisabled(p.image_disabled), mImageDisabledSelected(p.image_disabled_selected), + mImagePressed(p.image_pressed), + mImagePressedSelected(p.image_pressed_selected), mImageHoverSelected(p.image_hover_selected), mImageHoverUnselected(p.image_hover_unselected), mUnselectedLabelColor(p.label_color()), @@ -182,6 +185,11 @@ LLButton::LLButton(const LLButton::Params& p) mImageDisabled = p.image_unselected; mFadeWhenDisabled = TRUE; } + + if (p.image_pressed_selected == default_params.image_pressed_selected) + { + mImagePressedSelected = mImageUnselected; + } } // if custom selected button image provided... @@ -193,6 +201,21 @@ LLButton::LLButton(const LLButton::Params& p) mImageDisabledSelected = p.image_selected; mFadeWhenDisabled = TRUE; } + + if (p.image_pressed == default_params.image_pressed) + { + mImagePressed = mImageSelected; + } + } + + if (!p.image_pressed.isProvided()) + { + mImagePressed = mImageSelected; + } + + if (!p.image_pressed_selected.isProvided()) + { + mImagePressedSelected = mImageUnselected; } if (mImageUnselected.isNull()) @@ -427,7 +450,7 @@ BOOL LLButton::handleRightMouseUp(S32 x, S32 y, MASK mask) void LLButton::onMouseEnter(S32 x, S32 y, MASK mask) { - if (getEnabled()) + if (isInEnabledChain()) mNeedsHighlight = TRUE; } @@ -462,7 +485,7 @@ BOOL LLButton::handleHover(S32 x, S32 y, MASK mask) // virtual void LLButton::draw() { - BOOL flash = FALSE; + bool flash = FALSE; static LLUICachedControl button_flash_rate("ButtonFlashRate", 0); static LLUICachedControl button_flash_count("ButtonFlashCount", 0); @@ -474,7 +497,7 @@ void LLButton::draw() flash = (flash_count % 2 == 0) || flash_count > S32((F32)button_flash_count * 2.f); } - BOOL pressed_by_keyboard = FALSE; + bool pressed_by_keyboard = FALSE; if (hasFocus()) { pressed_by_keyboard = gKeyboard->getKeyDown(' ') || (mCommitOnReturn && gKeyboard->getKeyDown(KEY_RETURN)); @@ -485,24 +508,31 @@ void LLButton::draw() S32 local_mouse_y; LLUI::getCursorPositionLocal(this, &local_mouse_x, &local_mouse_y); - BOOL pressed = pressed_by_keyboard - || (hasMouseCapture() && pointInView(local_mouse_x, local_mouse_y)) - || getToggleState(); + bool enabled = isInEnabledChain(); + + bool pressed = pressed_by_keyboard + || (hasMouseCapture() && pointInView(local_mouse_x, local_mouse_y)); + bool selected = getToggleState(); - BOOL use_glow_effect = FALSE; + bool use_glow_effect = FALSE; LLColor4 glow_color = LLColor4::white; LLRender::eBlendType glow_type = LLRender::BT_ADD_WITH_ALPHA; - if ( mNeedsHighlight ) + LLUIImage* imagep = NULL; + if (pressed) { - if (pressed) + imagep = selected ? mImagePressedSelected : mImagePressed; + } + else if ( mNeedsHighlight ) + { + if (selected) { if (mImageHoverSelected) { - mImagep = mImageHoverSelected; + imagep = mImageHoverSelected; } else { - mImagep = mImageSelected; + imagep = mImageSelected; use_glow_effect = TRUE; } } @@ -510,22 +540,37 @@ void LLButton::draw() { if (mImageHoverUnselected) { - mImagep = mImageHoverUnselected; + imagep = mImageHoverUnselected; } else { - mImagep = mImageUnselected; + imagep = mImageUnselected; use_glow_effect = TRUE; } } } - else if ( pressed ) + else { - mImagep = mImageSelected; + imagep = selected ? mImageSelected : mImageUnselected; } - else + + // Override if more data is available + // HACK: Use gray checked state to mean either: + // enabled and tentative + // or + // disabled but checked + if (!mImageDisabledSelected.isNull() + && + ( (enabled && getTentative()) + || (!enabled && selected ) ) ) + { + imagep = mImageDisabledSelected; + } + else if (!mImageDisabled.isNull() + && !enabled + && !selected) { - mImagep = mImageUnselected; + imagep = mImageDisabled; } if (mFlashing) @@ -540,26 +585,7 @@ void LLButton::draw() glow_color = flash_color; } - // Override if more data is available - // HACK: Use gray checked state to mean either: - // enabled and tentative - // or - // disabled but checked - if (!mImageDisabledSelected.isNull() - && - ( (getEnabled() && getTentative()) - || (!getEnabled() && pressed ) ) ) - { - mImagep = mImageDisabledSelected; - } - else if (!mImageDisabled.isNull() - && !getEnabled() - && !pressed) - { - mImagep = mImageDisabled; - } - - if (mNeedsHighlight && !mImagep) + if (mNeedsHighlight && !imagep) { use_glow_effect = TRUE; } @@ -568,7 +594,7 @@ void LLButton::draw() LLColor4 label_color; // label changes when button state changes, not when pressed - if ( getEnabled() ) + if ( enabled ) { if ( getToggleState() ) { @@ -596,32 +622,18 @@ void LLButton::draw() if( getToggleState() ) { - if( getEnabled() || mDisabledSelectedLabel.empty() ) - { - label = mSelectedLabel; - } - else - { - label = mDisabledSelectedLabel; - } + label = mSelectedLabel; } else { - if( getEnabled() || mDisabledLabel.empty() ) - { - label = mUnselectedLabel; - } - else - { - label = mDisabledLabel; - } + label = mUnselectedLabel; } // overlay with keyboard focus border if (hasFocus()) { F32 lerp_amt = gFocusMgr.getFocusFlashAmt(); - drawBorder(gFocusMgr.getFocusColor(), llround(lerp(1.f, 3.f, lerp_amt))); + drawBorder(imagep, gFocusMgr.getFocusColor(), llround(lerp(1.f, 3.f, lerp_amt))); } if (use_glow_effect) @@ -638,27 +650,27 @@ void LLButton::draw() // Draw button image, if available. // Otherwise draw basic rectangular button. - if (mImagep.notNull()) + if (imagep != NULL) { // apply automatic 50% alpha fade to disabled image LLColor4 disabled_color = mFadeWhenDisabled ? mDisabledImageColor.get() % 0.5f : mDisabledImageColor.get(); if ( mScaleImage) { - mImagep->draw(getLocalRect(), getEnabled() ? mImageColor.get() : disabled_color ); + imagep->draw(getLocalRect(), enabled ? mImageColor.get() : disabled_color ); if (mCurGlowStrength > 0.01f) { gGL.setSceneBlendType(glow_type); - mImagep->drawSolid(0, 0, getRect().getWidth(), getRect().getHeight(), glow_color % mCurGlowStrength); + imagep->drawSolid(0, 0, getRect().getWidth(), getRect().getHeight(), glow_color % mCurGlowStrength); gGL.setSceneBlendType(LLRender::BT_ALPHA); } } else { - mImagep->draw(0, 0, getEnabled() ? mImageColor.get() : disabled_color ); + imagep->draw(0, 0, enabled ? mImageColor.get() : disabled_color ); if (mCurGlowStrength > 0.01f) { gGL.setSceneBlendType(glow_type); - mImagep->drawSolid(0, 0, glow_color % mCurGlowStrength); + imagep->drawSolid(0, 0, glow_color % mCurGlowStrength); gGL.setSceneBlendType(LLRender::BT_ALPHA); } } @@ -699,7 +711,7 @@ void LLButton::draw() // fade out overlay images on disabled buttons LLColor4 overlay_color = mImageOverlayColor.get(); - if (!getEnabled()) + if (!enabled) { overlay_color.mV[VALPHA] = 0.5f; } @@ -777,19 +789,19 @@ void LLButton::draw() NULL, FALSE, FALSE); } - LLView::draw(); + LLUICtrl::draw(); } -void LLButton::drawBorder(const LLColor4& color, S32 size) +void LLButton::drawBorder(LLUIImage* imagep, const LLColor4& color, S32 size) { - if (mImagep.isNull()) return; + if (imagep == NULL) return; if (mScaleImage) { - mImagep->drawBorder(getLocalRect(), color, size); + imagep->drawBorder(getLocalRect(), color, size); } else { - mImagep->drawBorder(0, 0, color, size); + imagep->drawBorder(0, 0, color, size); } } @@ -851,16 +863,6 @@ void LLButton::setLabelSelected( const LLStringExplicit& label ) mSelectedLabel = label; } -void LLButton::setDisabledLabel( const LLStringExplicit& label ) -{ - mDisabledLabel = label; -} - -void LLButton::setDisabledSelectedLabel( const LLStringExplicit& label ) -{ - mDisabledSelectedLabel = label; -} - void LLButton::setImageUnselected(LLPointer image) { mImageUnselected = image; @@ -875,25 +877,11 @@ void LLButton::autoResize() LLUIString label; if(getToggleState()) { - if( getEnabled() || mDisabledSelectedLabel.empty() ) - { - label = mSelectedLabel; - } - else - { - label = mDisabledSelectedLabel; - } + label = mSelectedLabel; } else { - if( getEnabled() || mDisabledLabel.empty() ) - { - label = mUnselectedLabel; - } - else - { - label = mDisabledLabel; - } + label = mUnselectedLabel; } resize(label); } @@ -915,9 +903,8 @@ void LLButton::resize(LLUIString label) } void LLButton::setImages( const std::string &image_name, const std::string &selected_name ) { - setImageUnselected(image_name); - setImageSelected(selected_name); - + setImageUnselected(LLUI::getUIImage(image_name)); + setImageSelected(LLUI::getUIImage(selected_name)); } void LLButton::setImageSelected(LLPointer image) @@ -950,19 +937,6 @@ void LLButton::setImageDisabledSelected(LLPointer image) mFadeWhenDisabled = TRUE; } -void LLButton::setDisabledImages( const std::string &image_name, const std::string &selected_name) -{ - setDisabledImages( image_name, selected_name, mImageColor.get()); - mFadeWhenDisabled = TRUE; -} - -void LLButton::setDisabledImages( const std::string &image_name, const std::string &selected_name, const LLColor4& c ) -{ - setImageDisabled(image_name); - setImageDisabledSelected(selected_name); - mDisabledImageColor = c; -} - void LLButton::setImageHoverSelected(LLPointer image) { mImageHoverSelected = image; @@ -973,12 +947,6 @@ void LLButton::setImageHoverUnselected(LLPointer image) mImageHoverUnselected = image; } -void LLButton::setHoverImages( const std::string& image_name, const std::string& selected_name ) -{ - setImageHoverUnselected(image_name); - setImageHoverSelected(selected_name); -} - void LLButton::setImageOverlay(const std::string& image_name, LLFontGL::HAlign alignment, const LLColor4& color) { if (image_name.empty()) @@ -1016,42 +984,6 @@ S32 round_up(S32 grid, S32 value) } } -void LLButton::setImageUnselected(const std::string &image_name) -{ - setImageUnselected(LLUI::getUIImage(image_name)); - mImageUnselectedName = image_name; -} - -void LLButton::setImageSelected(const std::string &image_name) -{ - setImageSelected(LLUI::getUIImage(image_name)); - mImageSelectedName = image_name; -} - -void LLButton::setImageHoverSelected(const std::string &image_name) -{ - setImageHoverSelected(LLUI::getUIImage(image_name)); - mImageHoverSelectedName = image_name; -} - -void LLButton::setImageHoverUnselected(const std::string &image_name) -{ - setImageHoverUnselected(LLUI::getUIImage(image_name)); - mImageHoverUnselectedName = image_name; -} - -void LLButton::setImageDisabled(const std::string &image_name) -{ - setImageDisabled(LLUI::getUIImage(image_name)); - mImageDisabledName = image_name; -} - -void LLButton::setImageDisabledSelected(const std::string &image_name) -{ - setImageDisabledSelected(LLUI::getUIImage(image_name)); - mImageDisabledSelectedName = image_name; -} - void LLButton::addImageAttributeToXML(LLXMLNodePtr node, const std::string& image_name, const LLUUID& image_id, diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index e387c91a17..93e0414a02 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -84,6 +84,8 @@ public: image_hover_unselected, image_disabled_selected, image_disabled, + image_pressed, + image_pressed_selected, image_overlay; Optional image_overlay_alignment; @@ -190,11 +192,7 @@ public: virtual void setColor(const LLColor4& c); void setImages(const std::string &image_name, const std::string &selected_name); - void setDisabledImages(const std::string &image_name, const std::string &selected_name); - void setDisabledImages(const std::string &image_name, const std::string &selected_name, const LLColor4& c); - void setHoverImages(const std::string &image_name, const std::string &selected_name); - void setDisabledImageColor(const LLColor4& c) { mDisabledImageColor = c; } void setDisabledSelectedLabelColor( const LLColor4& c ) { mDisabledSelectedLabelColor = c; } @@ -208,8 +206,6 @@ public: virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text ); void setLabelUnselected(const LLStringExplicit& label); void setLabelSelected(const LLStringExplicit& label); - void setDisabledLabel(const LLStringExplicit& disabled_label); - void setDisabledSelectedLabel(const LLStringExplicit& disabled_label); void setDisabledLabelColor( const LLColor4& c ) { mDisabledLabelColor = c; } void setFont(const LLFontGL *font) @@ -223,15 +219,6 @@ public: void setHoverGlowStrength(F32 strength) { mHoverGlowStrength = strength; } - void setImageUnselected(const std::string &image_name); - const std::string& getImageUnselectedName() const { return mImageUnselectedName; } - void setImageSelected(const std::string &image_name); - const std::string& getImageSelectedName() const { return mImageSelectedName; } - void setImageHoverSelected(const std::string &image_name); - void setImageHoverUnselected(const std::string &image_name); - void setImageDisabled(const std::string &image_name); - void setImageDisabledSelected(const std::string &image_name); - void setImageUnselected(LLPointer image); void setImageSelected(LLPointer image); void setImageHoverSelected(LLPointer image); @@ -250,106 +237,84 @@ public: static void setFloaterToggle(LLUICtrl* ctrl, const LLSD& sdname); protected: - - virtual void drawBorder(const LLColor4& color, S32 size); - - void setImageUnselectedID(const LLUUID &image_id); - const LLUUID& getImageUnselectedID() const { return mImageUnselectedID; } - void setImageSelectedID(const LLUUID &image_id); - const LLUUID& getImageSelectedID() const { return mImageSelectedID; } - void setImageHoverSelectedID(const LLUUID &image_id); - void setImageHoverUnselectedID(const LLUUID &image_id); - void setImageDisabledID(const LLUUID &image_id); - void setImageDisabledSelectedID(const LLUUID &image_id); const LLPointer& getImageUnselected() const { return mImageUnselected; } const LLPointer& getImageSelected() const { return mImageSelected; } - void resetMouseDownTimer(); LLFrameTimer mMouseDownTimer; // If the label is empty, set the picture_style attribute static void setupParamsForExport(Params& p, LLView* parent); +private: + void drawBorder(LLUIImage* imagep, const LLColor4& color, S32 size); + void resetMouseDownTimer(); private: - commit_signal_t mMouseDownSignal; - commit_signal_t mMouseUpSignal; - commit_signal_t mHeldDownSignal; + commit_signal_t mMouseDownSignal; + commit_signal_t mMouseUpSignal; + commit_signal_t mHeldDownSignal; - const LLFontGL *mGLFont; + const LLFontGL* mGLFont; - S32 mMouseDownFrame; - S32 mMouseHeldDownCount; // Counter for parameter passed to held-down callback - F32 mHeldDownDelay; // seconds, after which held-down callbacks get called - S32 mHeldDownFrameDelay; // frames, after which held-down callbacks get called + S32 mMouseDownFrame; + S32 mMouseHeldDownCount; // Counter for parameter passed to held-down callback + F32 mHeldDownDelay; // seconds, after which held-down callbacks get called + S32 mHeldDownFrameDelay; // frames, after which held-down callbacks get called LLPointer mImageOverlay; LLFontGL::HAlign mImageOverlayAlignment; - LLUIColor mImageOverlayColor; + LLUIColor mImageOverlayColor; LLPointer mImageUnselected; LLUIString mUnselectedLabel; - LLUIColor mUnselectedLabelColor; + LLUIColor mUnselectedLabelColor; LLPointer mImageSelected; LLUIString mSelectedLabel; - LLUIColor mSelectedLabelColor; + LLUIColor mSelectedLabelColor; LLPointer mImageHoverSelected; LLPointer mImageHoverUnselected; LLPointer mImageDisabled; - LLUIString mDisabledLabel; - LLUIColor mDisabledLabelColor; + LLUIColor mDisabledLabelColor; LLPointer mImageDisabledSelected; LLUIString mDisabledSelectedLabel; - LLUIColor mDisabledSelectedLabelColor; - - LLUUID mImageUnselectedID; - LLUUID mImageSelectedID; - LLUUID mImageHoverSelectedID; - LLUUID mImageHoverUnselectedID; - LLUUID mImageDisabledID; - LLUUID mImageDisabledSelectedID; - std::string mImageUnselectedName; - std::string mImageSelectedName; - std::string mImageHoverSelectedName; - std::string mImageHoverUnselectedName; - std::string mImageDisabledName; - std::string mImageDisabledSelectedName; + LLUIColor mDisabledSelectedLabelColor; - LLUIColor mHighlightColor; - LLUIColor mFlashBgColor; + LLPointer mImagePressed; + LLPointer mImagePressedSelected; - LLUIColor mImageColor; - LLUIColor mDisabledImageColor; + LLUIColor mHighlightColor; + LLUIColor mFlashBgColor; - BOOL mIsToggle; - BOOL mScaleImage; + LLUIColor mImageColor; + LLUIColor mDisabledImageColor; - BOOL mDropShadowedText; - BOOL mAutoResize; - BOOL mBorderEnabled; + BOOL mIsToggle; + BOOL mScaleImage; - BOOL mFlashing; + BOOL mDropShadowedText; + BOOL mAutoResize; + BOOL mBorderEnabled; - LLFontGL::HAlign mHAlign; - S32 mLeftHPad; - S32 mRightHPad; + BOOL mFlashing; - F32 mHoverGlowStrength; - F32 mCurGlowStrength; + LLFontGL::HAlign mHAlign; + S32 mLeftHPad; + S32 mRightHPad; - BOOL mNeedsHighlight; - BOOL mCommitOnReturn; - BOOL mFadeWhenDisabled; + F32 mHoverGlowStrength; + F32 mCurGlowStrength; - std::string mHelpURL; + BOOL mNeedsHighlight; + BOOL mCommitOnReturn; + BOOL mFadeWhenDisabled; - LLPointer mImagep; + std::string mHelpURL; - LLFrameTimer mFlashingTimer; + LLFrameTimer mFlashingTimer; }; diff --git a/indra/llui/llcheckboxctrl.cpp b/indra/llui/llcheckboxctrl.cpp index b43f91e766..455b17ffc7 100644 --- a/indra/llui/llcheckboxctrl.cpp +++ b/indra/llui/llcheckboxctrl.cpp @@ -161,7 +161,6 @@ void LLCheckBoxCtrl::onCommit() void LLCheckBoxCtrl::setEnabled(BOOL b) { LLView::setEnabled(b); - mButton->setEnabled(b); if (b) { diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp index f8c6204afb..93d2b83c9f 100644 --- a/indra/llui/llcombobox.cpp +++ b/indra/llui/llcombobox.cpp @@ -182,12 +182,6 @@ LLComboBox::~LLComboBox() } -void LLComboBox::setEnabled(BOOL enabled) -{ - LLView::setEnabled(enabled); - mButton->setEnabled(enabled); -} - void LLComboBox::clear() { if (mTextEntry) @@ -196,8 +190,6 @@ void LLComboBox::clear() } mButton->setLabelSelected(LLStringUtil::null); mButton->setLabelUnselected(LLStringUtil::null); - mButton->setDisabledLabel(LLStringUtil::null); - mButton->setDisabledSelectedLabel(LLStringUtil::null); mList->deselectAllItems(); } @@ -376,10 +368,7 @@ void LLComboBox::setLabel(const LLStringExplicit& name) if (!mAllowTextEntry) { - mButton->setLabelUnselected(name); - mButton->setLabelSelected(name); - mButton->setDisabledLabel(name); - mButton->setDisabledSelectedLabel(name); + mButton->setLabel(name); } } @@ -441,14 +430,6 @@ void LLComboBox::setButtonVisible(BOOL visible) } } -void LLComboBox::draw() -{ - mButton->setEnabled(getEnabled() /*&& !mList->isEmpty()*/); - - // Draw children normally - LLUICtrl::draw(); -} - BOOL LLComboBox::setCurrentByIndex( S32 index ) { BOOL found = mList->selectNthItem( index ); diff --git a/indra/llui/llcombobox.h b/indra/llui/llcombobox.h index db97b0df75..4becda195f 100644 --- a/indra/llui/llcombobox.h +++ b/indra/llui/llcombobox.h @@ -110,11 +110,8 @@ protected: public: // LLView interface - virtual void draw(); virtual void onFocusLost(); - virtual void setEnabled(BOOL enabled); - virtual BOOL handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect); virtual BOOL handleKeyHere(KEY key, MASK mask); virtual BOOL handleUnicodeCharHere(llwchar uni_char); diff --git a/indra/llui/llflyoutbutton.cpp b/indra/llui/llflyoutbutton.cpp index 536919c072..3483bac782 100644 --- a/indra/llui/llflyoutbutton.cpp +++ b/indra/llui/llflyoutbutton.cpp @@ -74,13 +74,6 @@ void LLFlyoutButton::draw() LLComboBox::draw(); } -void LLFlyoutButton::setEnabled(BOOL enabled) -{ - mActionButton->setEnabled(enabled); - LLComboBox::setEnabled(enabled); -} - - void LLFlyoutButton::setToggleState(BOOL state) { mToggleState = state; diff --git a/indra/llui/llflyoutbutton.h b/indra/llui/llflyoutbutton.h index 1f1716593a..d8c0f1a50d 100644 --- a/indra/llui/llflyoutbutton.h +++ b/indra/llui/llflyoutbutton.h @@ -61,7 +61,6 @@ protected: friend class LLUICtrlFactory; public: virtual void draw(); - virtual void setEnabled(BOOL enabled); void setToggleState(BOOL state); diff --git a/indra/llui/llfocusmgr.cpp b/indra/llui/llfocusmgr.cpp index 7e452a25a3..3fef215661 100644 --- a/indra/llui/llfocusmgr.cpp +++ b/indra/llui/llfocusmgr.cpp @@ -49,7 +49,6 @@ LLFocusMgr::LLFocusMgr() mDefaultKeyboardFocus( NULL ), mKeystrokesOnly(FALSE), mTopCtrl( NULL ), - mFocusWeight(0.f), mAppHasFocus(TRUE) // Macs don't seem to notify us that we've gotten focus, so default to true #ifdef _DEBUG , mMouseCaptorName("none") @@ -146,8 +145,6 @@ void LLFocusMgr::setKeyboardFocus(LLUICtrl* new_focus, BOOL lock, BOOL keystroke // cache the new focus list for next time swap(mCachedKeyboardFocusList, new_focus_list); - mFocusTimer.reset(); - #ifdef _DEBUG mKeyboardFocusName = new_focus ? new_focus->getName() : std::string("none"); #endif @@ -346,7 +343,7 @@ void LLFocusMgr::unlockFocus() F32 LLFocusMgr::getFocusFlashAmt() const { - return clamp_rescale(getFocusTime(), 0.f, FOCUS_FADE_TIME, mFocusWeight, 0.f); + return clamp_rescale(mFocusFlashTimer.getElapsedTimeF32(), 0.f, FOCUS_FADE_TIME, 1.f, 0.f); } LLColor4 LLFocusMgr::getFocusColor() const @@ -363,8 +360,7 @@ LLColor4 LLFocusMgr::getFocusColor() const void LLFocusMgr::triggerFocusFlash() { - mFocusTimer.reset(); - mFocusWeight = 1.f; + mFocusFlashTimer.reset(); } void LLFocusMgr::setAppHasFocus(BOOL focus) diff --git a/indra/llui/llfocusmgr.h b/indra/llui/llfocusmgr.h index 165a114f3d..fbe0d22084 100644 --- a/indra/llui/llfocusmgr.h +++ b/indra/llui/llfocusmgr.h @@ -63,7 +63,6 @@ public: BOOL getKeystrokesOnly() { return mKeystrokesOnly; } void setKeystrokesOnly(BOOL keystrokes_only) { mKeystrokesOnly = keystrokes_only; } - F32 getFocusTime() const { return mFocusTimer.getElapsedTimeF32(); } F32 getFocusFlashAmt() const; S32 getFocusFlashWidth() const { return llround(lerp(1.f, 3.f, getFocusFlashAmt())); } LLColor4 getFocusColor() const; @@ -110,8 +109,7 @@ private: // Top View LLUICtrl* mTopCtrl; - LLFrameTimer mFocusTimer; - F32 mFocusWeight; + LLFrameTimer mFocusFlashTimer; BOOL mAppHasFocus; diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index f94eb7fcc3..02ee567803 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -318,10 +318,8 @@ void LLLineEditor::setMaxTextLength(S32 max_text_length) void LLLineEditor::updateTextPadding() { static LLUICachedControl line_editor_hpad ("UILineEditorHPad", 0); - mTextPadLeft = llclamp(mTextPadLeft, 0, getRect().getWidth()); - mTextPadRight = llclamp(mTextPadRight, 0, getRect().getWidth()); - mMinHPixels = line_editor_hpad + mTextPadLeft; - mMaxHPixels = getRect().getWidth() - mMinHPixels - mTextPadRight; + mMinHPixels = line_editor_hpad + llclamp(mTextPadLeft, 0, getRect().getWidth());; + mMaxHPixels = getRect().getWidth() - mMinHPixels - llclamp(mTextPadRight, 0, getRect().getWidth()); } diff --git a/indra/llui/llmultislider.h b/indra/llui/llmultislider.h index 89d44eaa87..da633cc1cd 100644 --- a/indra/llui/llmultislider.h +++ b/indra/llui/llmultislider.h @@ -120,4 +120,4 @@ protected: commit_signal_t mMouseUpSignal; }; -#endif // LL_LLSLIDER_H +#endif // LL_MULTI_SLIDER_H diff --git a/indra/llui/llscrollbar.cpp b/indra/llui/llscrollbar.cpp index bc489592d4..566825ff3b 100644 --- a/indra/llui/llscrollbar.cpp +++ b/indra/llui/llscrollbar.cpp @@ -497,8 +497,8 @@ void LLScrollbar::draw() } // Draw background and thumb. - if ( ( mOrientation == VERTICAL&&(mThumbImageV.isNull() || mThumbImageV.isNull()) ) - || (mOrientation == HORIZONTAL&&(mTrackImageH.isNull() || mThumbImageH.isNull()) )) + if ( ( mOrientation == VERTICAL&&(mThumbImageV.isNull() || mThumbImageH.isNull()) ) + || (mOrientation == HORIZONTAL&&(mTrackImageH.isNull() || mTrackImageV.isNull()) )) { gl_rect_2d(mOrientation == HORIZONTAL ? mThickness : 0, mOrientation == VERTICAL ? getRect().getHeight() - 2 * mThickness : getRect().getHeight(), @@ -513,7 +513,6 @@ void LLScrollbar::draw() // Thumb LLRect outline_rect = mThumbRect; outline_rect.stretch(2); - S32 rect_fix = 0; // Background if(mOrientation == HORIZONTAL) @@ -521,7 +520,7 @@ void LLScrollbar::draw() mTrackImageH->drawSolid(mThickness //S32 x , 0 //S32 y , getRect().getWidth() - 2 * mThickness //S32 width - , getRect().getHeight()- rect_fix //S32 height + , getRect().getHeight() //S32 height , mTrackColor.get()); //const LLColor4& color if (gFocusMgr.getKeyboardFocus() == this) @@ -540,7 +539,7 @@ void LLScrollbar::draw() } else if(mOrientation == VERTICAL) { - mTrackImageV->drawSolid( 0+rect_fix //S32 x + mTrackImageV->drawSolid( 0 //S32 x , mThickness //S32 y , getRect().getWidth() //S32 width , getRect().getHeight() - 2 * mThickness //S32 height diff --git a/indra/llui/llslider.cpp b/indra/llui/llslider.cpp index f167836bee..1c394a71dd 100644 --- a/indra/llui/llslider.cpp +++ b/indra/llui/llslider.cpp @@ -49,6 +49,8 @@ LLSlider::Params::Params() thumb_outline_color("thumb_outline_color"), thumb_center_color("thumb_center_color"), thumb_image("thumb_image"), + thumb_image_pressed("thumb_image_pressed"), + thumb_image_disabled("thumb_image_disabled"), track_image("track_image"), track_highlight_image("track_highlight_image"), mouse_down_callback("mouse_down_callback"), @@ -64,6 +66,8 @@ LLSlider::LLSlider(const LLSlider::Params& p) mThumbOutlineColor(p.thumb_outline_color()), mThumbCenterColor(p.thumb_center_color()), mThumbImage(p.thumb_image), + mThumbImagePressed(p.thumb_image_pressed), + mThumbImageDisabled(p.thumb_image_disabled), mTrackImage(p.track_image), mTrackHighlightImage(p.track_highlight_image) { @@ -243,10 +247,6 @@ void LLSlider::draw() // drawing solids requires texturing be disabled gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - F32 opacity = getEnabled() ? 1.f : 0.3f; - LLColor4 center_color = (mThumbCenterColor.get() % opacity); - LLColor4 track_color = (mTrackColor.get() % opacity); - // Track LLRect track_rect(mThumbImage->getWidth() / 2, getLocalRect().getCenterY() + (mTrackImage->getHeight() / 2), @@ -257,18 +257,38 @@ void LLSlider::draw() mTrackHighlightImage->draw(highlight_rect); // Thumb - if( hasMouseCapture() ) - { - // Show ghost where thumb was before dragging began. - mThumbImage->draw(mDragStartThumbRect, mThumbCenterColor.get() % 0.3f); - } if (hasFocus()) { // Draw focus highlighting. mThumbImage->drawBorder(mThumbRect, gFocusMgr.getFocusColor(), gFocusMgr.getFocusFlashWidth()); } - // Fill in the thumb. - mThumbImage->draw(mThumbRect, hasMouseCapture() ? mThumbOutlineColor.get() : center_color); + if( hasMouseCapture() ) // currently clicking on slider + { + // Show ghost where thumb was before dragging began. + if (mThumbImage.notNull()) + { + mThumbImage->draw(mDragStartThumbRect, mThumbCenterColor.get() % 0.3f); + } + if (mThumbImagePressed.notNull()) + { + mThumbImagePressed->draw(mThumbRect, mThumbOutlineColor); + } + } + else if (!isInEnabledChain()) + { + if (mThumbImageDisabled.notNull()) + { + mThumbImageDisabled->draw(mThumbRect, mThumbCenterColor); + } + } + else + { + if (mThumbImage.notNull()) + { + mThumbImage->draw(mThumbRect, mThumbCenterColor); + } + } + LLUICtrl::draw(); } diff --git a/indra/llui/llslider.h b/indra/llui/llslider.h index 088fd20d94..e2a94e4d8c 100644 --- a/indra/llui/llslider.h +++ b/indra/llui/llslider.h @@ -46,6 +46,8 @@ public: thumb_center_color; Optional thumb_image, + thumb_image_pressed, + thumb_image_disabled, track_image, track_highlight_image; @@ -85,9 +87,11 @@ private: S32 mMouseOffset; LLRect mDragStartThumbRect; - LLUIImage* mThumbImage; - LLUIImage* mTrackImage; - LLUIImage* mTrackHighlightImage; + LLPointer mThumbImage; + LLPointer mThumbImagePressed; + LLPointer mThumbImageDisabled; + LLPointer mTrackImage; + LLPointer mTrackHighlightImage; LLRect mThumbRect; LLUIColor mTrackColor; diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h index 9dbe458bae..b82feb3f58 100644 --- a/indra/llui/lluictrlfactory.h +++ b/indra/llui/lluictrlfactory.h @@ -459,6 +459,14 @@ LLChildRegistry::Register::Register(const char* tag, LLWidgetCreator { const std::type_info* widget_type_infop = &typeid(T); // associate parameter block type with template .xml file + std::string* existing_tag = LLWidgetNameRegistry ::instance().getValue(&typeid(typename T::Params)); + if (existing_tag != NULL && *existing_tag != tag) + { + // duplicate entry for T::Params + // try creating empty param block in derived classes that inherit T::Params + int* crash = 0; + *crash = 0; + } LLWidgetNameRegistry ::instance().defaultRegistrar().add(&typeid(typename T::Params), tag); // associate widget type with factory function LLDefaultWidgetRegistry::instance().defaultRegistrar().add(widget_type_infop, &LLUICtrlFactory::createDefaultWidget); diff --git a/indra/newview/llfloaterlagmeter.cpp b/indra/newview/llfloaterlagmeter.cpp index da6dceb149..3753dcaaa8 100644 --- a/indra/newview/llfloaterlagmeter.cpp +++ b/indra/newview/llfloaterlagmeter.cpp @@ -152,25 +152,25 @@ void LLFloaterLagMeter::determineClient() if (!gFocusMgr.getAppHasFocus()) { - mClientButton->setImageUnselected(LAG_GOOD_IMAGE_NAME); + mClientButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME)); mClientText->setText( getString("client_frame_time_window_bg_msg", mStringArgs) ); mClientCause->setText( LLStringUtil::null ); } else if(client_frame_time >= mClientFrameTimeCritical) { - mClientButton->setImageUnselected(LAG_CRITICAL_IMAGE_NAME); + mClientButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME)); mClientText->setText( getString("client_frame_time_critical_msg", mStringArgs) ); find_cause = true; } else if(client_frame_time >= mClientFrameTimeWarning) { - mClientButton->setImageUnselected(LAG_WARNING_IMAGE_NAME); + mClientButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME)); mClientText->setText( getString("client_frame_time_warning_msg", mStringArgs) ); find_cause = true; } else { - mClientButton->setImageUnselected(LAG_GOOD_IMAGE_NAME); + mClientButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME)); mClientText->setText( getString("client_frame_time_normal_msg", mStringArgs) ); mClientCause->setText( LLStringUtil::null ); } @@ -211,13 +211,13 @@ void LLFloaterLagMeter::determineNetwork() if(packet_loss >= mNetworkPacketLossCritical) { - mNetworkButton->setImageUnselected(LAG_CRITICAL_IMAGE_NAME); + mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME)); mNetworkText->setText( getString("network_packet_loss_critical_msg", mStringArgs) ); find_cause_loss = true; } else if(ping_time >= mNetworkPingCritical) { - mNetworkButton->setImageUnselected(LAG_CRITICAL_IMAGE_NAME); + mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME)); if (client_frame_time_ms < mNetworkPingCritical) { mNetworkText->setText( getString("network_ping_critical_msg", mStringArgs) ); @@ -226,13 +226,13 @@ void LLFloaterLagMeter::determineNetwork() } else if(packet_loss >= mNetworkPacketLossWarning) { - mNetworkButton->setImageUnselected(LAG_WARNING_IMAGE_NAME); + mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME)); mNetworkText->setText( getString("network_packet_loss_warning_msg", mStringArgs) ); find_cause_loss = true; } else if(ping_time >= mNetworkPingWarning) { - mNetworkButton->setImageUnselected(LAG_WARNING_IMAGE_NAME); + mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME)); if (client_frame_time_ms < mNetworkPingWarning) { mNetworkText->setText( getString("network_ping_warning_msg", mStringArgs) ); @@ -241,7 +241,7 @@ void LLFloaterLagMeter::determineNetwork() } else { - mNetworkButton->setImageUnselected(LAG_GOOD_IMAGE_NAME); + mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME)); mNetworkText->setText( getString("network_performance_normal_msg", mStringArgs) ); } @@ -266,19 +266,19 @@ void LLFloaterLagMeter::determineServer() if(sim_frame_time >= mServerFrameTimeCritical) { - mServerButton->setImageUnselected(LAG_CRITICAL_IMAGE_NAME); + mServerButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME)); mServerText->setText( getString("server_frame_time_critical_msg", mStringArgs) ); find_cause = true; } else if(sim_frame_time >= mServerFrameTimeWarning) { - mServerButton->setImageUnselected(LAG_WARNING_IMAGE_NAME); + mServerButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME)); mServerText->setText( getString("server_frame_time_warning_msg", mStringArgs) ); find_cause = true; } else { - mServerButton->setImageUnselected(LAG_GOOD_IMAGE_NAME); + mServerButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME)); mServerText->setText( getString("server_frame_time_normal_msg", mStringArgs) ); mServerCause->setText( LLStringUtil::null ); } diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 4ae188977e..879f106b1f 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1713,35 +1713,6 @@ void LLFloaterIMPanel::sendMsg() mOtherParticipantUUID, mDialog); - // local echo - if((mDialog == IM_NOTHING_SPECIAL) && - (mOtherParticipantUUID.notNull())) - { - std::string history_echo; - gAgent.buildFullname(history_echo); - - // Look for IRC-style emotes here. - std::string prefix = utf8_text.substr(0, 4); - if (prefix == "/me " || prefix == "/me'") - { - utf8_text.replace(0,3,""); - } - else - { - history_echo += ": "; - } - history_echo += utf8_text; - - BOOL other_was_typing = mOtherTyping; - - addHistoryLine(history_echo, LLUIColorTable::instance().getColor("IMChatColor"), true, gAgent.getID()); - - if (other_was_typing) - { - addTypingIndicator(mOtherTypingName); - } - - } } else { diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 6d0868b526..fa0ab0ea3f 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -380,6 +380,28 @@ void LLIMModel::sendMessage(const std::string& utf8_text, std::string from; gAgent.buildFullname(from); LLIMModel::instance().addToHistory(im_session_id, from, utf8_text); + + //local echo for the legacy communicate panel + std::string history_echo; + std::string utf8_copy = utf8_text; + gAgent.buildFullname(history_echo); + + // Look for IRC-style emotes here. + + std::string prefix = utf8_copy.substr(0, 4); + if (prefix == "/me " || prefix == "/me'") + { + utf8_copy.replace(0,3,""); + } + else + { + history_echo += ": "; + } + history_echo += utf8_copy; + + LLFloaterIMPanel* floater = gIMMgr->findFloaterBySession(im_session_id); + if (floater) floater->addHistoryLine(history_echo, LLUIColorTable::instance().getColor("IMChatColor"), true, gAgent.getID()); + } // Add the recipient to the recent people list. @@ -1362,7 +1384,7 @@ LLUUID LLIMMgr::addSession( { // *TODO: Remove this? Otherwise old communicate window opens on // second initiation of IM session from People panel? - floater->openFloater(); + // floater->openFloater(); } //mTabContainer->selectTabPanel(panel); floater->setInputFocus(TRUE); diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index a20296a122..7986d7c861 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -245,7 +245,7 @@ BOOL LLLocationInputCtrl::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* } // Cursor is above the text entry. - msg = LLUI::sShowXUINames ? getShowNamesToolTip() : gAgent.getSLURL(); + msg = LLUI::sShowXUINames ? getShowNamesToolTip() : ""; if (mTextEntry && sticky_rect_screen) { *sticky_rect_screen = mTextEntry->calcScreenRect(); diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 9be2fb12d2..0d50d7c781 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -798,6 +798,9 @@ void LLPanelPeople::onMoreButtonClicked() void LLPanelPeople::onOpen(const LLSD& key) { std::string tab_name = key["people_panel_tab_name"]; + mFilterEditor -> clear(); + onFilterEdit(""); + if (!tab_name.empty()) mTabContainer->selectTabByName(tab_name); else diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 5976897970..191c43791d 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -136,6 +136,9 @@ BOOL LLPanelPlaces::postBuild() void LLPanelPlaces::onOpen(const LLSD& key) { + mFilterEditor->clear(); + onFilterEdit(""); + if(mPlaceInfo == NULL || key.size() == 0) return; @@ -197,6 +200,8 @@ void LLPanelPlaces::onOpen(const LLSD& key) hist_items[index].mRegionID, pos_global); } + + } void LLPanelPlaces::setItem(LLInventoryItem* item) diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 5f0fbe6ee5..fec4798f7b 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -508,6 +508,8 @@ void LLSideTray::expandSideBar () { mCollapsed = false; mCollapseButton->setLabel(EXPANDED_NAME); + LLSD key;//empty + mActiveTab->onOpen(key); mActiveTab->setVisible(TRUE); reflectCollapseChange(); diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index bc90fe7adc..12fb811328 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -479,9 +479,11 @@ void LLStatusBar::creditBalance(S32 credit) void LLStatusBar::setBalance(S32 balance) { std::string money_str = LLResMgr::getInstance()->getMonetaryString( balance ); - std::string balance_str = "L$"; - balance_str += money_str; - mBtnBuyCurrency->setLabel( balance_str ); + + LLStringUtil::format_map_t string_args; + string_args["[AMT]"] = llformat("%s", money_str.c_str()); + std::string labe_str = getString("buycurrencylabel", string_args); + mBtnBuyCurrency->setLabel(labe_str); // Resize the balance button so that the label fits it, and the button expands to the left. // *TODO: LLButton should have an option where to expand. diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index d6be326a76..b502dbe6fc 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2905,7 +2905,9 @@ void LLViewerWindow::updateKeyboardFocus() { if (!cur_focus->isInVisibleChain() || !cur_focus->isInEnabledChain()) { - gFocusMgr.releaseFocusIfNeeded(cur_focus); + // don't release focus, just reassign so that if being given + // to a sibling won't call onFocusLost on all the ancestors + // gFocusMgr.releaseFocusIfNeeded(cur_focus); LLUICtrl* parent = cur_focus->getParentUICtrl(); const LLUICtrl* focus_root = cur_focus->findRootMostFocusRoot(); diff --git a/indra/newview/skins/default/textures/icons/ForwardArrow_Off.png b/indra/newview/skins/default/textures/icons/ForwardArrow_Off.png new file mode 100644 index 0000000000..e9b72b0401 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/ForwardArrow_Off.png differ diff --git a/indra/newview/skins/default/textures/icons/ForwardArrow_Press.png b/indra/newview/skins/default/textures/icons/ForwardArrow_Press.png new file mode 100644 index 0000000000..c7b2c769ae Binary files /dev/null and b/indra/newview/skins/default/textures/icons/ForwardArrow_Press.png differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 96d93e7081..69742c6ecd 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -15,6 +15,9 @@ + + + @@ -56,9 +59,12 @@ + + + - + @@ -110,7 +116,8 @@ - + + @@ -240,7 +247,7 @@ - + @@ -249,7 +256,7 @@ - + @@ -333,7 +340,7 @@ - + diff --git a/indra/newview/skins/default/textures/widgets/Arrow_Down.png b/indra/newview/skins/default/textures/widgets/Arrow_Down.png new file mode 100644 index 0000000000..e10f6472eb Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/Arrow_Down.png differ diff --git a/indra/newview/skins/default/textures/widgets/Arrow_Up.png b/indra/newview/skins/default/textures/widgets/Arrow_Up.png new file mode 100644 index 0000000000..48df69d82e Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/Arrow_Up.png differ diff --git a/indra/newview/skins/default/xui/en/floater_buy_land.xml b/indra/newview/skins/default/xui/en/floater_buy_land.xml index ec52c565ae..777236504d 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_land.xml @@ -374,9 +374,11 @@ supports [AMOUNT2] objects length="1" bottom_delta="-119" follows="top|left" + height="16" layout="topleft" left="204" name="info_parcel_label" + top="30" width="48"> Parcel: @@ -389,7 +391,7 @@ supports [AMOUNT2] objects layout="topleft" left_delta="16" name="info_parcel" - top_delta="-1" + top_pad="1" width="180"> Scotopteryx 138,204 @@ -397,9 +399,11 @@ supports [AMOUNT2] objects type="string" length="1" follows="top|left" + height="16" layout="topleft" left="204" name="info_size_label" + top_pad="1" width="48"> Size: @@ -412,7 +416,7 @@ supports [AMOUNT2] objects layout="topleft" left_delta="16" name="info_size" - top_delta="-1" + top_pad="1" width="180"> 1024 m² @@ -420,9 +424,11 @@ supports [AMOUNT2] objects type="string" length="1" follows="top|left" + height="16" layout="topleft" left="204" name="info_price_label" + top_pad="1" width="48"> Price: @@ -435,7 +441,7 @@ supports [AMOUNT2] objects layout="topleft" left_delta="16" name="info_price" - top_delta="-1" + top_pad="1" width="180"> L$ 1500 (L$ 1.1/m²) @@ -450,7 +456,7 @@ sold with objects layout="topleft" left="16" name="info_action" - top="156" + top="166" width="350"> Buying this land will: @@ -485,7 +491,7 @@ sold with objects layout="topleft" left_delta="0" name="error_web" - top_delta="144" + top_delta="154" width="120" /> Upgrade you to premium membership. @@ -562,7 +568,7 @@ sold with objects left="72" name="land_use_action" right="438" - top="274" + top="284" width="218"> Increase your monthly land use fees to US$ 40/month. @@ -638,7 +644,7 @@ sold with objects layout="topleft" left="170" name="currency_amt" - top="398" + top="408" width="80"> 1000 @@ -654,7 +660,7 @@ sold with objects layout="topleft" left="260" name="currency_est" - top="399" + top="409" width="178"> for approx. US$ [AMOUNT2] diff --git a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml index 6cb044cda1..467168ebd8 100644 --- a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml @@ -1,7 +1,7 @@ - You can: + You: + + Anyone: + + + + Group: + + + Next owner: + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/menu_nearby_chat.xml b/indra/newview/skins/default/xui/en/menu_nearby_chat.xml index 02a2f83d14..ff89e20ea5 100644 --- a/indra/newview/skins/default/xui/en/menu_nearby_chat.xml +++ b/indra/newview/skins/default/xui/en/menu_nearby_chat.xml @@ -7,7 +7,7 @@ - diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 2bb3c887f5..40847b28fe 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -205,7 +205,7 @@ function="Floater.Toggle" parameter="active_speakers" /> - @@ -215,7 +215,7 @@ - + + left="0" + top="0" + label="Notes & Privacy" + name="panel_notes"> - - - Your private notes: + text_color="white" + top=""> + My private notes: - - Allow this user to: + top_pad="30"> + Let this person: + name="status_check" /> + name="map_check"/> - + name="objects_check" /> -