summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorRick Pasetto <rick@lindenlab.com>2010-02-12 11:04:10 -0800
committerRick Pasetto <rick@lindenlab.com>2010-02-12 11:04:10 -0800
commite47dc498e86034a2c991d0add56d522a39354417 (patch)
treedff3acb22d22dd654eefe8c00b116021cba472c3 /indra/llui
parent6e0ebfe18c431465f6d1bc52e079c7a745419de5 (diff)
parent31e08f5a53bdee93d976386f8e40b8531f9dc753 (diff)
Automated merge with ssh://rick@hg.lindenlab.com/viewer/viewer-2-0
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/lldockcontrol.cpp41
-rw-r--r--indra/llui/lldockcontrol.h5
-rw-r--r--indra/llui/llscrolllistctrl.cpp4
3 files changed, 47 insertions, 3 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;
}