diff options
31 files changed, 621 insertions, 373 deletions
diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp index 22fad792da..a86bbbffff 100644 --- a/indra/llrender/llfontfreetype.cpp +++ b/indra/llrender/llfontfreetype.cpp @@ -270,6 +270,14 @@ F32 LLFontFreetype::getXAdvance(llwchar wch) const return (F32)mFontBitmapCachep->getMaxCharWidth(); } +F32 LLFontFreetype::getXAdvance(const LLFontGlyphInfo* glyph) const +{ + if (mFTFace == NULL) + return 0.0; + + return glyph->mXAdvance; +} + F32 LLFontFreetype::getXKerning(llwchar char_left, llwchar char_right) const { if (mFTFace == NULL) @@ -289,6 +297,21 @@ F32 LLFontFreetype::getXKerning(llwchar char_left, llwchar char_right) const return delta.x*(1.f/64.f); } +F32 LLFontFreetype::getXKerning(const LLFontGlyphInfo* left_glyph_info, const LLFontGlyphInfo* right_glyph_info) const +{ + if (mFTFace == NULL) + return 0.0; + + U32 left_glyph = left_glyph_info ? left_glyph_info->mGlyphIndex : 0; + U32 right_glyph = right_glyph_info ? right_glyph_info->mGlyphIndex : 0; + + FT_Vector delta; + + llverify(!FT_Get_Kerning(mFTFace, left_glyph, right_glyph, ft_kerning_unfitted, &delta)); + + return delta.x*(1.f/64.f); +} + BOOL LLFontFreetype::hasGlyph(llwchar wch) const { llassert(!mIsFallback); diff --git a/indra/llrender/llfontfreetype.h b/indra/llrender/llfontfreetype.h index 7a5d029038..f60d09316d 100644 --- a/indra/llrender/llfontfreetype.h +++ b/indra/llrender/llfontfreetype.h @@ -128,7 +128,9 @@ public: }; F32 getXAdvance(llwchar wc) const; + F32 getXAdvance(const LLFontGlyphInfo* glyph) const; F32 getXKerning(llwchar char_left, llwchar char_right) const; // Get the kerning between the two characters + F32 getXKerning(const LLFontGlyphInfo* left_glyph_info, const LLFontGlyphInfo* right_glyph_info) const; // Get the kerning between the two characters LLFontGlyphInfo* getGlyphInfo(llwchar wch) const; diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index b6a6b448ee..f1f86fd638 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -249,11 +249,18 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons // Remember last-used texture to avoid unnecesssary bind calls. LLImageGL *last_bound_texture = NULL; + const LLFontGlyphInfo* next_glyph = NULL; + for (i = begin_offset; i < begin_offset + length; i++) { llwchar wch = wstr[i]; - const LLFontGlyphInfo* fgi= mFontFreetype->getGlyphInfo(wch); + const LLFontGlyphInfo* fgi = next_glyph; + next_glyph = NULL; + if(!fgi) + { + fgi = mFontFreetype->getGlyphInfo(wch); + } if (!fgi) { llerrs << "Missing Glyph Info" << llendl; @@ -295,7 +302,8 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons if (next_char && (next_char < LAST_CHARACTER)) { // Kern this puppy. - cur_x += mFontFreetype->getXKerning(wch, next_char); + next_glyph = mFontFreetype->getGlyphInfo(next_char); + cur_x += mFontFreetype->getXKerning(fgi, next_glyph); } // Round after kerning. @@ -435,14 +443,21 @@ F32 LLFontGL::getWidthF32(const llwchar* wchars, S32 begin_offset, S32 max_chars F32 cur_x = 0; const S32 max_index = begin_offset + max_chars; + const LLFontGlyphInfo* next_glyph = NULL; + F32 width_padding = 0.f; for (S32 i = begin_offset; i < max_index && wchars[i] != 0; i++) { llwchar wch = wchars[i]; - const LLFontGlyphInfo* fgi= mFontFreetype->getGlyphInfo(wch); + const LLFontGlyphInfo* fgi = next_glyph; + next_glyph = NULL; + if(!fgi) + { + fgi = mFontFreetype->getGlyphInfo(wch); + } - F32 advance = mFontFreetype->getXAdvance(wch); + F32 advance = mFontFreetype->getXAdvance(fgi); // for the last character we want to measure the greater of its width and xadvance values // so keep track of the difference between these values for the each character we measure @@ -459,7 +474,8 @@ F32 LLFontGL::getWidthF32(const llwchar* wchars, S32 begin_offset, S32 max_chars && (next_char < LAST_CHARACTER)) { // Kern this puppy. - cur_x += mFontFreetype->getXKerning(wch, next_char); + next_glyph = mFontFreetype->getGlyphInfo(next_char); + cur_x += mFontFreetype->getXKerning(fgi, next_glyph); } // Round after kerning. cur_x = (F32)llround(cur_x); @@ -492,6 +508,8 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch // avoid S32 overflow when max_pixels == S32_MAX by staying in floating point F32 scaled_max_pixels = ceil(max_pixels * sScaleX); F32 width_padding = 0.f; + + LLFontGlyphInfo* next_glyph = NULL; S32 i; for (i=0; (i < max_chars); i++) @@ -534,8 +552,13 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch in_word = TRUE; } } - - LLFontGlyphInfo* fgi = mFontFreetype->getGlyphInfo(wch); + + LLFontGlyphInfo* fgi = next_glyph; + next_glyph = NULL; + if(!fgi) + { + fgi = mFontFreetype->getGlyphInfo(wch); + } // account for glyphs that run beyond the starting point for the next glyphs width_padding = llmax( 0.f, // always use positive padding amount @@ -554,7 +577,8 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch if (((i+1) < max_chars) && wchars[i+1]) { // Kern this puppy. - cur_x += mFontFreetype->getXKerning(wch, wchars[i+1]); + next_glyph = mFontFreetype->getGlyphInfo(wchars[i+1]); + cur_x += mFontFreetype->getXKerning(fgi, next_glyph); } // Round after kerning. @@ -660,6 +684,8 @@ S32 LLFontGL::charFromPixelOffset(const llwchar* wchars, S32 begin_offset, F32 t const S32 max_index = begin_offset + llmin(S32_MAX - begin_offset, max_chars); F32 scaled_max_pixels = max_pixels * sScaleX; + + const LLFontGlyphInfo* next_glyph = NULL; S32 pos; for (pos = begin_offset; pos < max_index; pos++) @@ -669,7 +695,15 @@ S32 LLFontGL::charFromPixelOffset(const llwchar* wchars, S32 begin_offset, F32 t { break; // done } - F32 char_width = mFontFreetype->getXAdvance(wch); + + const LLFontGlyphInfo* glyph = next_glyph; + next_glyph = NULL; + if(!glyph) + { + glyph = mFontFreetype->getGlyphInfo(wch); + } + + F32 char_width = mFontFreetype->getXAdvance(glyph); if (round) { @@ -695,11 +729,12 @@ S32 LLFontGL::charFromPixelOffset(const llwchar* wchars, S32 begin_offset, F32 t if (((pos + 1) < max_index) && (wchars[(pos + 1)])) { - llwchar next_char = wchars[pos + 1]; // Kern this puppy. - cur_x += mFontFreetype->getXKerning(wch, next_char); + next_glyph = mFontFreetype->getGlyphInfo(wchars[pos + 1]); + cur_x += mFontFreetype->getXKerning(glyph, next_glyph); } + // Round after kerning. cur_x = llround(cur_x); } diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 0199fe3f57..3e0c5ced1a 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -2387,10 +2387,17 @@ void LLFloaterView::adjustToFitScreen(LLFloater* floater, BOOL allow_partial_out LLRect new_rect; new_rect.setLeftTopAndSize(view_rect.mLeft,view_rect.mTop,new_width, new_height); - floater->reshape( new_width, new_height, TRUE ); - floater->setRect(new_rect); + floater->setShape(new_rect); - floater->translateIntoRect( getLocalRect(), false ); + if (floater->followsRight()) + { + floater->translate(old_width - new_width, 0); + } + + if (floater->followsTop()) + { + floater->translate(0, old_height - new_height); + } } } diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index ede32084d0..75342afbe2 100644 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -218,6 +218,86 @@ void LLKeywords::addToken(LLKeywordToken::TOKEN_TYPE type, llassert(0); } } +LLKeywords::WStringMapIndex::WStringMapIndex(const WStringMapIndex& other) +{ + if(other.mOwner) + { + copyData(other.mData, other.mLength); + } + else + { + mOwner = false; + mLength = other.mLength; + mData = other.mData; + } +} + +LLKeywords::WStringMapIndex::WStringMapIndex(const LLWString& str) +{ + copyData(str.data(), str.size()); +} + +LLKeywords::WStringMapIndex::WStringMapIndex(const llwchar *start, size_t length): +mData(start), mLength(length), mOwner(false) +{ +} + +LLKeywords::WStringMapIndex::~WStringMapIndex() +{ + if(mOwner) + delete[] mData; +} + +void LLKeywords::WStringMapIndex::copyData(const llwchar *start, size_t length) +{ + llwchar *data = new llwchar[length]; + memcpy((void*)data, (const void*)start, length * sizeof(llwchar)); + + mOwner = true; + mLength = length; + mData = data; +} + +bool LLKeywords::WStringMapIndex::operator<(const LLKeywords::WStringMapIndex &other) const +{ + // NOTE: Since this is only used to organize a std::map, it doesn't matter if it uses correct collate order or not. + // The comparison only needs to strictly order all possible strings, and be stable. + + bool result = false; + const llwchar* self_iter = mData; + const llwchar* self_end = mData + mLength; + const llwchar* other_iter = other.mData; + const llwchar* other_end = other.mData + other.mLength; + + while(true) + { + if(other_iter >= other_end) + { + // We've hit the end of other. + // This covers two cases: other being shorter than self, or the strings being equal. + // In either case, we want to return false. + result = false; + break; + } + else if(self_iter >= self_end) + { + // self is shorter than other. + result = true; + break; + } + else if(*self_iter != *other_iter) + { + // The current character differs. The strings are not equal. + result = *self_iter < *other_iter; + break; + } + + self_iter++; + other_iter++; + } + + return result; +} LLColor3 LLKeywords::readColor( const std::string& s ) { @@ -429,7 +509,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW S32 seg_len = p - cur; if( seg_len > 0 ) { - LLWString word( cur, 0, seg_len ); + WStringMapIndex word( cur, seg_len ); word_token_map_t::iterator map_iter = mWordTokenMap.find(word); if( map_iter != mWordTokenMap.end() ) { diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h index 53377869ca..e5b66dfa56 100644 --- a/indra/llui/llkeywords.h +++ b/indra/llui/llkeywords.h @@ -92,8 +92,33 @@ public: const std::string& key, const LLColor3& color, const std::string& tool_tip = LLStringUtil::null); - - typedef std::map<LLWString, LLKeywordToken*> word_token_map_t; + + // This class is here as a performance optimization. + // The word token map used to be defined as std::map<LLWString, LLKeywordToken*>. + // This worked, but caused a performance bottleneck due to memory allocation and string copies + // because it's not possible to search such a map without creating an LLWString. + // Using this class as the map index instead allows us to search using segments of an existing + // text run without copying them first, which greatly reduces overhead in LLKeywords::findSegments(). + class WStringMapIndex + { + public: + // copy constructor + WStringMapIndex(const WStringMapIndex& other); + // constructor from a string (copies the string's data into the new object) + WStringMapIndex(const LLWString& str); + // constructor from pointer and length + // NOTE: does NOT copy data, caller must ensure that the lifetime of the pointer exceeds that of the new object! + WStringMapIndex(const llwchar *start, size_t length); + ~WStringMapIndex(); + bool operator<(const WStringMapIndex &other) const; + private: + void copyData(const llwchar *start, size_t length); + const llwchar *mData; + size_t mLength; + bool mOwner; + }; + + typedef std::map<WStringMapIndex, LLKeywordToken*> word_token_map_t; typedef word_token_map_t::const_iterator keyword_iterator_t; keyword_iterator_t begin() const { return mWordTokenMap.begin(); } keyword_iterator_t end() const { return mWordTokenMap.end(); } diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index d18abbfb2f..0d56c5ed31 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -657,11 +657,38 @@ LLMenuItemVerticalSeparatorGL::LLMenuItemVerticalSeparatorGL( void ) // Class LLMenuItemTearOffGL //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LLMenuItemTearOffGL::LLMenuItemTearOffGL(const LLMenuItemTearOffGL::Params& p) -: LLMenuItemGL(p), - mParentHandle(p.parent_floater_handle) +: LLMenuItemGL(p) { } +// Returns the first floater ancestor if there is one +LLFloater* LLMenuItemTearOffGL::getParentFloater() +{ + LLView* parent_view = getMenu(); + + while (parent_view) + { + if (dynamic_cast<LLFloater*>(parent_view)) + { + return dynamic_cast<LLFloater*>(parent_view); + } + + bool parent_is_menu = dynamic_cast<LLMenuGL*>(parent_view) && !dynamic_cast<LLMenuBarGL*>(parent_view); + + if (parent_is_menu) + { + // use menu parent + parent_view = dynamic_cast<LLMenuGL*>(parent_view)->getParentMenuItem(); + } + else + { + // just use regular view parent + parent_view = parent_view->getParent(); + } + } + + return NULL; +} void LLMenuItemTearOffGL::onCommit() { @@ -680,7 +707,7 @@ void LLMenuItemTearOffGL::onCommit() getMenu()->needsArrange(); - LLFloater* parent_floater = mParentHandle.get(); + LLFloater* parent_floater = getParentFloater(); LLFloater* tear_off_menu = LLTearOffMenu::create(getMenu()); if (tear_off_menu) @@ -1671,7 +1698,6 @@ LLMenuGL::LLMenuGL(const LLMenuGL::Params& p) mSpilloverMenu(NULL), mJumpKey(p.jump_key), mCreateJumpKeys(p.create_jump_keys), - mParentFloaterHandle(p.parent_floater), mNeedsArrange(FALSE), mShortcutPad(p.shortcut_pad) { @@ -1699,7 +1725,7 @@ LLMenuGL::LLMenuGL(const LLMenuGL::Params& p) void LLMenuGL::initFromParams(const LLMenuGL::Params& p) { LLUICtrl::initFromParams(p); - setCanTearOff(p.can_tear_off, p.parent_floater); + setCanTearOff(p.can_tear_off); } // Destroys the object @@ -1711,12 +1737,11 @@ LLMenuGL::~LLMenuGL( void ) mJumpKeys.clear(); } -void LLMenuGL::setCanTearOff(BOOL tear_off, LLHandle<LLFloater> parent_floater_handle ) +void LLMenuGL::setCanTearOff(BOOL tear_off) { if (tear_off && mTearOffItem == NULL) { LLMenuItemTearOffGL::Params p; - p.parent_floater_handle = parent_floater_handle; mTearOffItem = LLUICtrlFactory::create<LLMenuItemTearOffGL>(p); addChildInBack(mTearOffItem); } @@ -2233,7 +2258,6 @@ void LLMenuGL::createSpilloverBranch() LLMenuGL::Params p; p.name("More"); p.label("More"); // *TODO: Translate - p.parent_floater(mParentFloaterHandle); p.bg_color(mBackgroundColor); p.bg_visible(true); p.can_tear_off(false); diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index 8441aaadd4..39d1986461 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -355,7 +355,6 @@ class LLMenuGL public: struct Params : public LLInitParam::Block<Params, LLUICtrl::Params> { - Optional<LLHandle<LLFloater> > parent_floater; Optional<KEY> jump_key; Optional<bool> horizontal_layout, can_tear_off, @@ -430,7 +429,7 @@ public: void setBackgroundColor( const LLUIColor& color ) { mBackgroundColor = color; } const LLUIColor& getBackgroundColor() const { return mBackgroundColor; } void setBackgroundVisible( BOOL b ) { mBgVisible = b; } - void setCanTearOff(BOOL tear_off, LLHandle<LLFloater> parent_floater_handle = LLHandle<LLFloater>()); + void setCanTearOff(BOOL tear_off); // add a separator to this menu virtual BOOL addSeparator(); @@ -553,7 +552,6 @@ private: class LLMenuItemTearOffGL* mTearOffItem; class LLMenuItemBranchGL* mSpilloverBranch; LLMenuGL* mSpilloverMenu; - LLHandle<LLFloater> mParentFloaterHandle; KEY mJumpKey; BOOL mCreateJumpKeys; S32 mShortcutPad; @@ -814,7 +812,6 @@ class LLMenuItemTearOffGL : public LLMenuItemGL public: struct Params : public LLInitParam::Block<Params, LLMenuItemGL::Params> { - Optional<LLHandle<LLFloater> > parent_floater_handle; Params() { name = "tear off"; @@ -823,13 +820,12 @@ public: }; LLMenuItemTearOffGL( const Params& ); - + virtual void onCommit(void); virtual void draw(void); virtual U32 getNominalHeight() const; -private: - LLHandle<LLFloater> mParentHandle; + LLFloater* getParentFloater(); }; diff --git a/indra/llui/llresizehandle.cpp b/indra/llui/llresizehandle.cpp index 3df09d124a..00214d451c 100644 --- a/indra/llui/llresizehandle.cpp +++ b/indra/llui/llresizehandle.cpp @@ -124,7 +124,7 @@ BOOL LLResizeHandle::handleHover(S32 x, S32 y, MASK mask) { // Make sure the mouse in still over the application. We don't want to make the parent // so big that we can't see the resize handle any more. - + S32 screen_x; S32 screen_y; localPointToScreen(x, y, &screen_x, &screen_y); @@ -136,9 +136,10 @@ BOOL LLResizeHandle::handleHover(S32 x, S32 y, MASK mask) if( resizing_view ) { // undock floater when user resize it - if (((LLFloater*)getParent())->isDocked()) + LLFloater* floater_parent = dynamic_cast<LLFloater*>(getParent()); + if (floater_parent && floater_parent->isDocked()) { - ((LLFloater*)getParent())->setDocked(false, false); + floater_parent->setDocked(false, false); } // Resize the parent @@ -146,61 +147,68 @@ BOOL LLResizeHandle::handleHover(S32 x, S32 y, MASK mask) LLRect scaled_rect = orig_rect; S32 delta_x = screen_x - mDragLastScreenX; S32 delta_y = screen_y - mDragLastScreenY; - - if(delta_x == 0 && delta_y == 0) - return FALSE; - LLCoordGL mouse_dir; // use hysteresis on mouse motion to preserve user intent when mouse stops moving mouse_dir.mX = (screen_x == mLastMouseScreenX) ? mLastMouseDir.mX : screen_x - mLastMouseScreenX; mouse_dir.mY = (screen_y == mLastMouseScreenY) ? mLastMouseDir.mY : screen_y - mLastMouseScreenY; - mLastMouseScreenX = screen_x; mLastMouseScreenY = screen_y; mLastMouseDir = mouse_dir; - S32 new_width = orig_rect.getWidth(); - S32 new_height = orig_rect.getHeight(); + S32 x_multiple = 1; + S32 y_multiple = 1; + switch( mCorner ) + { + case LEFT_TOP: + x_multiple = -1; + y_multiple = 1; + break; + case LEFT_BOTTOM: + x_multiple = -1; + y_multiple = -1; + break; + case RIGHT_TOP: + x_multiple = 1; + y_multiple = 1; + break; + case RIGHT_BOTTOM: + x_multiple = 1; + y_multiple = -1; + break; + } - S32 new_pos_x = orig_rect.mLeft; - S32 new_pos_y = orig_rect.mTop; + S32 new_width = orig_rect.getWidth() + x_multiple * delta_x; + if( new_width < mMinWidth ) + { + new_width = mMinWidth; + delta_x = x_multiple * (mMinWidth - orig_rect.getWidth()); + } + + S32 new_height = orig_rect.getHeight() + y_multiple * delta_y; + if( new_height < mMinHeight ) + { + new_height = mMinHeight; + delta_y = y_multiple * (mMinHeight - orig_rect.getHeight()); + } switch( mCorner ) { - case LEFT_TOP: - new_width-=delta_x; - new_height+=delta_y; - new_pos_x+=delta_x; - new_pos_y+=delta_y; + case LEFT_TOP: + scaled_rect.translate(delta_x, 0); break; case LEFT_BOTTOM: - new_width-=delta_x; - new_height-=delta_y; - new_pos_x+=delta_x; + scaled_rect.translate(delta_x, delta_y); break; case RIGHT_TOP: - new_width+=delta_x; - new_height+=delta_y; - new_pos_y+=delta_y; break; case RIGHT_BOTTOM: - new_width+=delta_x; - new_height-=delta_y; + scaled_rect.translate(0, delta_y); break; } - new_width = llmax(new_width,mMinWidth); - new_height = llmax(new_height,mMinHeight); - - LLRect::tCoordType screen_width = resizing_view->getParent()->getSnapRect().getWidth(); - LLRect::tCoordType screen_height = resizing_view->getParent()->getSnapRect().getHeight(); - - new_width = llmin(new_width, screen_width); - new_height = llmin(new_height, screen_height); - // temporarily set new parent rect - scaled_rect.setLeftTopAndSize(new_pos_x,new_pos_y,new_width,new_height); - + scaled_rect.mRight = scaled_rect.mLeft + new_width; + scaled_rect.mTop = scaled_rect.mBottom + new_height; resizing_view->setRect(scaled_rect); LLView* snap_view = NULL; @@ -251,11 +259,7 @@ BOOL LLResizeHandle::handleHover(S32 x, S32 y, MASK mask) resizing_view->setRect(orig_rect); // translate and scale to new shape - resizing_view->reshape(scaled_rect.getWidth(),scaled_rect.getHeight()); - resizing_view->setRect(scaled_rect); - //set shape to handle dependent floaters... - resizing_view->handleReshape(scaled_rect, false); - + resizing_view->setShape(scaled_rect, true); // update last valid mouse cursor position based on resized view's actual size LLRect new_rect = resizing_view->getRect(); diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index b84e6f45fb..851fb966ec 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1445,10 +1445,10 @@ LLTextBase::segment_set_t::const_iterator LLTextBase::getSegIterContaining(S32 i } // Finds the text segment (if any) at the give local screen position -LLTextSegmentPtr LLTextBase::getSegmentAtLocalPos( S32 x, S32 y ) +LLTextSegmentPtr LLTextBase::getSegmentAtLocalPos( S32 x, S32 y, bool hit_past_end_of_line) { // Find the cursor position at the requested local screen position - S32 offset = getDocIndexFromLocalCoord( x, y, FALSE ); + S32 offset = getDocIndexFromLocalCoord( x, y, FALSE, hit_past_end_of_line); segment_set_t::iterator seg_iter = getSegIterContaining(offset); if (seg_iter != mSegments.end()) { @@ -1788,7 +1788,7 @@ const LLWString& LLTextBase::getWText() const // will be put to its right. If round is false, the cursor will always be put to the // character's left. -S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round ) const +S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round, bool hit_past_end_of_line) const { // Figure out which line we're nearest to. LLRect visible_region = getVisibleDocumentRect(); @@ -1817,7 +1817,7 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round S32 text_width, text_height; segmentp->getDimensions(line_seg_offset, segment_line_length, text_width, text_height); if (local_x < start_x + text_width // cursor to left of right edge of text - || segmentp->getEnd() >= line_iter->mDocIndexEnd - 1) // or this segment wraps to next line + || (hit_past_end_of_line && (segmentp->getEnd() >= line_iter->mDocIndexEnd - 1))) // or this segment wraps to next line { // Figure out which character we're nearest to. S32 offset; @@ -2402,8 +2402,12 @@ BOOL LLNormalTextSegment::handleHover(S32 x, S32 y, MASK mask) { if (getStyle() && getStyle()->isLink()) { - LLUI::getWindow()->setCursor(UI_CURSOR_HAND); - return TRUE; + // Only process the click if it's actually in this segment, not to the right of the end-of-line. + if(mEditor.getSegmentAtLocalPos(x, y, false) == this) + { + LLUI::getWindow()->setCursor(UI_CURSOR_HAND); + return TRUE; + } } return FALSE; } @@ -2412,8 +2416,12 @@ BOOL LLNormalTextSegment::handleRightMouseDown(S32 x, S32 y, MASK mask) { if (getStyle() && getStyle()->isLink()) { - mEditor.createUrlContextMenu(x, y, getStyle()->getLinkHREF()); - return TRUE; + // Only process the click if it's actually in this segment, not to the right of the end-of-line. + if(mEditor.getSegmentAtLocalPos(x, y, false) == this) + { + mEditor.createUrlContextMenu(x, y, getStyle()->getLinkHREF()); + return TRUE; + } } return FALSE; } @@ -2422,8 +2430,12 @@ BOOL LLNormalTextSegment::handleMouseDown(S32 x, S32 y, MASK mask) { if (getStyle() && getStyle()->isLink()) { - // eat mouse down event on hyperlinks, so we get the mouse up - return TRUE; + // Only process the click if it's actually in this segment, not to the right of the end-of-line. + if(mEditor.getSegmentAtLocalPos(x, y, false) == this) + { + // eat mouse down event on hyperlinks, so we get the mouse up + return TRUE; + } } return FALSE; @@ -2433,8 +2445,12 @@ BOOL LLNormalTextSegment::handleMouseUp(S32 x, S32 y, MASK mask) { if (getStyle() && getStyle()->isLink()) { - LLUrlAction::clickAction(getStyle()->getLinkHREF()); - return TRUE; + // Only process the click if it's actually in this segment, not to the right of the end-of-line. + if(mEditor.getSegmentAtLocalPos(x, y, false) == this) + { + LLUrlAction::clickAction(getStyle()->getLinkHREF()); + return TRUE; + } } return FALSE; diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 3dda6f4cc8..5b24c63557 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -48,6 +48,7 @@ class LLContextMenu; class LLTextSegment; +class LLNormalTextSegment; typedef LLPointer<LLTextSegment> LLTextSegmentPtr; @@ -61,6 +62,9 @@ class LLTextBase protected LLEditMenuHandler { public: + friend class LLTextSegment; + friend class LLNormalTextSegment; + struct LineSpacingParams : public LLInitParam::Choice<LineSpacingParams> { Alternative<F32> multiple; @@ -165,7 +169,7 @@ public: S32 getVPad() { return mVPad; } S32 getHPad() { return mHPad; } - S32 getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round ) const; + S32 getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round, bool hit_past_end_of_line = true) const; LLRect getLocalRectFromDocIndex(S32 pos) const; LLRect getDocRectFromDocIndex(S32 pos) const; @@ -275,7 +279,7 @@ protected: // manage segments void getSegmentAndOffset( S32 startpos, segment_set_t::const_iterator* seg_iter, S32* offsetp ) const; void getSegmentAndOffset( S32 startpos, segment_set_t::iterator* seg_iter, S32* offsetp ); - LLTextSegmentPtr getSegmentAtLocalPos( S32 x, S32 y ); + LLTextSegmentPtr getSegmentAtLocalPos( S32 x, S32 y, bool hit_past_end_of_line = true); segment_set_t::iterator getSegIterContaining(S32 index); segment_set_t::const_iterator getSegIterContaining(S32 index) const; void clearSegments(); diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index c9082da9a9..92031be8c5 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -350,7 +350,7 @@ void LLBottomTray::setVisible(BOOL visible) { mBottomTrayLite->setVisible(visible); } - else + else { LLPanel::setVisible(visible); } diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index d38dd0f870..8ad5389566 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -38,6 +38,7 @@ #include "llcheckboxctrl.h" #include "llcombobox.h" #include "llresizebar.h" +#include "llresizehandle.h" #include "llscrolllistctrl.h" #include "llscrolllistitem.h" #include "llscrolllistcell.h" @@ -116,6 +117,20 @@ BOOL LLPanelNearByMedia::postBuild() p.resizing_view = this; addChild( LLUICtrlFactory::create<LLResizeBar>(p) ); + p.rect = LLRect( 0, getRect().getHeight(), RESIZE_BAR_THICKNESS, 0); + p.name = "resizebar_left"; + p.min_size = getRect().getWidth(); + p.side = LLResizeBar::LEFT; + addChild( LLUICtrlFactory::create<LLResizeBar>(p) ); + + LLResizeHandle::Params resize_handle_p; + resize_handle_p.rect = LLRect( 0, RESIZE_HANDLE_HEIGHT, RESIZE_HANDLE_WIDTH, 0 ); + resize_handle_p.mouse_opaque(false); + resize_handle_p.min_width(getRect().getWidth()); + resize_handle_p.min_height(getRect().getHeight()); + resize_handle_p.corner(LLResizeHandle::LEFT_BOTTOM); + addChild(LLUICtrlFactory::create<LLResizeHandle>(resize_handle_p)); + mNearbyMediaPanel = getChild<LLUICtrl>("nearby_media_panel"); mMediaList = getChild<LLScrollListCtrl>("media_list"); mEnableAllCtrl = getChild<LLUICtrl>("all_nearby_media_enable_btn"); @@ -148,8 +163,10 @@ BOOL LLPanelNearByMedia::postBuild() updateColumns(); LLView* minimized_controls = getChildView("minimized_controls"); - mMoreHeight = getRect().getHeight(); - mLessHeight = getRect().getHeight() - minimized_controls->getRect().mBottom; + mMoreRect = getRect(); + mLessRect = getRect(); + mLessRect.mBottom = minimized_controls->getRect().mBottom; + getChild<LLUICtrl>("more_less_btn")->setValue(false); onMoreLess(); @@ -207,7 +224,7 @@ void LLPanelNearByMedia::reshape(S32 width, S32 height, BOOL called_from_parent) LLButton* more_less_btn = getChild<LLButton>("more_less_btn"); if (more_less_btn->getValue().asBoolean()) { - mMoreHeight = getRect().getHeight(); + mMoreRect = getRect(); } } @@ -928,10 +945,8 @@ void LLPanelNearByMedia::onMoreLess() // enable resizing when expanded getChildView("resizebar_bottom")->setEnabled(is_more); - S32 new_height = is_more ? mMoreHeight : mLessHeight; - - LLRect new_rect = getRect(); - new_rect.mBottom = new_rect.mTop - new_height; + LLRect new_rect = is_more ? mMoreRect : mLessRect; + new_rect.translate(getRect().mRight - new_rect.mRight, getRect().mTop - new_rect.mTop); setShape(new_rect); } diff --git a/indra/newview/llpanelnearbymedia.h b/indra/newview/llpanelnearbymedia.h index eedfd447de..6fe724266b 100644 --- a/indra/newview/llpanelnearbymedia.h +++ b/indra/newview/llpanelnearbymedia.h @@ -174,11 +174,11 @@ private: std::string mParcelMediaName; std::string mParcelAudioName; - S32 mMoreHeight; - S32 mLessHeight; - LLFrameTimer mHoverTimer; - LLScrollListItem* mParcelMediaItem; - LLScrollListItem* mParcelAudioItem; + LLRect mMoreRect; + LLRect mLessRect; + LLFrameTimer mHoverTimer; + LLScrollListItem* mParcelMediaItem; + LLScrollListItem* mParcelAudioItem; }; diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 642f672faf..395467dffb 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1318,6 +1318,9 @@ void LLViewerMediaImpl::loadURI() { if(mMediaSource) { + // trim whitespace from front and back of URL - fixes EXT-5363 + LLStringUtil::trim( mMediaURL ); + // *HACK: we don't know if the URI coming in is properly escaped // (the contract doesn't specify whether it is escaped or not. // but LLQtWebKit expects it to be, so we do our best to encode diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index 53ca0005a5..4c5d5a1b96 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -47,7 +47,7 @@ min_height="23" width="310" top="4" - min_width="220" + min_width="216" name="chat_bar" user_resize="false" filename="panel_nearby_chat_bar.xml" /> diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml index 5373699c02..b196d8eeb7 100644 --- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml +++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml @@ -56,7 +56,7 @@ background_visible="true" use_ellipses="true" width="275" follows="top|left|right" - word_wrap="true" + word_wrap="false" mouse_opaque="false"/> <line_editor follows="left|top" diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml index 6927906d3d..66070c028d 100644 --- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml @@ -8,7 +8,7 @@ min_height="350" name="landmark_info" top="20" - width="330"> + width="333"> <string name="title_create_landmark" value="Create Landmark" /> @@ -58,11 +58,11 @@ height="23" image_overlay="BackArrow_Off" layout="topleft" - left="10" + left="11" name="back_btn" tool_tip="Back" tab_stop="false" - top="0" + top="4" width="23" /> <text follows="top|left|right" @@ -72,36 +72,36 @@ left_pad="10" name="title" text_color="LtGray" - top="0" + top="2" use_ellipses="true" value="Place Profile" - width="275" /> + width="280" /> <scroll_container color="DkGray2" follows="all" - height="533" + height="532" layout="topleft" - left="10" + left="9" name="place_scroll" opaque="true" - top_pad="5" - width="313"> + top_pad="10" + width="310"> <panel bg_alpha_color="DkGray2" follows="left|top|right" - height="610" + height="700" layout="topleft" left="0" min_height="300" name="scrolling_panel" top="0" - width="313"> + width="285"> <texture_picker enabled="false" - follows="top|left" - height="190" + follows="left|top|right" + height="197" layout="topleft" - left="10" + left="11" name="logo" top="10" width="290" /> @@ -113,29 +113,29 @@ left="10" name="region_title" text_color="white" - top_pad="5" + top_pad="10" use_ellipses="true" value="SampleRegion" - width="290" /> + width="280" /> <text follows="left|top|right" height="14" layout="topleft" left="10" name="parcel_title" - top_pad="4" + top_pad="10" use_ellipses="true" value="SampleParcel, Name Long (145, 228, 26)" - width="285" /> + width="280" /> <expandable_text follows="left|top|right" height="50" layout="topleft" - left="5" + left="10" name="description" top_pad="10" value="Du waltz die spritz" - width="300" /> + width="280" /> <icon follows="top|left" height="16" @@ -149,9 +149,9 @@ follows="left|top|right" height="16" layout="topleft" - left_pad="8" + left_pad="5" name="maturity_value" - top_delta="0" + top_pad="-13" value="unknown" width="268" /> <panel @@ -284,7 +284,7 @@ width="290" /> <combo_box follows="bottom|left|right" - height="20" + height="23" layout="topleft" left="0" name="folder_combo" diff --git a/indra/newview/skins/default/xui/en/panel_landmarks.xml b/indra/newview/skins/default/xui/en/panel_landmarks.xml index e7104fd34e..fdc26b5c46 100644 --- a/indra/newview/skins/default/xui/en/panel_landmarks.xml +++ b/indra/newview/skins/default/xui/en/panel_landmarks.xml @@ -17,7 +17,7 @@ layout="topleft" left="0" name="landmarks_accordion" - top="2" + top="0" width="380"> <accordion_tab layout="topleft" @@ -107,7 +107,7 @@ layout="topleft" left="10" name="options_gear_btn" - top="10" + top="14" width="18" /> <button follows="bottom|left" @@ -126,10 +126,10 @@ image_selected="TrashItem_Press" image_unselected="TrashItem_Off" layout="topleft" - right="-10" + right="-8" name="trash_btn" tool_tip="Remove selected landmark" - top="10" + top="14" width="18" /> </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml index c6a4233c9c..e6f67078d1 100644 --- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml @@ -2,7 +2,7 @@ <panel background_visible="true" follows="all" - height="400" + height="408" label="Things" layout="topleft" min_height="350" @@ -13,102 +13,6 @@ name="Title"> Things </panel.string> - <filter_editor - text_pad_left="14" - follows="left|top|right" - height="23" - label="Filter Inventory" - layout="topleft" - left="15" -max_length="300" - name="inventory search editor" - top="26" - width="303" /> - <tab_container -follows="all" -halign="center" - height="300" - layout="topleft" - left_delta="-4" - name="inventory filter tabs" - tab_height="30" - tab_position="top" - tab_min_width="100" - top_pad="4" - width="305"> - <inventory_panel - border="false" - follows="all" - height="295" - label="MY INVENTORY" - help_topic="my_inventory_tab" - layout="topleft" - left="0" - name="All Items" - top="16" - width="290" /> - <inventory_panel - border="false" - follows="all" - height="295" - label="RECENT" - help_topic="recent_inventory_tab" - layout="topleft" - left_delta="0" - name="Recent Items" - width="290" /> - </tab_container> - - <panel - background_visible="true" - bevel_style="none" - bottom="0" - follows="left|right|bottom" - height="30" - layout="bottomleft" - left="0" - visible="true" - name="bottom_panel" - width="330"> - <button - follows="bottom|left" - tool_tip="Show additional options" - height="18" - image_disabled="OptionsMenu_Disabled" - image_selected="OptionsMenu_Press" - image_unselected="OptionsMenu_Off" - layout="topleft" - left="10" - name="options_gear_btn" - picture_style="true" - top="6" - width="18" /> - <button - follows="bottom|left" - height="18" - image_selected="AddItem_Press" - image_unselected="AddItem_Off" - image_disabled="AddItem_Disabled" - layout="topleft" - left_pad="5" - name="add_btn" - picture_style="true" - tool_tip="Add new item" - width="18" /> - <dnd_button - follows="bottom|right" - height="18" - image_selected="TrashItem_Press" - image_unselected="TrashItem_Off" - layout="topleft" - right="-5" - name="trash_btn" - picture_style="true" - tool_tip="Remove selected item" - top="6" - width="18" /> - </panel> - <menu_bar bg_visible="false" follows="left|top|right" @@ -470,4 +374,114 @@ halign="center" </menu_item_check> </menu> </menu_bar> + <filter_editor + text_pad_left="10" + follows="left|top|right" + height="23" + label="Filter Inventory" + layout="topleft" + left="10" +max_length="300" + name="inventory search editor" + top="26" + width="303" /> + <tab_container + bg_opaque_color="DkGray2" + bg_alpha_color="DkGray2" + background_visible="true" + background_opaque="true" +follows="all" +halign="center" + height="305" + layout="topleft" + left="6" + name="inventory filter tabs" + tab_height="30" + tab_position="top" + tab_min_width="100" + top_pad="10" + width="315"> + <inventory_panel + bg_opaque_color="DkGray2" + bg_alpha_color="DkGray2" + background_visible="true" + background_opaque="true" + border="false" + bevel_style="none" + follows="all" + height="295" + label="MY INVENTORY" + help_topic="my_inventory_tab" + layout="topleft" + left="0" + name="All Items" + top="16" + width="290" /> + <inventory_panel + bg_opaque_color="DkGray2" + bg_alpha_color="DkGray2" + background_visible="true" + background_opaque="true" + border="false" + bevel_style="none" + follows="all" + height="295" + label="RECENT" + help_topic="recent_inventory_tab" + layout="topleft" + left_delta="0" + name="Recent Items" + width="290" /> + </tab_container> + + <panel + bg_opaque_color="DkGray2" + bg_alpha_color="DkGray2" + background_visible="true" + background_opaque="true" + bevel_style="none" + follows="left|right|bottom" + height="38" + layout="topleft" + top_pad="-1" + left="9" + name="bottom_panel" + width="310"> + <button + follows="bottom|left" + tool_tip="Show additional options" + height="18" + image_disabled="OptionsMenu_Disabled" + image_selected="OptionsMenu_Press" + image_unselected="OptionsMenu_Off" + layout="topleft" + left="8" + name="options_gear_btn" + top="14" + width="18" /> + <button + follows="bottom|left" + height="18" + image_selected="AddItem_Press" + image_unselected="AddItem_Off" + image_disabled="AddItem_Disabled" + layout="topleft" + left_pad="10" + name="add_btn" + tool_tip="Add new item" + width="18" /> + <dnd_button + follows="bottom|right" + height="18" + image_selected="TrashItem_Press" + image_unselected="TrashItem_Off" + layout="topleft" + right="-7" + name="trash_btn" + tool_tip="Remove selected item" + top="14" + width="18" /> + </panel> + + </panel> diff --git a/indra/newview/skins/default/xui/en/panel_nearby_media.xml b/indra/newview/skins/default/xui/en/panel_nearby_media.xml index acfd63db37..0f911f789e 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_media.xml @@ -2,7 +2,9 @@ <panel can_resize="true" can_close="false" - background_opaque="true" + bg_opaque_image="Volume_Background" + bg_alpha_image="Volume_Background" + background_opaque="true" background_visible="true" layout="topleft" width="270" @@ -16,9 +18,7 @@ <string name="playing_suffix">(playing)</string> <panel bevel_style="in" - bg_alpha_color="0 0 0 0" - bg_opaque_color="0 0 0 0.3" - bg_opaque_image="Toast_Background" + background_visible="false" follows="left|right|top" top="0" height="30" @@ -188,9 +188,7 @@ </scroll_list> <panel bevel_style="in" - background_visible="true" - bg_alpha_color="0.0 0.0 0.0 1.0" - bg_opaque_color="0 0 0 0.3" + background_visible="false" follows="left|right|bottom" top_pad="5" height="30" diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml index 710ca733e0..86eaa79587 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml @@ -11,15 +11,15 @@ border="false"> <tab_container follows="all" - height="500" + height="490" layout="topleft" - left="10" + left="6" name="appearance_tabs" tab_min_width="140" tab_height="30" tab_position="top" halign="center" - width="313"> + width="315"> <inventory_panel background_visible="true" background_opaque="true" @@ -49,39 +49,51 @@ start_folder="Current Outfit" width="313" /> </tab_container> + <panel + bg_opaque_color="DkGray2" + bg_alpha_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="left|right|bottom" + height="38" + layout="topleft" + left="9" + visible="true" + top_pad="-1" + width="310" /> <panel - background_visible="true" + background_visible="false" follows="bottom|left" height="50" layout="topleft" - left="0" + left="9" visible="true" name="bottom_panel" - top_pad="10" - width="313"> - <button - follows="bottom|left" - tool_tip="Show additional options" - height="18" - image_disabled="OptionsMenu_Disabled" - image_selected="OptionsMenu_Press" - image_unselected="OptionsMenu_Off" - layout="topleft" - left="10" - name="options_gear_btn" - top="6" - width="18" /> - <dnd_button - follows="bottom|left" - height="18" - image_selected="TrashItem_Press" - image_unselected="TrashItem_Off" - layout="topleft" - right="-5" - name="trash_btn" - tool_tip="Remove selected item" - top="6" - width="18" /> + top_pad="-38" + width="310"> + <button + follows="bottom|left" + tool_tip="Show additional options" + height="18" + image_disabled="OptionsMenu_Disabled" + image_selected="OptionsMenu_Press" + image_unselected="OptionsMenu_Off" + layout="topleft" + left="8" + name="options_gear_btn" + top="14" + width="18" /> + <dnd_button + follows="bottom|right" + height="18" + image_selected="TrashItem_Press" + image_unselected="TrashItem_Off" + layout="topleft" + right="-9" + name="trash_btn" + tool_tip="Remove selected item" + top="14" + width="18" /> <button follows="bottom|left" height="23" @@ -89,20 +101,19 @@ layout="topleft" name="make_outfit_btn" tool_tip="Save appearance as an outfit" - top="26" - left='10' - width="120" /> + top="43" + left="0" + width="153" /> <button follows="bottom|right" height="23" label="Wear" layout="topleft" name="wear_btn" - right="-10" - left_pad="10" - top="26" + left_pad="3" + top="43" tool_tip="Wear selected outfit" - width="120" /> + width="152" /> <button follows="bottom|left" height="23" @@ -114,4 +125,5 @@ visible="false" width="20" /> </panel> + </panel> diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 752bccc351..daab52f06a 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -29,6 +29,7 @@ name="groups_filter_label" value="Filter Groups" /> <filter_editor + text_pad_left="10" follows="left|top|right" height="23" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_picks.xml b/indra/newview/skins/default/xui/en/panel_picks.xml index 54a5db9b16..0093a08e15 100644 --- a/indra/newview/skins/default/xui/en/panel_picks.xml +++ b/indra/newview/skins/default/xui/en/panel_picks.xml @@ -4,7 +4,7 @@ bg_opaque_color="DkGray2" background_visible="true" background_opaque="true" follows="all" - height="547" + height="548" label="Picks" layout="topleft" left="0" diff --git a/indra/newview/skins/default/xui/en/panel_place_profile.xml b/indra/newview/skins/default/xui/en/panel_place_profile.xml index 94c9b2de01..b22dad5841 100644 --- a/indra/newview/skins/default/xui/en/panel_place_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml @@ -8,7 +8,7 @@ min_height="350" name="place_profile" top="20" - width="330"> + width="333"> <string name="on" value="On" /> @@ -143,11 +143,11 @@ height="23" image_overlay="BackArrow_Off" layout="topleft" - left="10" + left="11" name="back_btn" tool_tip="Back" tab_stop="false" - top="0" + top="4" width="23" /> <text follows="top|left|right" @@ -157,36 +157,36 @@ left_pad="10" name="title" text_color="LtGray" - top="0" + top="2" use_ellipses="true" value="Place Profile" - width="275" /> + width="280" /> <scroll_container color="DkGray2" follows="all" - height="533" + height="532" layout="topleft" - left="10" + left="9" name="place_scroll" opaque="true" - top_pad="5" - width="313"> + top_pad="10" + width="310"> <panel bg_alpha_color="DkGray2" follows="left|top|right" - height="533" + height="700" layout="topleft" left="0" min_height="300" name="scrolling_panel" top="0" - width="313"> + width="285"> <texture_picker enabled="false" - follows="top|left" - height="190" + follows="left|top|right" + height="197" layout="topleft" - left="10" + left="11" name="logo" top="10" width="290" /> diff --git a/indra/newview/skins/default/xui/en/panel_places.xml b/indra/newview/skins/default/xui/en/panel_places.xml index c4e4b9aa9b..57535649de 100644 --- a/indra/newview/skins/default/xui/en/panel_places.xml +++ b/indra/newview/skins/default/xui/en/panel_places.xml @@ -17,12 +17,12 @@ background_visible="true" name="teleport_history_tab_title" value="TELEPORT HISTORY" /> <filter_editor - text_pad_left="14" + text_pad_left="10" follows="left|top|right" font="SansSerifSmall" height="23" layout="topleft" - left="15" + left="10" label="Filter My Places" max_length="300" name="Filter" @@ -31,15 +31,15 @@ background_visible="true" <tab_container follows="all" halign="center" - height="500" + height="503" layout="topleft" - left="10" + left="6" name="Places Tabs" tab_min_width="80" tab_height="30" tab_position="top" top_pad="10" - width="313" /> + width="315" /> <panel class="panel_place_profile" filename="panel_place_profile.xml" @@ -51,7 +51,7 @@ background_visible="true" name="panel_place_profile" top="5" visible="false" - width="313" /> + width="315" /> <panel class="panel_landmark_info" filename="panel_landmark_info.xml" @@ -63,13 +63,13 @@ background_visible="true" name="panel_landmark_info" top="5" visible="false" - width="313" /> + width="315" /> <panel height="19" layout="topleft" - left="0" + left="4" name="button_panel" - width="313"> + width="315"> <button follows="bottom|left" height="23" @@ -78,65 +78,58 @@ background_visible="true" left="5" name="teleport_btn" tool_tip="Teleport to the selected area" - top="0" - width="100" /> + top="1" + width="108" /> <button follows="bottom|left" height="23" label="Map" layout="topleft" - left_pad="5" + left_pad="3" name="map_btn" - top="0" - width="70" /> + width="85" /> <button follows="bottom|left" height="23" label="Edit" layout="topleft" - left_pad="5" + left_pad="3" name="edit_btn" tool_tip="Edit landmark information" - top="0" - width="70" /> + width="83" /> <button follows="bottom|right" height="23" - image_disabled="ForwardArrow_Off" - image_selected="ForwardArrow_Press" - image_unselected="ForwardArrow_Off" + label="▼" layout="topleft" name="overflow_btn" tool_tip="Show additional options" - right="-10" - top="0" - width="18" /> + left_pad="3" + width="23" /> <button - follows="bottom|right" + follows="bottom|left" height="23" - label="Close" + label="Save" layout="topleft" - name="close_btn" - right="-10" - top="0" - width="60" /> + name="save_btn" + left="5" + top_pad="-23" + width="152" /> <button follows="bottom|right" height="23" label="Cancel" layout="topleft" name="cancel_btn" - right="-10" - top="0" - width="60" /> + left_pad="3" + width="153" /> <button follows="bottom|right" height="23" - label="Save" + label="Close" layout="topleft" - name="save_btn" - right="-75" - top="0" + name="close_btn" + left_pad="3" width="60" /> </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_teleport_history.xml b/indra/newview/skins/default/xui/en/panel_teleport_history.xml index 06da64533b..ecf7252a11 100644 --- a/indra/newview/skins/default/xui/en/panel_teleport_history.xml +++ b/indra/newview/skins/default/xui/en/panel_teleport_history.xml @@ -1,14 +1,16 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<panel name="Teleport History" bottom="0" height="326" left="0" width="380" +<panel name="Teleport History" bottom="0" height="400" left="0" width="380" help_topic="panel_teleport_history" - border="true" follows="left|top|right|bottom"> + border="false" follows="left|top|right|bottom"> <accordion follows="left|top|right|bottom" - height="300" + height="368" layout="topleft" left="0" top="0" name="history_accordion" + background_visible="true" + bg_alpha_color="DkGray2" width="380"> <accordion_tab layout="topleft" @@ -51,7 +53,7 @@ top="0" width="380"> </flat_list_view> - </accordion_tab> + </accordion_tab>5 <accordion_tab layout="topleft" name="3_days_ago" @@ -138,19 +140,20 @@ </accordion_tab> </accordion> <panel - background_visible="true" + bg_opaque_color="DkGray2" + bg_alpha_color="DkGray2" + background_visible="true" + background_opaque="true" bevel_style="none" - top_pad="0" + bottom="0" follows="left|right|bottom" - height="30" - label="bottom_panel" - layout="topleft" + height="38" + layout="bottomleft" left="0" name="bottom_panel" width="380"> <button follows="bottom|left" - font="SansSerifBigBold" tool_tip="Show additional optioins" height="18" image_disabled="OptionsMenu_Disabled" @@ -159,7 +162,7 @@ layout="topleft" left="10" name="gear_btn" - top="5" + top="14" width="18" /> </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml index 55ab95bfe9..cd66c56ca1 100644 --- a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml +++ b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml @@ -1,7 +1,9 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel background_opaque="true" - background_visible="false" + background_visible="true" + bg_opaque_image="Volume_Background" + bg_alpha_image="Volume_Background" border_visible="false" border="false" chrome="true" @@ -10,15 +12,6 @@ layout="topleft" name="volumepulldown_floater" width="32"> - <!-- floater background image --> - <icon - height="150" - image_name="Volume_Background" - layout="topleft" - left="0" - name="normal_background" - top="0" - width="32" /> <slider control_name="AudioLevelMaster" follows="left|top" diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml index bde45a9487..b3d55fec65 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml @@ -37,20 +37,20 @@ width="333"> name="openoutfit_btn" /> <icon follows="top|left" - height="30" + height="24" image_name="TabIcon_Appearance_Off" name="outfit_icon" mouse_opaque="false" visible="true" - left="5" + left="9" top="0" - width="30" /> + width="24" /> <text font="SansSerifHugeBold" height="20" left_pad="5" text_color="LtGray" - top="3" + top="0" use_ellipses="true" width="305" follows="top|left" @@ -76,7 +76,7 @@ width="333"> height="23" follows="left|top|right" layout="topleft" - left="15" + left="10" label="Filter Outfits" max_length="300" name="Filter" @@ -90,7 +90,7 @@ width="333"> min_height="410" width="320" left="0" - top_pad="0" + top_pad="6" follows="all" /> <!-- <button follows="bottom|left" diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml index fb5f9d2ec8..a233d42568 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml @@ -32,10 +32,10 @@ width="330" /> <panel height="25" - layout="bottomright" + layout="topleft" name="button_panel" - left="5" - bottom="5" + left="9" + top_pad="-2" width="313"> <button enabled="true" @@ -46,17 +46,17 @@ left="0" name="info_btn" top="0" - width="100" /> + width="153" /> <button enabled="false" follows="bottom|left" height="23" label="Wear" layout="topleft" - left="130" + left="156" name="wear_btn" top="0" - width="100" /> + width="152" /> <button enabled="false" follows="bottom|left" @@ -64,19 +64,19 @@ label="Play" layout="topleft" name="play_btn" - left="130" + left="156" top="0" - width="80" /> + width="152" /> <button enabled="false" follows="bottom|left" height="23" label="Teleport" layout="topleft" - left="130" + left="156" name="teleport_btn" top="0" - width="100" /> + width="152" /> </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml index 18b59741bf..12c06504ca 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml @@ -43,10 +43,10 @@ height="23" image_overlay="BackArrow_Off" layout="topleft" - left="10" + left="14" name="back_btn" tab_stop="false" - top="0" + top="2" width="23" /> <text follows="top|left|right" @@ -71,10 +71,10 @@ width="150" /> <panel follows="all" - height="490" + height="493" label="" layout="topleft" - left="10" + left="9" help_topic="" top="45" width="313" @@ -161,13 +161,14 @@ </text> <button follows="top|right" - height="23" - label="Profile" + height="16" + image_selected="Inspector_I" + image_unselected="Inspector_I" layout="topleft" - right="-1" + right="-5" name="BtnCreator" top_delta="-6" - width="78" /> + width="16" /> <text type="string" length="1" @@ -203,13 +204,14 @@ </text> <button follows="top|right" - height="23" - label="Profile" + height="16" + image_selected="Inspector_I" + image_unselected="Inspector_I" layout="topleft" - right="-1" + right="-5" name="BtnOwner" top_delta="-3" - width="78" /> + width="16" /> <text type="string" length="1" @@ -239,8 +241,6 @@ top_pad="10" follows="left|top" layout="topleft" mouse_opaque="false" - background_visible="true" - bg_alpha_color="DkGray" name="perms_inv" left="0" top_pad="25" @@ -400,7 +400,7 @@ top_pad="10" </panel> <panel height="30" - layout="bottomright" + layout="topleft" name="button_panel" left="5" bottom="2" |