From 7a7bc8d33bba19530bf71c210d996a3faf711cd1 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Fri, 23 Oct 2009 14:10:42 -0700 Subject: EXT-1742 Navbar should have a dropshadow that covers the sidepanel EXT-1563 I18N: Alt-arrow instructions in tab tooltips wont honor their translation reviewed by james --- indra/llui/lltabcontainer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 3ca05ff0ff..10d89dc78d 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -44,6 +44,7 @@ #include "lluictrlfactory.h" #include "llrender.h" #include "llfloater.h" +#include "lltrans.h" //---------------------------------------------------------------------------- @@ -940,8 +941,8 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) else { std::string tooltip = trimmed_label; - tooltip += "\nAlt-Left arrow for previous tab"; - tooltip += "\nAlt-Right arrow for next tab"; + tooltip += "\n" + LLTrans::getString("TooltipAltLeft"); + tooltip += "\n" + LLTrans::getString("TooltipAltRight"); LLButton::Params p; p.name(std::string(child->getName()) + " tab"); -- cgit v1.2.3 From bb9fe04b5fcfdb8f0f386fa4c11bcaed3dd1ddff Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 28 Oct 2009 11:48:10 -0700 Subject: EXT-1949 - Viewer freezes on resizing IM window cleaned up some rectangle tracking logic and introduced LLInlineViewSegment param block reviewed by Leyla --- indra/llui/lltextbase.cpp | 89 ++++++++++++++++++--------------------------- indra/llui/lltextbase.h | 18 +++++++-- indra/llui/lltexteditor.cpp | 11 ++---- indra/llui/lltexteditor.h | 2 +- 4 files changed, 56 insertions(+), 64 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 0add3fb500..66ee8f4c1a 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -973,7 +973,7 @@ void LLTextBase::draw() : hasFocus() ? mFocusBgColor.get() : mWriteableBgColor.get(); - gl_rect_2d(mDocumentView->getRect(), bg_color, TRUE); + gl_rect_2d(mTextRect, bg_color, TRUE); } // draw document view @@ -1034,13 +1034,13 @@ S32 LLTextBase::getLeftOffset(S32 width) switch (mHAlign) { case LLFontGL::LEFT: - return 0; + return mHPad; case LLFontGL::HCENTER: - return (mTextRect.getWidth() - width) / 2; + return mHPad + (mTextRect.getWidth() - width - mHPad) / 2; case LLFontGL::RIGHT: return mTextRect.getWidth() - width; default: - return 0; + return mHPad; } } @@ -1048,8 +1048,6 @@ S32 LLTextBase::getLeftOffset(S32 width) static LLFastTimer::DeclareTimer FTM_TEXT_REFLOW ("Text Reflow"); void LLTextBase::reflow(S32 start_index) { - if (!mReflowNeeded) return; - LLFastTimer ft(FTM_TEXT_REFLOW); updateSegments(); @@ -1078,7 +1076,7 @@ void LLTextBase::reflow(S32 start_index) segment_set_t::iterator seg_iter = mSegments.begin(); S32 seg_offset = 0; S32 line_start_index = 0; - const S32 text_width = mTextRect.getWidth(); // optionally reserve room for margin + const S32 text_width = mTextRect.getWidth() - mHPad; // reserve room for margin S32 remaining_pixels = text_width; LLWString text(getWText()); S32 line_count = 0; @@ -2037,7 +2035,6 @@ void LLTextBase::updateRects() } else { - mContentsRect = mLineInfoList.begin()->mRect; for (line_list_t::const_iterator line_iter = ++mLineInfoList.begin(); line_iter != mLineInfoList.end(); @@ -2046,13 +2043,30 @@ void LLTextBase::updateRects() mContentsRect.unionWith(line_iter->mRect); } - mContentsRect.mRight += mHPad; + mContentsRect.mLeft = 0; mContentsRect.mTop += mVPad; - // get around rounding errors when clipping text against rectangle - mContentsRect.stretch(1); + + S32 delta_pos = -mContentsRect.mBottom; + // move line segments to fit new document rect + for (line_list_t::iterator it = mLineInfoList.begin(); it != mLineInfoList.end(); ++it) + { + it->mRect.translate(0, delta_pos); + } + mContentsRect.translate(0, delta_pos); } + // update document container dimensions according to text contents + LLRect doc_rect = mContentsRect; + // use old mTextRect constraint document to width of viewable region + LLRect scroll_rect = mTextRect; + // doc_rect.mLeft should be 0 + doc_rect.mRight = doc_rect.mLeft + scroll_rect.getWidth(); + mDocumentView->setShape(doc_rect); + + //update mTextRect *after* mDocumentView has been resized + // so that scrollbars are added if document needs to scroll + // since mTextRect does not include scrollbars LLRect old_text_rect = mTextRect; mTextRect = mScroller ? mScroller->getContentWindowRect() : getLocalRect(); //FIXME: replace border with image? @@ -2060,43 +2074,10 @@ void LLTextBase::updateRects() { mTextRect.stretch(-1); } - mTextRect.mLeft += mHPad; - mTextRect.mTop -= mVPad; if (mTextRect != old_text_rect) { needsReflow(); } - - // change document rect size too - LLRect document_rect; - if (mScroller) - { - // document is size of scroller or size of text contents, whichever is larger - document_rect.setOriginAndSize(0, 0, - mScroller->getContentWindowRect().getWidth(), - llmax(mScroller->getContentWindowRect().getHeight(), mContentsRect.getHeight())); - } - else - { - // document size is just extents of reflowed text, reset to origin 0,0 - document_rect.set(0, - getLocalRect().getHeight(), - getLocalRect().getWidth(), - llmin(0, getLocalRect().getHeight() - mContentsRect.getHeight())); - } - mDocumentView->setShape(document_rect); - - // after making document big enough to hold all the text, move the text to fit in the document - if (!mLineInfoList.empty()) - { - S32 delta_pos = mDocumentView->getRect().getHeight() - mLineInfoList.begin()->mRect.mTop - mVPad; - // move line segments to fit new document rect - for (line_list_t::iterator it = mLineInfoList.begin(); it != mLineInfoList.end(); ++it) - { - it->mRect.translate(0, delta_pos); - } - mContentsRect.translate(0, delta_pos); - } } @@ -2442,12 +2423,14 @@ void LLNormalTextSegment::dump() const // LLInlineViewSegment // -LLInlineViewSegment::LLInlineViewSegment(LLView* view, S32 start, S32 end, bool force_new_line, S32 hpad, S32 vpad) +LLInlineViewSegment::LLInlineViewSegment(const Params& p, S32 start, S32 end) : LLTextSegment(start, end), - mView(view), - mForceNewLine(force_new_line), - mHPad(hpad), // one sided padding (applied to left and right) - mVPad(vpad) + mView(p.view), + mForceNewLine(p.force_newline), + mLeftPad(p.left_pad), + mRightPad(p.right_pad), + mTopPad(p.top_pad), + mBottomPad(p.bottom_pad) { } @@ -2467,8 +2450,8 @@ void LLInlineViewSegment::getDimensions(S32 first_char, S32 num_chars, S32& widt } else { - width = mHPad * 2 + mView->getRect().getWidth(); - height = mVPad * 2 + mView->getRect().getHeight(); + width = mLeftPad + mRightPad + mView->getRect().getWidth(); + height = mBottomPad + mTopPad + mView->getRect().getHeight(); } } @@ -2491,14 +2474,14 @@ S32 LLInlineViewSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin void LLInlineViewSegment::updateLayout(const LLTextBase& editor) { LLRect start_rect = editor.getDocRectFromDocIndex(mStart); - mView->setOrigin(start_rect.mLeft + mHPad, start_rect.mBottom + mVPad); + mView->setOrigin(start_rect.mLeft + mLeftPad, start_rect.mBottom + mBottomPad); } F32 LLInlineViewSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect) { // return padded width of widget // widget is actually drawn during mDocumentView's draw() - return (F32)(draw_rect.mLeft + mView->getRect().getWidth() + mHPad * 2); + return (F32)(draw_rect.mLeft + mView->getRect().getWidth() + mLeftPad + mRightPad); } void LLInlineViewSegment::unlinkFromDocument(LLTextBase* editor) diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index d0787f001e..14fd786127 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -459,7 +459,17 @@ public: class LLInlineViewSegment : public LLTextSegment { public: - LLInlineViewSegment(LLView* widget, S32 start, S32 end, bool force_new_line, S32 hpad = 0, S32 vpad = 0); + struct Params : public LLInitParam::Block + { + Mandatory view; + Optional force_newline; + Optional left_pad, + right_pad, + bottom_pad, + top_pad; + }; + + LLInlineViewSegment(const Params& p, S32 start, S32 end); ~LLInlineViewSegment(); /*virtual*/ void getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const; /*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const; @@ -470,8 +480,10 @@ public: /*virtual*/ void linkToDocument(class LLTextBase* editor); private: - S32 mHPad; - S32 mVPad; + S32 mLeftPad; + S32 mRightPad; + S32 mTopPad; + S32 mBottomPad; LLView* mView; bool mForceNewLine; }; diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 570ca4b998..f0238dba49 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -2307,7 +2307,7 @@ void LLTextEditor::insertText(const std::string &new_text) setEnabled( enabled ); } -void LLTextEditor::appendWidget(LLView* widget, const std::string &widget_text, bool allow_undo, bool force_new_line, S32 hpad, S32 vpad) +void LLTextEditor::appendWidget(const LLInlineViewSegment::Params& params, const std::string& text, bool allow_undo) { // Save old state S32 selection_start = mSelectionStart; @@ -2321,12 +2321,9 @@ void LLTextEditor::appendWidget(LLView* widget, const std::string &widget_text, setCursorPos(old_length); - LLWString widget_wide_text; + LLWString widget_wide_text = utf8str_to_wstring(text); - // Add carriage return if not first line - widget_wide_text = utf8str_to_wstring(widget_text); - - LLTextSegmentPtr segment = new LLInlineViewSegment(widget, old_length, old_length + widget_text.size(), force_new_line, hpad, vpad); + LLTextSegmentPtr segment = new LLInlineViewSegment(params, old_length, old_length + widget_wide_text.size()); insert(getLength(), widget_wide_text, FALSE, segment); needsReflow(); @@ -2349,7 +2346,7 @@ void LLTextEditor::appendWidget(LLView* widget, const std::string &widget_text, setCursorPos(cursor_pos); } - if( !allow_undo ) + if (!allow_undo) { blockUndo(); } diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index 4847f4d117..10fc94dedc 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -166,7 +166,7 @@ public: // inserts text at cursor void insertText(const std::string &text); - void appendWidget(LLView* widget, const std::string &widget_text, bool allow_undo, bool force_newline, S32 hpad, S32 vpad); + void appendWidget(const LLInlineViewSegment::Params& params, const std::string& text, bool allow_undo); // Non-undoable void setText(const LLStringExplicit &utf8str); -- cgit v1.2.3 From 6e8c5d206ef72357bea7354f88248f671092bc0e Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 28 Oct 2009 12:33:25 -0700 Subject: fix for layout updates of chat history update document rect twice increased right padding of inline widgets --- indra/llui/lltextbase.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 66ee8f4c1a..653505a12e 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2058,9 +2058,7 @@ void LLTextBase::updateRects() // update document container dimensions according to text contents LLRect doc_rect = mContentsRect; // use old mTextRect constraint document to width of viewable region - LLRect scroll_rect = mTextRect; - // doc_rect.mLeft should be 0 - doc_rect.mRight = doc_rect.mLeft + scroll_rect.getWidth(); + doc_rect.mRight = doc_rect.mLeft + mTextRect.getWidth(); mDocumentView->setShape(doc_rect); @@ -2078,6 +2076,10 @@ void LLTextBase::updateRects() { needsReflow(); } + + // update document container again, using new mTextRect + doc_rect.mRight = doc_rect.mLeft + mTextRect.getWidth(); + mDocumentView->setShape(doc_rect); } -- cgit v1.2.3 From a0e766da94d786d306a86667a27728524ca6eedb Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 28 Oct 2009 14:56:31 -0700 Subject: EXT-1697 tab label type not to spec EXT-1870 Remove default tooltips from tab_container widget EXT-1699 right and left tab edges don't align with edges of tab content area EXT-1869 tabs flash when your cursor passes over data fields reviewed by richard --- indra/llui/lltabcontainer.cpp | 38 ++++++++++---------------------------- indra/llui/lltabcontainer.h | 3 +++ 2 files changed, 13 insertions(+), 28 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 10d89dc78d..05ef67f20a 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -153,7 +153,9 @@ LLTabContainer::LLTabContainer(const LLTabContainer::Params& p) mImageBottomUnselected(p.tab_bottom_image_unselected), mImageBottomSelected(p.tab_bottom_image_selected), mImageLeftUnselected(p.tab_left_image_unselected), - mImageLeftSelected(p.tab_left_image_selected) + mImageLeftSelected(p.tab_left_image_selected), + mFontHalign(p.font_halign), + mFont(p.font.isProvided() ? p.font() : (mIsVertical ? LLFontGL::getFontSansSerif() : LLFontGL::getFontSansSerifSmall())) { static LLUICachedControl tabcntr_vert_tab_min_width ("UITabCntrVertTabMinWidth", 0); @@ -399,12 +401,6 @@ void LLTabContainer::draw() } } } - LLUI::pushMatrix(); - { - LLUI::translate((F32)tuple->mButton->getRect().mLeft, (F32)tuple->mButton->getRect().mBottom, 0.f); - tuple->mButton->draw(); - } - LLUI::popMatrix(); idx++; } @@ -639,12 +635,6 @@ BOOL LLTabContainer::handleToolTip( S32 x, S32 y, MASK mask) } } } - - for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) - { - LLTabTuple* tuple = *iter; - tuple->mButton->setVisible( FALSE ); - } } return handled; } @@ -811,8 +801,6 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) // already a child of mine return; } - const LLFontGL* font = - (mIsVertical ? LLFontGL::getFontSansSerif() : LLFontGL::getFontSansSerifSmall()); // Store the original label for possible xml export. child->setLabel(label); @@ -822,7 +810,7 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) S32 button_width = mMinTabWidth; if (!mIsVertical) { - button_width = llclamp(font->getWidth(trimmed_label) + tab_padding, mMinTabWidth, mMaxTabWidth); + button_width = llclamp(mFont->getWidth(trimmed_label) + tab_padding, mMinTabWidth, mMaxTabWidth); } // Tab panel @@ -909,7 +897,7 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) params.name(trimmed_label); params.rect(btn_rect); params.initial_value(trimmed_label); - params.font(font); + params.font(mFont); textbox = LLUICtrlFactory::create (params); LLButton::Params p; @@ -925,12 +913,12 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) p.rect(btn_rect); p.follows.flags(FOLLOWS_TOP | FOLLOWS_LEFT); p.click_callback.function(boost::bind(&LLTabContainer::onTabBtn, this, _2, child)); - p.font(font); + p.font(mFont); p.label(trimmed_label); p.image_unselected(mImageLeftUnselected); p.image_selected(mImageLeftSelected); p.scale_image(true); - p.font_halign = LLFontGL::LEFT; + p.font_halign = mFontHalign; p.tab_stop(false); if (indent) { @@ -940,18 +928,13 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) } else { - std::string tooltip = trimmed_label; - tooltip += "\n" + LLTrans::getString("TooltipAltLeft"); - tooltip += "\n" + LLTrans::getString("TooltipAltRight"); - LLButton::Params p; p.name(std::string(child->getName()) + " tab"); p.rect(btn_rect); p.click_callback.function(boost::bind(&LLTabContainer::onTabBtn, this, _2, child)); - p.font(font); + p.font(mFont); p.label(trimmed_label); p.visible(false); - p.tool_tip(tooltip); p.scale_image(true); p.image_unselected(tab_img); p.image_selected(tab_selected_img); @@ -959,7 +942,7 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) // Try to squeeze in a bit more text p.pad_left(4); p.pad_right(2); - p.font_halign = LLFontGL::LEFT; + p.font_halign = mFontHalign; p.follows.flags = FOLLOWS_LEFT; p.follows.flags = FOLLOWS_LEFT; @@ -1445,7 +1428,6 @@ void LLTabContainer::setTabImage(LLPanel* child, std::string image_name, const L if (!mIsVertical) { - const LLFontGL* fontp = LLFontGL::getFontSansSerifSmall(); // remove current width from total tab strip width mTotalTabWidth -= tuple->mButton->getRect().getWidth(); @@ -1456,7 +1438,7 @@ void LLTabContainer::setTabImage(LLPanel* child, std::string image_name, const L tuple->mPadding = image_overlay_width; tuple->mButton->setRightHPad(6); - tuple->mButton->reshape(llclamp(fontp->getWidth(tuple->mButton->getLabelSelected()) + tab_padding + tuple->mPadding, mMinTabWidth, mMaxTabWidth), + tuple->mButton->reshape(llclamp(mFont->getWidth(tuple->mButton->getLabelSelected()) + tab_padding + tuple->mPadding, mMinTabWidth, mMaxTabWidth), tuple->mButton->getRect().getHeight()); // add back in button width to total tab strip width mTotalTabWidth += tuple->mButton->getRect().getWidth(); diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h index e3af5384b1..9a9cf1f0d7 100644 --- a/indra/llui/lltabcontainer.h +++ b/indra/llui/lltabcontainer.h @@ -258,6 +258,9 @@ private: LLPointer mImageBottomSelected; LLPointer mImageLeftUnselected; LLPointer mImageLeftSelected; + + LLFontGL::HAlign mFontHalign; + const LLFontGL* mFont; }; #endif // LL_TABCONTAINER_H -- cgit v1.2.3 From da58b592177cc1960e611831038cb9c39eaee4c0 Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 28 Oct 2009 15:21:23 -0700 Subject: ext-1483 - Scrollable lists in side panel can sometimes get stuck apparent XUI error Also fixed terminating newlines in text editors not flowing to next line reviewed by Leyla --- indra/llui/lltextbase.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 653505a12e..2b1d677ffb 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -419,9 +419,6 @@ void LLTextBase::drawCursor() return; } - if (!mTextRect.contains(cursor_rect)) - return; - // Draw the cursor // (Flash the cursor every half second starting a fixed time after the last keystroke) F32 elapsed = mCursorBlinkTimer.getElapsedTimeF32(); @@ -2381,7 +2378,6 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin { if (text[last_char] == '\n') { - last_char++; break; } } @@ -2401,9 +2397,14 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin // If at the beginning of a line, and a single character won't fit, draw it anyway num_chars = 1; } - if (mStart + segment_offset + num_chars == mEditor.getLength()) + + // include *either* the EOF or newline character in this run of text + // but not both + S32 last_char_in_run = mStart + segment_offset + num_chars; + // check length first to avoid indexing off end of string + if (last_char_in_run >= mEditor.getLength() + || text[last_char_in_run] == '\n') { - // include terminating NULL num_chars++; } return num_chars; -- cgit v1.2.3 From 5db497e398d537a7f3b23c50336e2825006e0907 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Wed, 28 Oct 2009 17:27:38 -0700 Subject: FIX DEV-41794: Fix LLLineEditor to obey LLViewDrawContext's alpha --- indra/llui/lllineeditor.cpp | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index e053477d58..75905d0927 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -1544,18 +1544,24 @@ void LLLineEditor::drawBackground() image = mBgImage; } + F32 alpha = getDrawContext().mAlpha; // optionally draw programmatic border if (has_focus) { + LLColor4 tmp_color = gFocusMgr.getFocusColor(); + tmp_color.setAlpha(alpha); image->drawBorder(0, 0, getRect().getWidth(), getRect().getHeight(), - gFocusMgr.getFocusColor(), + tmp_color, gFocusMgr.getFocusFlashWidth()); } - image->draw(getLocalRect()); + LLColor4 tmp_color = UI_VERTEX_COLOR; + tmp_color.setAlpha(alpha); + image->draw(getLocalRect(), tmp_color); } void LLLineEditor::draw() { + F32 alpha = getDrawContext().mAlpha; S32 text_len = mText.length(); static LLUICachedControl lineeditor_cursor_thickness ("UILineEditorCursorThickness", 0); static LLUICachedControl lineeditor_v_pad ("UILineEditorVPad", 0); @@ -1608,8 +1614,10 @@ void LLLineEditor::draw() { text_color = mReadOnlyFgColor.get(); } + text_color.setAlpha(alpha); LLColor4 label_color = mTentativeFgColor.get(); - + label_color.setAlpha(alpha); + if (hasPreeditString()) { // Draw preedit markers. This needs to be before drawing letters. @@ -1632,7 +1640,7 @@ void LLLineEditor::draw() preedit_pixels_right - preedit_standout_gap - 1, background.mBottom + preedit_standout_position - preedit_standout_thickness, (text_color * preedit_standout_brightness - + mPreeditBgColor * (1 - preedit_standout_brightness)).setAlpha(1.0f)); + + mPreeditBgColor * (1 - preedit_standout_brightness)).setAlpha(alpha/*1.0f*/)); } else { @@ -1641,7 +1649,7 @@ void LLLineEditor::draw() preedit_pixels_right - preedit_marker_gap - 1, background.mBottom + preedit_marker_position - preedit_marker_thickness, (text_color * preedit_marker_brightness - + mPreeditBgColor * (1 - preedit_marker_brightness)).setAlpha(1.0f)); + + mPreeditBgColor * (1 - preedit_marker_brightness)).setAlpha(alpha/*1.0f*/)); } } } @@ -1684,15 +1692,17 @@ void LLLineEditor::draw() if( (rendered_pixels_right < (F32)mMaxHPixels) && (rendered_text < text_len) ) { LLColor4 color = mHighlightColor; + color.setAlpha(alpha); // selected middle S32 width = mGLFont->getWidth(mText.getWString().c_str(), mScrollHPos + rendered_text, select_right - mScrollHPos - rendered_text); width = llmin(width, mMaxHPixels - llround(rendered_pixels_right)); gl_rect_2d(llround(rendered_pixels_right), cursor_top, llround(rendered_pixels_right)+width, cursor_bottom, color); + LLColor4 tmp_color( 1.f - text_color.mV[0], 1.f - text_color.mV[1], 1.f - text_color.mV[2], alpha ); rendered_text += mGLFont->render( mText, mScrollHPos + rendered_text, rendered_pixels_right, text_bottom, - LLColor4( 1.f - text_color.mV[0], 1.f - text_color.mV[1], 1.f - text_color.mV[2], 1 ), + tmp_color, LLFontGL::LEFT, LLFontGL::BOTTOM, 0, LLFontGL::NO_SHADOW, @@ -1758,8 +1768,9 @@ void LLLineEditor::draw() cursor_right, cursor_bottom, text_color); if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode() && !hasSelection()) { + LLColor4 tmp_color( 1.f - text_color.mV[0], 1.f - text_color.mV[1], 1.f - text_color.mV[2], alpha ); mGLFont->render(mText, getCursor(), (F32)(cursor_left + lineeditor_cursor_thickness / 2), text_bottom, - LLColor4( 1.f - text_color.mV[0], 1.f - text_color.mV[1], 1.f - text_color.mV[2], 1 ), + tmp_color, LLFontGL::LEFT, LLFontGL::BOTTOM, 0, LLFontGL::NO_SHADOW, -- cgit v1.2.3 From 6a9de7c8ee7d3be289fbd42741a327d42b6ea9eb Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 28 Oct 2009 18:00:39 -0700 Subject: merge fix --- indra/llui/lltabcontainer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 08f16a12d4..cde4c75518 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -155,7 +155,7 @@ LLTabContainer::LLTabContainer(const LLTabContainer::Params& p) mTotalTabWidth(0), mTabPosition(p.tab_position), mFontHalign(p.font_halign), - mFont(p.font.isProvided() ? p.font() : (mIsVertical ? LLFontGL::getFontSansSerif() : LLFontGL::getFontSansSerifSmall())) + mFont(p.font.isProvided() ? p.font() : (mIsVertical ? LLFontGL::getFontSansSerif() : LLFontGL::getFontSansSerifSmall())), mFirstTabParams(p.first_tab), mMiddleTabParams(p.middle_tab), mLastTabParams(p.last_tab) -- cgit v1.2.3