diff options
-rw-r--r-- | indra/newview/lloutfitgallery.cpp | 48 | ||||
-rw-r--r-- | indra/newview/lloutfitgallery.h | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_outfit_gallery_item.xml | 77 |
3 files changed, 72 insertions, 56 deletions
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp index 2d8085e128..ec86e608f2 100644 --- a/indra/newview/lloutfitgallery.cpp +++ b/indra/newview/lloutfitgallery.cpp @@ -327,7 +327,8 @@ static LLDefaultChildRegistry::Register<LLOutfitGalleryItem> r("outfit_gallery_i LLOutfitGalleryItem::LLOutfitGalleryItem(const Params& p) : LLPanel(p), - mTexturep(NULL) + mTexturep(NULL), + mSelected(false) { buildFromFile("panel_outfit_gallery_item.xml"); } @@ -343,6 +344,8 @@ BOOL LLOutfitGalleryItem::postBuild() mOutfitNameText = getChild<LLTextBox>("outfit_name"); mOutfitWornText = getChild<LLTextBox>("outfit_worn_text"); + mFotoBgPanel = getChild<LLPanel>("foto_bg_panel"); + mTextBgPanel = getChild<LLPanel>("text_bg_panel"); setOutfitWorn(false); return TRUE; } @@ -351,35 +354,32 @@ void LLOutfitGalleryItem::draw() { LLPanel::draw(); - // In case texture is not set, don't draw it over default image - if (!mTexturep) - { - return; - } - - // Border + + // Draw border + LLUIColor border_color = LLUIColorTable::instance().getColor(mSelected ? "FrogGreen" : "MouseGray", LLColor4::white); LLRect border = getChildView("preview_outfit")->getRect(); - //gl_rect_2d(border, LLColor4::black, FALSE); - - - // Interior - LLRect interior = border; - //interior.stretch(-1); + border.mRight = border.mRight + 1; + gl_rect_2d(border, border_color.get(), FALSE); // If the floater is focused, don't apply its alpha to the texture (STORM-677). const F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency(); if (mTexturep) { - if (mTexturep->getComponents() == 4) - { - gl_rect_2d_checkerboard(interior, alpha); - } + //if (mTexturep->getComponents() == 4) + //{ + // gl_rect_2d_checkerboard(interior, alpha); + //} - gl_draw_scaled_image(interior.mLeft, interior.mBottom, interior.getWidth(), interior.getHeight(), mTexturep, UI_VERTEX_COLOR % alpha); + // Interior + LLRect interior = border; + interior.stretch(-1); + + gl_draw_scaled_image(interior.mLeft - 1, interior.mBottom, interior.getWidth(), interior.getHeight(), mTexturep, UI_VERTEX_COLOR % alpha); // Pump the priority mTexturep->addTextureStats((F32)(interior.getWidth() * interior.getHeight())); } + } void LLOutfitGalleryItem::setOutfitName(std::string name) @@ -404,14 +404,8 @@ void LLOutfitGalleryItem::setOutfitWorn(bool value) void LLOutfitGalleryItem::setSelected(bool value) { - if (value) - { - mOutfitWornText->setValue("(selected)"); - } - else - { - mOutfitWornText->setValue(""); - } + mSelected = value; + mTextBgPanel->setBackgroundVisible(value); } BOOL LLOutfitGalleryItem::handleMouseDown(S32 x, S32 y, MASK mask) diff --git a/indra/newview/lloutfitgallery.h b/indra/newview/lloutfitgallery.h index 93b9ba1e3f..61a2981a29 100644 --- a/indra/newview/lloutfitgallery.h +++ b/indra/newview/lloutfitgallery.h @@ -147,6 +147,9 @@ private: LLPointer<LLViewerTexture> mTexturep; LLTextBox* mOutfitNameText; LLTextBox* mOutfitWornText; + LLPanel* mTextBgPanel; + LLPanel* mFotoBgPanel; + bool mSelected; }; #endif // LL_LLOUTFITGALLERYCTRL_H diff --git a/indra/newview/skins/default/xui/en/panel_outfit_gallery_item.xml b/indra/newview/skins/default/xui/en/panel_outfit_gallery_item.xml index acb72402cc..535960502e 100644 --- a/indra/newview/skins/default/xui/en/panel_outfit_gallery_item.xml +++ b/indra/newview/skins/default/xui/en/panel_outfit_gallery_item.xml @@ -1,49 +1,68 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel - background_visible="true" - bg_alpha_color="DkGray" - border="true" + background_visible="false" + background_opaque="false" + bg_alpha_color="FrogGreen" + bg_opaque_color="FrogGreen" + border_color="Red" + border="false" bevel_style="none" follows="left|top" height="169" - width="149" - name="Outfit Gallery Item" + width="150" + name="gallery_item_panel" layout="topleft" left="0" top="0" > <icon - left="0" + left="1" top="0" layout="topleft" name="preview_outfit" height="149" - width="149" + width="147" follows="left|top" visible="true" image_name="Popup_Caution" /> - <text - length="1" - follows="left|top" - left="1" - height="10" - layout="topleft" - name="outfit_name" - top="150" - width="150"> - Summer hipster, Pierce - </text> - <text - length="1" - follows="left|top" - left="1" - height="10" - layout="topleft" - name="outfit_worn_text" - top="160" - width="150"> - (worn) - </text> + <panel + background_visible="false" + background_opaque="true" + bg_opaque_color="FrogGreen" + border="false" + bevel_style="none" + follows="left|top" + left="0" + top="149" + height="25" + width="148" + name="text_bg_panel" + > + <text + read_only="true" + length="1" + follows="left|top" + left="1" + height="10" + layout="topleft" + name="outfit_name" + top="0" + width="150"> + Summer hipster, Pierce + </text> + <text + read_only="true" + length="1" + follows="left|top" + left="1" + height="10" + layout="topleft" + name="outfit_worn_text" + top="10" + width="150"> + (worn) + </text> + </panel> </panel> |