diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-02-17 12:47:47 +0200 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-02-17 12:47:47 +0200 |
commit | b53e60b8574eecb583aa3a0902280849f53012ea (patch) | |
tree | 4ba57cc934b09e4119797606834cfc46805032cf /indra/llui | |
parent | 09a509e0073a1daa5eadf1b5bf5bdef24080ab47 (diff) | |
parent | 9cfc4c07267234ee4f218d100f7d4f27d6e3e000 (diff) |
Merge from default branch.
--HG--
branch : product-engine
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/lldockcontrol.cpp | 41 | ||||
-rw-r--r-- | indra/llui/lldockcontrol.h | 5 | ||||
-rw-r--r-- | indra/llui/llscrolllistctrl.cpp | 4 | ||||
-rw-r--r-- | indra/llui/lltexteditor.cpp | 4 | ||||
-rw-r--r-- | indra/llui/lltooltip.cpp | 6 | ||||
-rw-r--r-- | indra/llui/lltooltip.h | 2 | ||||
-rw-r--r-- | indra/llui/llui.cpp | 10 | ||||
-rw-r--r-- | indra/llui/llui.h | 4 | ||||
-rw-r--r-- | indra/llui/lluiimage.h | 1 |
9 files changed, 60 insertions, 17 deletions
diff --git a/indra/llui/lldockcontrol.cpp b/indra/llui/lldockcontrol.cpp index d836a5f4cd..d738b10130 100644 --- a/indra/llui/lldockcontrol.cpp +++ b/indra/llui/lldockcontrol.cpp @@ -162,7 +162,9 @@ bool LLDockControl::isDockVisible() { case LEFT: // to keep compiler happy break; + case BOTTOM: case TOP: + { // check is dock inside parent rect LLRect dockParentRect = mDockWidget->getParent()->calcScreenRect(); @@ -173,6 +175,9 @@ bool LLDockControl::isDockVisible() } break; } + default: + break; + } } } @@ -255,6 +260,42 @@ void LLDockControl::moveDockable() mDockTongueY = dockRect.mTop; break; + case BOTTOM: + x = dockRect.getCenterX() - dockableRect.getWidth() / 2; + y = dockRect.mBottom; + // unique docking used with dock tongue, so add tongue height o the Y coordinate + if (use_tongue) + { + y -= mDockTongue->getHeight(); + } + + // check is dockable inside root view rect + if (x < rootRect.mLeft) + { + x = rootRect.mLeft; + } + if (x + dockableRect.getWidth() > rootRect.mRight) + { + x = rootRect.mRight - dockableRect.getWidth(); + } + + // calculate dock tongue position + dockParentRect = mDockWidget->getParent()->calcScreenRect(); + if (dockRect.getCenterX() < dockParentRect.mLeft) + { + mDockTongueX = dockParentRect.mLeft - mDockTongue->getWidth() / 2; + } + else if (dockRect.getCenterX() > dockParentRect.mRight) + { + mDockTongueX = dockParentRect.mRight - mDockTongue->getWidth() / 2;; + } + else + { + mDockTongueX = dockRect.getCenterX() - mDockTongue->getWidth() / 2; + } + mDockTongueY = dockRect.mBottom - mDockTongue->getHeight(); + + break; } // move dockable diff --git a/indra/llui/lldockcontrol.h b/indra/llui/lldockcontrol.h index 550955c4c5..a5caf68001 100644 --- a/indra/llui/lldockcontrol.h +++ b/indra/llui/lldockcontrol.h @@ -47,8 +47,9 @@ class LLDockControl public: enum DocAt { - TOP - ,LEFT + TOP, + LEFT, + BOTTOM }; public: diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 478e270c98..ac4811210b 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -1388,6 +1388,8 @@ void LLScrollListCtrl::drawItems() LLGLSUIDefault gls_ui; + F32 alpha = getDrawContext().mAlpha; + { LLLocalClipRect clip(mItemListRect); @@ -1463,7 +1465,7 @@ void LLScrollListCtrl::drawItems() bg_color = mBgReadOnlyColor.get(); } - item->draw(item_rect, fg_color, bg_color, highlight_color, mColumnPadding); + item->draw(item_rect, fg_color % alpha, bg_color% alpha, highlight_color % alpha, mColumnPadding); cur_y -= mLineHeight; } diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index ce5f1bd082..7d230f7d42 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -2524,9 +2524,9 @@ void LLTextEditor::loadKeywords(const std::string& filename, void LLTextEditor::updateSegments() { - LLFastTimer ft(FTM_SYNTAX_HIGHLIGHTING); - if (mKeywords.isLoaded()) + if (mReflowIndex < S32_MAX && mKeywords.isLoaded()) { + LLFastTimer ft(FTM_SYNTAX_HIGHLIGHTING); // HACK: No non-ascii keywords for now segment_vec_t segment_list; mKeywords.findSegments(&segment_list, getWText(), mDefaultColor.get(), *this); diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp index 173fde8e76..ed7fd02e14 100644 --- a/indra/llui/lltooltip.cpp +++ b/indra/llui/lltooltip.cpp @@ -129,12 +129,6 @@ BOOL LLToolTipView::handleScrollWheel( S32 x, S32 y, S32 clicks ) return FALSE; } -void LLToolTipView::onMouseLeave(S32 x, S32 y, MASK mask) -{ - LLToolTipMgr::instance().blockToolTips(); -} - - void LLToolTipView::drawStickyRect() { gl_rect_2d(LLToolTipMgr::instance().getMouseNearRect(), LLColor4::white, false); diff --git a/indra/llui/lltooltip.h b/indra/llui/lltooltip.h index c0811c56c3..24e32b9b24 100644 --- a/indra/llui/lltooltip.h +++ b/indra/llui/lltooltip.h @@ -56,8 +56,6 @@ public: /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleScrollWheel( S32 x, S32 y, S32 clicks ); - /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask); - void drawStickyRect(); /*virtual*/ void draw(); diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 76f07373b4..caf04339c2 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -1894,7 +1894,9 @@ namespace LLInitParam blue("blue"), alpha("alpha"), control("") - {} + { + setBlockFromValue(); + } void TypedParam<LLUIColor>::setValueFromBlock() const { @@ -1939,6 +1941,7 @@ namespace LLInitParam size("size"), style("style") { + setBlockFromValue(); addSynonym(name, ""); } @@ -1979,7 +1982,9 @@ namespace LLInitParam bottom("bottom"), width("width"), height("height") - {} + { + setBlockFromValue(); + } void TypedParam<LLRect>::setValueFromBlock() const { @@ -2064,6 +2069,7 @@ namespace LLInitParam x("x"), y("y") { + setBlockFromValue(); } void TypedParam<LLCoordGL>::setValueFromBlock() const diff --git a/indra/llui/llui.h b/indra/llui/llui.h index 5840e76f5c..af8d4ea03b 100644 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -426,8 +426,8 @@ namespace LLInitParam { typedef BlockValue<const LLFontGL*> super_t; public: - Mandatory<std::string> name; - Optional<std::string> size, + Optional<std::string> name, + size, style; TypedParam(BlockDescriptor& descriptor, const char* name, const LLFontGL* const value, ParamDescriptor::validation_func_t func, S32 min_count, S32 max_count); diff --git a/indra/llui/lluiimage.h b/indra/llui/lluiimage.h index bdfc44262d..4ea0738026 100644 --- a/indra/llui/lluiimage.h +++ b/indra/llui/lluiimage.h @@ -109,6 +109,7 @@ namespace LLInitParam TypedParam(BlockDescriptor& descriptor, const char* name, super_t::value_assignment_t value, ParamDescriptor::validation_func_t func, S32 min_count, S32 max_count) : super_t(descriptor, name, value, func, min_count, max_count) { + setBlockFromValue(); } void setValueFromBlock() const; |