From e04752c165900e652f4b8a8a62c1f351967847d7 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Fri, 8 Jan 2010 11:53:03 -0800 Subject: EXT-3874 Lindens can (appear to) be blocked from avatar info popup --- indra/newview/llinspectavatar.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 72994a4371..6cb3431419 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -520,7 +520,10 @@ void LLInspectAvatar::updateVolumeSlider() bool voice_enabled = gVoiceClient->getVoiceEnabled(mAvatarID); LLUICtrl* mute_btn = getChild("mute_btn"); - mute_btn->setEnabled( voice_enabled ); + + bool is_linden = LLStringUtil::endsWith(mAvatarName, " Linden"); + + mute_btn->setEnabled( voice_enabled && !is_linden); mute_btn->setValue( is_muted ); LLUICtrl* volume_slider = getChild("volume_slider"); -- cgit v1.2.3 From 8ac21358198c7eca0161ea38e6ce54a1e4dea6c2 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Fri, 8 Jan 2010 15:31:47 -0800 Subject: EXT-3615 Tiny cosmetic thing: make sure all "Ok" in buttons are changed to "OK" --- indra/newview/skins/default/xui/en/floater_bulk_perms.xml | 2 +- indra/newview/skins/default/xui/en/floater_color_picker.xml | 4 ++-- indra/newview/skins/default/xui/en/floater_mute_object.xml | 2 +- indra/newview/skins/default/xui/en/floater_texture_ctrl.xml | 4 ++-- indra/newview/skins/default/xui/en/notifications.xml | 8 ++++---- indra/newview/skins/default/xui/en/panel_group_notify.xml | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/floater_bulk_perms.xml b/indra/newview/skins/default/xui/en/floater_bulk_perms.xml index 53ae24fe3f..d007ceff98 100644 --- a/indra/newview/skins/default/xui/en/floater_bulk_perms.xml +++ b/indra/newview/skins/default/xui/en/floater_bulk_perms.xml @@ -287,7 +287,7 @@ Proxy location - + + + -- cgit v1.2.3 From 9ffaacc47e8d6d48158adb1b99728c876a6da2ee Mon Sep 17 00:00:00 2001 From: James Cook Date: Fri, 8 Jan 2010 17:26:47 -0800 Subject: First pass expose inventory item settings in XML (folder_view_item.xml) Optimized LLFolderViewItem constructor by passing param block as const ref to avoid copies. Removed per-item arrow and background images, use defaults. Removed unneeded static image pointers. Removed hard-coded rounded_square.tga, replaced with Rounded_Square Ditto for folder_arrow.tga Reviewed with Richard. --- indra/llui/llconsole.cpp | 2 +- indra/llui/llmultislider.cpp | 2 +- indra/llui/llscrolllistcell.cpp | 2 +- indra/newview/app_settings/settings.xml | 11 ---- indra/newview/llfasttimerview.cpp | 2 +- indra/newview/llfolderview.cpp | 10 +-- indra/newview/llfolderviewitem.cpp | 73 +++++++++++----------- indra/newview/llfolderviewitem.h | 14 ++--- indra/newview/llhudtext.cpp | 2 +- indra/newview/llmanip.cpp | 2 +- indra/newview/skins/default/textures/textures.xml | 3 +- .../default/xui/en/panel_preferences_graphics1.xml | 8 +-- .../skins/default/xui/en/panel_progress.xml | 2 +- .../default/xui/en/widgets/folder_view_item.xml | 8 +++ 14 files changed, 71 insertions(+), 70 deletions(-) create mode 100644 indra/newview/skins/default/xui/en/widgets/folder_view_item.xml (limited to 'indra') diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp index e08d93b232..59499f987b 100644 --- a/indra/llui/llconsole.cpp +++ b/indra/llui/llconsole.cpp @@ -180,7 +180,7 @@ void LLConsole::draw() // draw remaining lines F32 y_pos = 0.f; - LLUIImagePtr imagep = LLUI::getUIImage("rounded_square.tga"); + LLUIImagePtr imagep = LLUI::getUIImage("Rounded_Square"); // F32 console_opacity = llclamp(gSavedSettings.getF32("ConsoleBackgroundOpacity"), 0.f, 1.f); F32 console_opacity = llclamp(LLUI::sSettingGroups["config"]->getF32("ConsoleBackgroundOpacity"), 0.f, 1.f); diff --git a/indra/llui/llmultislider.cpp b/indra/llui/llmultislider.cpp index aea7c5f87c..27a727fdf5 100644 --- a/indra/llui/llmultislider.cpp +++ b/indra/llui/llmultislider.cpp @@ -490,7 +490,7 @@ void LLMultiSlider::draw() F32 opacity = getEnabled() ? 1.f : 0.3f; // Track - LLUIImagePtr thumb_imagep = LLUI::getUIImage("rounded_square.tga"); + LLUIImagePtr thumb_imagep = LLUI::getUIImage("Rounded_Square"); static LLUICachedControl multi_track_height ("UIMultiTrackHeight", 0); S32 height_offset = (getRect().getHeight() - multi_track_height) / 2; diff --git a/indra/llui/llscrolllistcell.cpp b/indra/llui/llscrolllistcell.cpp index 7238d903a3..3cc92baa8d 100644 --- a/indra/llui/llscrolllistcell.cpp +++ b/indra/llui/llscrolllistcell.cpp @@ -188,7 +188,7 @@ LLScrollListText::LLScrollListText(const LLScrollListCell::Params& p) // initialize rounded rect image if (!mRoundedRectImage) { - mRoundedRectImage = LLUI::getUIImage("rounded_square.tga"); + mRoundedRectImage = LLUI::getUIImage("Rounded_Square"); } } diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7d98a4b6ce..382793a497 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3257,17 +3257,6 @@ Value 0.75 - FolderIndentation - - Comment - Number of pixels to indent subfolders in inventory - Persist - 1 - Type - S32 - Value - 8 - FolderLoadingMessageWaitTime Comment diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 7d8bb6e104..4fa97e789b 100644 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -314,7 +314,7 @@ void LLFastTimerView::draw() S32 left, top, right, bottom; S32 x, y, barw, barh, dx, dy; S32 texth, textw; - LLPointer box_imagep = LLUI::getUIImage("rounded_square.tga"); + LLPointer box_imagep = LLUI::getUIImage("Rounded_Square"); // Draw the window background gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 41f4d1a663..1ab111a41d 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -206,7 +206,9 @@ LLFolderView::LLFolderView(const Params& p) mAutoOpenCandidate = NULL; mAutoOpenTimer.stop(); mKeyboardSelection = FALSE; - static LLUICachedControl indentation("FolderIndentation", 0); + const LLFolderViewItem::Params& item_params = + LLUICtrlFactory::getDefaultParams(); + S32 indentation = item_params.folder_indentation(); mIndentation = -indentation; // children start at indentation 0 gIdleCallbacks.addFunction(idle, this); @@ -395,7 +397,7 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_gen getRoot()->getFilter()->getShowFolderState(); S32 total_width = LEFT_PAD; - S32 running_height = mDebugFilters ? llceil(sSmallFont->getLineHeight()) : 0; + S32 running_height = mDebugFilters ? llceil(LLFontGL::getFontMonospace()->getLineHeight()) : 0; S32 target_height = running_height; S32 parent_item_height = getRect().getHeight(); @@ -866,8 +868,8 @@ void LLFolderView::draw() { std::string current_filter_string = llformat("Current Filter: %d, Least Filter: %d, Auto-accept Filter: %d", mFilter->getCurrentGeneration(), mFilter->getMinRequiredGeneration(), mFilter->getMustPassGeneration()); - sSmallFont->renderUTF8(current_filter_string, 0, 2, - getRect().getHeight() - sSmallFont->getLineHeight(), LLColor4(0.5f, 0.5f, 0.8f, 1.f), + LLFontGL::getFontMonospace()->renderUTF8(current_filter_string, 0, 2, + getRect().getHeight() - LLFontGL::getFontMonospace()->getLineHeight(), LLColor4(0.5f, 0.5f, 0.8f, 1.f), LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); } diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 9d54aafd67..41ceb5972e 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -51,11 +51,10 @@ /// Class LLFolderViewItem ///---------------------------------------------------------------------------- +static LLDefaultChildRegistry::Register r("folder_view_item"); + // statics std::map LLFolderViewItem::sFonts; // map of styles to fonts -const LLFontGL* LLFolderViewItem::sSmallFont = NULL; -LLUIImagePtr LLFolderViewItem::sArrowImage; -LLUIImagePtr LLFolderViewItem::sBoxImage; // only integers can be initialized in header const F32 LLFolderViewItem::FOLDER_CLOSE_TIME_CONSTANT = 0.02f; @@ -84,33 +83,34 @@ LLFontGL* LLFolderViewItem::getLabelFontForStyle(U8 style) //static void LLFolderViewItem::initClass() { - sSmallFont = LLFontGL::getFontMonospace(); - sArrowImage = LLUI::getUIImage("folder_arrow.tga"); - sBoxImage = LLUI::getUIImage("rounded_square.tga"); } //static void LLFolderViewItem::cleanupClass() { sFonts.clear(); - sArrowImage = NULL; - sBoxImage = NULL; } // NOTE: Optimize this, we call it a *lot* when opening a large inventory LLFolderViewItem::Params::Params() -: icon("icon"), - folder_arrow_image("folder_arrow_image", LLUI::getUIImage("folder_arrow.tga")), - selection_image("selection_image", LLUI::getUIImage("rounded_square.tga")) +: icon(), + icon_open(), + root(), + listener(), + folder_arrow_image("folder_arrow_image"), + folder_indentation("folder_indentation"), + selection_image("selection_image"), + font("font"), + item_height("item_height"), + creation_date() { mouse_opaque(true); follows.flags(FOLLOWS_LEFT|FOLLOWS_TOP|FOLLOWS_RIGHT); - // JAMESDEBUG tab_stop(false); } // Default constructor -LLFolderViewItem::LLFolderViewItem(LLFolderViewItem::Params p) +LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p) : LLView(p), mLabelWidth(0), mLabelWidthDirty(false), @@ -121,6 +121,7 @@ LLFolderViewItem::LLFolderViewItem(LLFolderViewItem::Params p) mLabelStyle( LLFontGL::NORMAL ), mHasVisibleChildren(FALSE), mIndentation(0), + mItemHeight(p.item_height), mNumDescendantsSelected(0), mPassedFilter(FALSE), mLastFilterGeneration(-1), @@ -134,8 +135,6 @@ LLFolderViewItem::LLFolderViewItem(LLFolderViewItem::Params p) mIcon(p.icon), mIconOpen(p.icon_open), mListener(p.listener), - mArrowImage(p.folder_arrow_image), - mBoxImage(p.selection_image), mHidden(false), mShowLoadStatus(false) { @@ -392,10 +391,11 @@ BOOL LLFolderViewItem::addToFolder(LLFolderViewFolder* folder, LLFolderView* roo // makes sure that this view and it's children are the right size. S32 LLFolderViewItem::arrange( S32* width, S32* height, S32 filter_generation) { - static LLUICachedControl indentation("FolderIndentation", 0); + const Params& p = LLUICtrlFactory::getDefaultParams(); + S32 indentation = p.folder_indentation(); + // Only indent deeper items in hierarchy mIndentation = (getParentFolder() - && getParentFolder()->getParentFolder() - && getParentFolder()->getParentFolder()->getParentFolder()) + && getParentFolder()->getParentFolder() ) ? mParentFolder->getIndentation() + indentation : 0; if (mLabelWidthDirty) @@ -421,9 +421,10 @@ S32 LLFolderViewItem::getItemHeight() { if (mHidden) return 0; - S32 icon_height = mIcon->getHeight(); - S32 label_height = llround(getLabelFontForStyle(mLabelStyle)->getLineHeight()); - return llmax( icon_height, label_height ) + ICON_PAD; + //S32 icon_height = mIcon->getHeight(); + //S32 label_height = llround(getLabelFontForStyle(mLabelStyle)->getLineHeight()); + //return llmax( icon_height, label_height ) + ICON_PAD; + return mItemHeight; } void LLFolderViewItem::filter( LLInventoryFilter& filter) @@ -834,6 +835,8 @@ void LLFolderViewItem::draw() static LLUIColor sSuffixColor = LLUIColorTable::instance().getColor("InventoryItemSuffixColor", DEFAULT_WHITE); static LLUIColor sSearchStatusColor = LLUIColorTable::instance().getColor("InventorySearchStatusColor", DEFAULT_WHITE); + const Params& default_params = LLUICtrlFactory::getDefaultParams(); + bool possibly_has_children = false; bool up_to_date = mListener && mListener->isUpToDate(); if((up_to_date && hasVisibleChildren() ) || // we fetched our children and some of them have passed the filter... @@ -843,11 +846,9 @@ void LLFolderViewItem::draw() } if(/*mControlLabel[0] != '\0' && */possibly_has_children) { - if (sArrowImage) - { - gl_draw_scaled_rotated_image(mIndentation, getRect().getHeight() - ARROW_SIZE - TEXT_PAD, - ARROW_SIZE, ARROW_SIZE, mControlLabelRotation, sArrowImage->getImage(), sFgColor); - } + LLUIImage* arrow_image = default_params.folder_arrow_image; + gl_draw_scaled_rotated_image(mIndentation, getRect().getHeight() - ARROW_SIZE - TEXT_PAD, + ARROW_SIZE, ARROW_SIZE, mControlLabelRotation, arrow_image->getImage(), sFgColor); } F32 text_left = (F32)(ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + mIndentation); @@ -885,7 +886,7 @@ void LLFolderViewItem::draw() 0, getRect().getHeight(), getRect().getWidth() - 2, - llfloor(getRect().getHeight() - font->getLineHeight() - ICON_PAD), + llfloor(getRect().getHeight() - mItemHeight), bg_color, filled); if (mIsCurSelection) { @@ -893,14 +894,14 @@ void LLFolderViewItem::draw() 0, getRect().getHeight(), getRect().getWidth() - 2, - llfloor(getRect().getHeight() - font->getLineHeight() - ICON_PAD), + llfloor(getRect().getHeight() - mItemHeight), sHighlightFgColor, FALSE); } - if (getRect().getHeight() > llround(font->getLineHeight()) + ICON_PAD + 4) + if (getRect().getHeight() > mItemHeight + 4) { gl_rect_2d( 0, - llfloor(getRect().getHeight() - font->getLineHeight() - ICON_PAD) - 4, + llfloor(getRect().getHeight() - mItemHeight) - 4, getRect().getWidth() - 2, 2, sHighlightFgColor, FALSE); @@ -908,7 +909,7 @@ void LLFolderViewItem::draw() { gl_rect_2d( 0, - llfloor(getRect().getHeight() - font->getLineHeight() - ICON_PAD) - 4, + llfloor(getRect().getHeight() - mItemHeight) - 4, getRect().getWidth() - 2, 2, sHighlightBgColor, TRUE); @@ -963,7 +964,8 @@ void LLFolderViewItem::draw() } LLColor4 filter_color = mLastFilterGeneration >= getRoot()->getFilter()->getCurrentGeneration() ? LLColor4(0.5f, 0.8f, 0.5f, 1.f) : LLColor4(0.8f, 0.5f, 0.5f, 1.f); - sSmallFont->renderUTF8(mStatusText, 0, text_left, y, filter_color, + LLFontGL::getFontMonospace()->renderUTF8( + mStatusText, 0, text_left, y, filter_color, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, &right_x, FALSE ); text_left = right_x; @@ -1004,7 +1006,7 @@ void LLFolderViewItem::draw() S32_MAX, S32_MAX, &right_x, FALSE ); } - if (sBoxImage.notNull() && mStringMatchOffset != std::string::npos) + if (mStringMatchOffset != std::string::npos) { // don't draw backgrounds for zero-length strings S32 filter_string_length = getRoot()->getFilterSubString().size(); @@ -1015,9 +1017,10 @@ void LLFolderViewItem::draw() S32 right = left + font->getWidth(combined_string, mStringMatchOffset, filter_string_length) + 2; S32 bottom = llfloor(getRect().getHeight() - font->getLineHeight() - 3); S32 top = getRect().getHeight(); - + + LLUIImage* box_image = default_params.selection_image; LLRect box_rect(left, top, right, bottom); - sBoxImage->draw(box_rect, sFilterBGColor); + box_image->draw(box_rect, sFilterBGColor); F32 match_string_left = text_left + font->getWidthF32(combined_string, 0, mStringMatchOffset); F32 y = (F32)getRect().getHeight() - font->getLineHeight() - (F32)TEXT_PAD; font->renderUTF8( combined_string, mStringMatchOffset, match_string_left, y, diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index 6f8c738a59..9e35f75c96 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -101,7 +101,10 @@ public: Optional listener; Optional folder_arrow_image; + Optional folder_indentation; // pixels Optional selection_image; + Optional font; + Optional item_height; // pixels Optional creation_date; //UTC seconds @@ -110,7 +113,7 @@ public: // layout constants static const S32 LEFT_PAD = 5; - // LEFT_INDENTATION is set via settings.xml FolderIndentation + // LEFT_INDENTATION is set via folder_indentation above static const S32 ICON_PAD = 2; static const S32 ICON_WIDTH = 16; static const S32 TEXT_PAD = 1; @@ -127,11 +130,7 @@ protected: friend class LLUICtrlFactory; friend class LLFolderViewEventListener; - LLFolderViewItem(Params p = LLFolderViewItem::Params()); - - static const LLFontGL* sSmallFont; - static LLUIImagePtr sArrowImage; - static LLUIImagePtr sBoxImage; + LLFolderViewItem(const Params& p); std::string mLabel; std::string mSearchableLabel; @@ -150,6 +149,7 @@ protected: LLUIImagePtr mIconOpen; BOOL mHasVisibleChildren; S32 mIndentation; + S32 mItemHeight; S32 mNumDescendantsSelected; BOOL mPassedFilter; S32 mLastFilterGeneration; @@ -157,8 +157,6 @@ protected: F32 mControlLabelRotation; LLFolderView* mRoot; BOOL mDragAndDropTarget; - LLUIImagePtr mArrowImage; - LLUIImagePtr mBoxImage; BOOL mIsLoading; LLTimer mTimeSinceRequestStart; bool mHidden; diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 08cf86df4a..8ad94b957d 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -287,7 +287,7 @@ void LLHUDText::renderText(BOOL for_select) mOffsetY = lltrunc(mHeight * ((mVertAlignment == ALIGN_VERT_CENTER) ? 0.5f : 1.f)); // *TODO: cache this image - LLUIImagePtr imagep = LLUI::getUIImage("rounded_square.tga"); + LLUIImagePtr imagep = LLUI::getUIImage("Rounded_Square"); // *TODO: make this a per-text setting LLColor4 bg_color = LLUIColorTable::instance().getColor("BackgroundChatColor"); diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp index f30821cacf..a96240e31c 100644 --- a/indra/newview/llmanip.cpp +++ b/indra/newview/llmanip.cpp @@ -436,7 +436,7 @@ void LLManip::renderXYZ(const LLVector3 &vec) glPushMatrix(); { - LLUIImagePtr imagep = LLUI::getUIImage("rounded_square.tga"); + LLUIImagePtr imagep = LLUI::getUIImage("Rounded_Square"); gViewerWindow->setup2DRender(); const LLVector2& display_scale = gViewerWindow->getDisplayScale(); glScalef(display_scale.mV[VX], display_scale.mV[VY], 1.f); diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 75424e71f5..dab11149b9 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -167,6 +167,7 @@ with the same filename but different name + @@ -439,6 +440,7 @@ with the same filename but different name + @@ -676,7 +678,6 @@ with the same filename but different name - diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index f97ccafecc..cc00abf5a0 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -76,7 +76,7 @@ + -- cgit v1.2.3 From 6fc07313196b430573efe3be7dfcffa6d7b4b957 Mon Sep 17 00:00:00 2001 From: Lis Linden Date: Mon, 11 Jan 2010 14:04:06 -0500 Subject: ext-3910 Instant Messages isn't in ALL CAPS like other windows --- indra/newview/skins/default/xui/en/floater_im_container.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml index cd297af99d..ccbba61ddf 100644 --- a/indra/newview/skins/default/xui/en/floater_im_container.xml +++ b/indra/newview/skins/default/xui/en/floater_im_container.xml @@ -9,7 +9,7 @@ save_rect="true" save_visibility="true" single_instance="true" - title="Instant Messages" + title="CONVERSATIONS" width="392"> Date: Mon, 11 Jan 2010 11:07:18 -0800 Subject: New art for landmarks and places - replacing the pushpin with a globe - reviewed with esbee --- .../skins/default/textures/icons/Inv_Landmark.png | Bin 532 -> 582 bytes .../default/textures/taskpanel/TabIcon_Places_Off.png | Bin 335 -> 405 bytes .../textures/taskpanel/TabIcon_Places_Selected.png | Bin 456 -> 653 bytes 3 files changed, 0 insertions(+), 0 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/textures/icons/Inv_Landmark.png b/indra/newview/skins/default/textures/icons/Inv_Landmark.png index f8ce765c50..76df984596 100644 Binary files a/indra/newview/skins/default/textures/icons/Inv_Landmark.png and b/indra/newview/skins/default/textures/icons/Inv_Landmark.png differ diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Off.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Off.png index ada28e01da..f5a5f7a846 100644 Binary files a/indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Off.png and b/indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Off.png differ diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Selected.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Selected.png index 0f8d5619ec..8e0fb9661e 100644 Binary files a/indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Selected.png and b/indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Selected.png differ -- cgit v1.2.3 From 6473dbf588746ca6871dd89c80ecace1a50a5672 Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 11 Jan 2010 11:58:56 -0800 Subject: EXT-3695, EXT-2034 Line height, padding in inventory customizable in XUI via folder_view_item.xml EXT-3753 Inventory folders now have customizable item indents and "My Inventory" has indent again Reviewed with Richard --- indra/newview/llfolderviewitem.cpp | 73 ++++++++++++---------- indra/newview/llfolderviewitem.h | 2 +- indra/newview/skins/default/colors.xml | 3 + .../default/xui/en/widgets/folder_view_item.xml | 6 +- 4 files changed, 47 insertions(+), 37 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 41ceb5972e..2363f51d80 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -101,8 +101,8 @@ LLFolderViewItem::Params::Params() folder_arrow_image("folder_arrow_image"), folder_indentation("folder_indentation"), selection_image("selection_image"), - font("font"), item_height("item_height"), + item_top_pad("item_top_pad"), creation_date() { mouse_opaque(true); @@ -830,12 +830,15 @@ void LLFolderViewItem::draw() static LLUIColor sFgColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE); static LLUIColor sHighlightBgColor = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", DEFAULT_WHITE); static LLUIColor sHighlightFgColor = LLUIColorTable::instance().getColor("MenuItemHighlightFgColor", DEFAULT_WHITE); + static LLUIColor sFocusOutlineColor = + LLUIColorTable::instance().getColor("InventoryFocusOutlineColor", DEFAULT_WHITE); static LLUIColor sFilterBGColor = LLUIColorTable::instance().getColor("FilterBackgroundColor", DEFAULT_WHITE); static LLUIColor sFilterTextColor = LLUIColorTable::instance().getColor("FilterTextColor", DEFAULT_WHITE); static LLUIColor sSuffixColor = LLUIColorTable::instance().getColor("InventoryItemSuffixColor", DEFAULT_WHITE); static LLUIColor sSearchStatusColor = LLUIColorTable::instance().getColor("InventorySearchStatusColor", DEFAULT_WHITE); const Params& default_params = LLUICtrlFactory::getDefaultParams(); + const S32 TOP_PAD = default_params.item_top_pad; bool possibly_has_children = false; bool up_to_date = mListener && mListener->isUpToDate(); @@ -847,7 +850,8 @@ void LLFolderViewItem::draw() if(/*mControlLabel[0] != '\0' && */possibly_has_children) { LLUIImage* arrow_image = default_params.folder_arrow_image; - gl_draw_scaled_rotated_image(mIndentation, getRect().getHeight() - ARROW_SIZE - TEXT_PAD, + gl_draw_scaled_rotated_image( + mIndentation, getRect().getHeight() - ARROW_SIZE - TEXT_PAD - TOP_PAD, ARROW_SIZE, ARROW_SIZE, mControlLabelRotation, arrow_image->getImage(), sFgColor); } @@ -858,6 +862,10 @@ void LLFolderViewItem::draw() // If we have keyboard focus, draw selection filled BOOL show_context = getRoot()->getShowSelectionContext(); BOOL filled = show_context || (getRoot()->getParentPanel()->hasFocus()); + const S32 FOCUS_LEFT = 1; + S32 focus_top = getRect().getHeight(); + S32 focus_bottom = getRect().getHeight() - mItemHeight; + bool folder_open = (getRect().getHeight() > mItemHeight + 4); // always render "current" item, only render other selected items if // mShowSingleSelection is FALSE @@ -865,7 +873,6 @@ void LLFolderViewItem::draw() { gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); LLColor4 bg_color = sHighlightBgColor; - //const S32 TRAILING_PAD = 5; // It just looks better with this. if (!mIsCurSelection) { // do time-based fade of extra objects @@ -883,35 +890,35 @@ void LLFolderViewItem::draw() } gl_rect_2d( - 0, - getRect().getHeight(), + FOCUS_LEFT, + focus_top, getRect().getWidth() - 2, - llfloor(getRect().getHeight() - mItemHeight), + focus_bottom, bg_color, filled); if (mIsCurSelection) { gl_rect_2d( - 0, - getRect().getHeight(), + FOCUS_LEFT, + focus_top, getRect().getWidth() - 2, - llfloor(getRect().getHeight() - mItemHeight), - sHighlightFgColor, FALSE); + focus_bottom, + sFocusOutlineColor, FALSE); } - if (getRect().getHeight() > mItemHeight + 4) + if (folder_open) { gl_rect_2d( - 0, - llfloor(getRect().getHeight() - mItemHeight) - 4, + FOCUS_LEFT, + focus_bottom + 1, // overlap with bottom edge of above rect getRect().getWidth() - 2, - 2, - sHighlightFgColor, FALSE); + 0, + sFocusOutlineColor, FALSE); if (show_context) { gl_rect_2d( - 0, - llfloor(getRect().getHeight() - mItemHeight) - 4, + FOCUS_LEFT, + focus_bottom + 1, getRect().getWidth() - 2, - 2, + 0, sHighlightBgColor, TRUE); } } @@ -920,32 +927,32 @@ void LLFolderViewItem::draw() { gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); gl_rect_2d( - 0, - getRect().getHeight(), + FOCUS_LEFT, + focus_top, getRect().getWidth() - 2, - llfloor(getRect().getHeight() - font->getLineHeight() - ICON_PAD), + focus_bottom, sHighlightBgColor, FALSE); - - if (getRect().getHeight() > llround(font->getLineHeight()) + ICON_PAD + 2) + if (folder_open) { gl_rect_2d( - 0, - llfloor(getRect().getHeight() - font->getLineHeight() - ICON_PAD) - 2, + FOCUS_LEFT, + focus_bottom + 1, // overlap with bottom edge of above rect getRect().getWidth() - 2, - 2, + 0, sHighlightBgColor, FALSE); } mDragAndDropTarget = FALSE; } + S32 icon_x = mIndentation + ARROW_SIZE + TEXT_PAD; // First case is used for open folders if (!mIconOpen.isNull() && (llabs(mControlLabelRotation) > 80)) { - mIconOpen->draw(mIndentation + ARROW_SIZE + TEXT_PAD, getRect().getHeight() - mIcon->getHeight()); + mIconOpen->draw(icon_x, getRect().getHeight() - mIconOpen->getHeight() - TOP_PAD + 1); } else if(mIcon) { - mIcon->draw(mIndentation + ARROW_SIZE + TEXT_PAD, getRect().getHeight() - mIcon->getHeight()); + mIcon->draw(icon_x, getRect().getHeight() - mIcon->getHeight() - TOP_PAD + 1); } if (!mLabel.empty()) @@ -954,7 +961,7 @@ void LLFolderViewItem::draw() BOOL debug_filters = getRoot()->getDebugFilters(); LLColor4 color = ( (mIsSelected && filled) ? sHighlightFgColor : sFgColor ); F32 right_x; - F32 y = (F32)getRect().getHeight() - font->getLineHeight() - (F32)TEXT_PAD; + F32 y = (F32)getRect().getHeight() - font->getLineHeight() - (F32)TEXT_PAD - (F32)TOP_PAD; if (debug_filters) { @@ -1015,15 +1022,15 @@ void LLFolderViewItem::draw() std::string combined_string = mLabel + mLabelSuffix; S32 left = llround(text_left) + font->getWidth(combined_string, 0, mStringMatchOffset) - 1; S32 right = left + font->getWidth(combined_string, mStringMatchOffset, filter_string_length) + 2; - S32 bottom = llfloor(getRect().getHeight() - font->getLineHeight() - 3); - S32 top = getRect().getHeight(); + S32 bottom = llfloor(getRect().getHeight() - font->getLineHeight() - 3 - TOP_PAD); + S32 top = getRect().getHeight() - TOP_PAD; LLUIImage* box_image = default_params.selection_image; LLRect box_rect(left, top, right, bottom); box_image->draw(box_rect, sFilterBGColor); F32 match_string_left = text_left + font->getWidthF32(combined_string, 0, mStringMatchOffset); - F32 y = (F32)getRect().getHeight() - font->getLineHeight() - (F32)TEXT_PAD; - font->renderUTF8( combined_string, mStringMatchOffset, match_string_left, y, + F32 yy = (F32)getRect().getHeight() - font->getLineHeight() - (F32)TEXT_PAD - (F32)TOP_PAD; + font->renderUTF8( combined_string, mStringMatchOffset, match_string_left, yy, sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, filter_string_length, S32_MAX, &right_x, FALSE ); } diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index 9e35f75c96..14fac5bdf9 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -103,8 +103,8 @@ public: Optional folder_arrow_image; Optional folder_indentation; // pixels Optional selection_image; - Optional font; Optional item_height; // pixels + Optional item_top_pad; // pixels Optional creation_date; //UTC seconds diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index 887cff56f6..0044daf6b4 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -395,6 +395,9 @@ + diff --git a/indra/newview/skins/default/xui/en/widgets/folder_view_item.xml b/indra/newview/skins/default/xui/en/widgets/folder_view_item.xml index b0e403a7a5..e6bdcccfdf 100644 --- a/indra/newview/skins/default/xui/en/widgets/folder_view_item.xml +++ b/indra/newview/skins/default/xui/en/widgets/folder_view_item.xml @@ -1,8 +1,8 @@ -- cgit v1.2.3 From 572424ffac0401f311740b619da040b1b5077a55 Mon Sep 17 00:00:00 2001 From: Lis Linden Date: Mon, 11 Jan 2010 15:06:59 -0500 Subject: ext-4116 bad label position on Region/Estate/ Ground Textures --- .../skins/default/xui/en/panel_region_texture.xml | 26 ++++++++++------------ 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_region_texture.xml b/indra/newview/skins/default/xui/en/panel_region_texture.xml index a4d24cb0fc..502a5804c3 100644 --- a/indra/newview/skins/default/xui/en/panel_region_texture.xml +++ b/indra/newview/skins/default/xui/en/panel_region_texture.xml @@ -136,7 +136,7 @@ layout="topleft" left="10" name="height_text_lbl5" - top="186" + top="170" width="300"> Texture Elevation Ranges @@ -146,7 +146,7 @@ layout="topleft" left="51" name="height_text_lbl6" - top="201" + top="185" width="100"> Southwest @@ -171,7 +171,7 @@ max_val="500" min_val="-500" name="height_start_spin_0" - top_delta="20" + top_delta="15" width="100" /> Southeast @@ -243,7 +243,7 @@ max_val="500" min_val="-500" name="height_start_spin_2" - top_delta="20" + top_delta="15" width="100" /> - These values represent the blend range - for the textures above. + width="400" + wrap="true"> + These values represent the blend range for the textures above. - Measured in meters, the LOW value - is the MAXIMUM height of Texture #1, - and the HIGH value is the MINIMUM - height of Texture #4. + width="400" + wrap="true"> + Measured in meters, the LOW value is the MAXIMUM height of Texture #1, and the HIGH value is the MINIMUM height of Texture #4. - - - Cache location - - + width="400" + top_pad="5"/> - Proxy location + width="300"> + Proxy location: - + + -- cgit v1.2.3 From 09dc1af21c7b723059f6ff1c46eabafb088daa3b Mon Sep 17 00:00:00 2001 From: Lis Linden Date: Mon, 11 Jan 2010 16:26:22 -0500 Subject: ext-3820 [BSI] Preferences > Chat > Show IMs In: does not take effect without restart --- indra/newview/skins/default/xui/en/panel_preferences_chat.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml index 017c321767..6e0b94ac2b 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -318,15 +318,15 @@ height="20" width="300" top_pad="20"> - Show IMs in: + Show IMs in: (Requires restart) -- cgit v1.2.3 From 8f4c2a59db47283e1edb8ae7f6dee4466b95d1e9 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 11 Jan 2010 16:36:27 -0500 Subject: For EXT-4068: [BSI] right click several times on an inventory item produces several second hang. Improved speed of panel finding by restricting search to only panels, saving time when inventory is very large --- indra/newview/llsidetray.cpp | 52 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 8 deletions(-) (limited to 'indra') diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 608165022f..d1236b948e 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -641,24 +641,60 @@ LLPanel* LLSideTray::showPanel (const std::string& panel_name, const LLSD& para return NULL; } -LLPanel* LLSideTray::getPanel (const std::string& panel_name) +// This is just LLView::findChildView specialized to restrict the search to LLPanels. +// Optimization for EXT-4068 to avoid searching down to the individual item level +// when inventories are large. +LLPanel *findChildPanel(LLPanel *panel, const std::string& name, bool recurse, S32& count) { - child_vector_const_iter_t child_it; - for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it) + for (LLView::child_list_const_iter_t child_it = panel->beginChild(); + child_it != panel->endChild(); ++child_it) { - LLView* view = (*child_it)->findChildView(panel_name,true); - if(view) + count++; + LLPanel *child_panel = dynamic_cast(*child_it); + if (!child_panel) + continue; + if (child_panel->getName() == name) + return child_panel; + } + if (recurse) + { + for (LLView::child_list_const_iter_t child_it = panel->beginChild(); + child_it != panel->endChild(); ++child_it) { - LLPanel* panel = dynamic_cast(view); - if(panel) + count++; + LLPanel *child_panel = dynamic_cast(*child_it); + if (!child_panel) + continue; + LLPanel *found_panel = findChildPanel(child_panel,name,recurse,count); + if (found_panel) { - return panel; + return found_panel; } } } return NULL; } +LLPanel* LLSideTray::getPanel(const std::string& panel_name) +{ + static S32 max_count = 0; + S32 count = 0; + for ( child_vector_const_iter_t child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it) + { + LLPanel *panel = findChildPanel(*child_it,panel_name,true,count); + if (count > max_count) + { + max_count = count; + llwarns << "max_count " << max_count << llendl; + } + if(panel) + { + return panel; + } + } + return NULL; +} + LLPanel* LLSideTray::getActivePanel() { if (mActiveTab && !mCollapsed) -- cgit v1.2.3 From ba1f246503bd4c4334a0e6c2de78d790e262a276 Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 11 Jan 2010 13:58:42 -0800 Subject: EXT-3687 Inventory and Outfits lists don't fill panel need DkGray2 background EXT-4044 Inventory and Outfits scroll region has no background color/border Moved background color initialization to inventory_panel.xml Fixed search highlight color and extra borders no longer needed now that colors are correct. Reviewed with Simon. --- indra/newview/llinventorypanel.cpp | 4 ---- indra/newview/skins/default/colors.xml | 4 ++-- indra/newview/skins/default/xui/en/panel_landmarks.xml | 8 ++++---- indra/newview/skins/default/xui/en/widgets/inventory_panel.xml | 6 ++++++ 4 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 indra/newview/skins/default/xui/en/widgets/inventory_panel.xml (limited to 'indra') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 498a29728c..9141d50829 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -98,10 +98,6 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) : mCommitCallbackRegistrar.add("Inventory.AttachObject", boost::bind(&LLInventoryPanel::attachObject, this, _2)); mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&LLInventoryPanel::beginIMSession, this)); - setBackgroundColor(LLUIColorTable::instance().getColor("InventoryBackgroundColor")); - setBackgroundVisible(TRUE); - setBackgroundOpaque(TRUE); - if (mStartFolderString != "") { mBuildDefaultHierarchy = false; diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index 0044daf6b4..6da38fa0d4 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -292,7 +292,7 @@ reference="White" /> + reference="Black" /> @@ -394,7 +394,7 @@ reference="White" /> + reference="DkGray2" /> diff --git a/indra/newview/skins/default/xui/en/panel_landmarks.xml b/indra/newview/skins/default/xui/en/panel_landmarks.xml index c899dcb750..039e1ae086 100644 --- a/indra/newview/skins/default/xui/en/panel_landmarks.xml +++ b/indra/newview/skins/default/xui/en/panel_landmarks.xml @@ -25,7 +25,7 @@ title="Favorites bar"> + -- cgit v1.2.3 From fb9a20802f3386bee82a8bd9a479f209374fa9a4 Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 11 Jan 2010 14:18:43 -0800 Subject: Better resolution of merge conflict --- indra/newview/llinspectavatar.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 22451998c6..8f4fba244d 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -534,7 +534,6 @@ void LLInspectAvatar::updateVolumeSlider() // By convention, we only display and toggle voice mutes, not all mutes bool is_muted = LLMuteList::getInstance()-> isMuted(mAvatarID, LLMute::flagVoiceChat); - bool is_self = (mAvatarID == gAgent.getID()); LLUICtrl* mute_btn = getChild("mute_btn"); @@ -542,11 +541,9 @@ void LLInspectAvatar::updateVolumeSlider() mute_btn->setEnabled( !is_linden); mute_btn->setValue( is_muted ); - mute_btn->setVisible( voice_enabled && !is_self ); LLUICtrl* volume_slider = getChild("volume_slider"); volume_slider->setEnabled( !is_muted ); - volume_slider->setVisible( voice_enabled && !is_self ); const F32 DEFAULT_VOLUME = 0.5f; F32 volume; -- cgit v1.2.3