aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llcontainerview.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:34 -0500
committerJacek Antonelli2008-08-15 23:45:34 -0500
commitcd17687f01420952712a500107e0f93e7ab8d5f8 (patch)
treece48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/newview/llcontainerview.cpp
parentSecond Life viewer sources 1.19.0.5 (diff)
downloadmeta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz
Second Life viewer sources 1.19.1.0
Diffstat (limited to 'linden/indra/newview/llcontainerview.cpp')
-rw-r--r--linden/indra/newview/llcontainerview.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/linden/indra/newview/llcontainerview.cpp b/linden/indra/newview/llcontainerview.cpp
index 497b794..53c8e92 100644
--- a/linden/indra/newview/llcontainerview.cpp
+++ b/linden/indra/newview/llcontainerview.cpp
@@ -71,10 +71,10 @@ BOOL LLContainerView::handleMouseDown(S32 x, S32 y, MASK mask)
71 } 71 }
72 if (!handled) 72 if (!handled)
73 { 73 {
74 if( mCollapsible && (y >= mRect.getHeight() - 10) ) 74 if( mCollapsible && (y >= getRect().getHeight() - 10) )
75 { 75 {
76 setDisplayChildren(!mDisplayChildren); 76 setDisplayChildren(!mDisplayChildren);
77 reshape(mRect.getWidth(), mRect.getHeight(), FALSE); 77 reshape(getRect().getWidth(), getRect().getHeight(), FALSE);
78 } 78 }
79 } 79 }
80 return TRUE; 80 return TRUE;
@@ -99,11 +99,11 @@ void LLContainerView::draw()
99 { 99 {
100 LLGLSNoTexture gls_no_texture; 100 LLGLSNoTexture gls_no_texture;
101 101
102 gl_rect_2d(0, mRect.getHeight(), mRect.getWidth(), 0, LLColor4(0.f, 0.f, 0.f, 0.25f)); 102 gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, LLColor4(0.f, 0.f, 0.f, 0.25f));
103 } 103 }
104 104
105 // Draw the label. 105 // Draw the label.
106 gResMgr->getRes( LLFONT_OCRA )->renderUTF8(mLabel, 0, 2, mRect.getHeight() - 2, LLColor4(1,1,1,1), LLFontGL::LEFT, LLFontGL::TOP); 106 gResMgr->getRes( LLFONT_OCRA )->renderUTF8(mLabel, 0, 2, getRect().getHeight() - 2, LLColor4(1,1,1,1), LLFontGL::LEFT, LLFontGL::TOP);
107 107
108 LLView::draw(); 108 LLView::draw();
109} 109}
@@ -117,8 +117,8 @@ void LLContainerView::reshape(S32 width, S32 height, BOOL called_from_parent)
117 117
118 // These will be used for the children 118 // These will be used for the children
119 left = 4; 119 left = 4;
120 top = mRect.getHeight() - 4; 120 top = getRect().getHeight() - 4;
121 right = mRect.getWidth() - 2; 121 right = getRect().getWidth() - 2;
122 bottom = top; 122 bottom = top;
123 123
124 // Leave some space for the top label/grab handle 124 // Leave some space for the top label/grab handle
@@ -146,13 +146,16 @@ void LLContainerView::reshape(S32 width, S32 height, BOOL called_from_parent)
146 146
147 if (followsTop()) 147 if (followsTop())
148 { 148 {
149 mRect.mBottom = mRect.mTop - total_height; 149 // HACK: casting away const. Should use setRect or some helper function instead.
150 const_cast<LLRect&>(getRect()).mBottom = getRect().mTop - total_height;
150 } 151 }
151 else 152 else
152 { 153 {
153 mRect.mTop = mRect.mBottom + total_height; 154 // HACK: casting away const. Should use setRect or some helper function instead.
155 const_cast<LLRect&>(getRect()).mTop = getRect().mBottom + total_height;
154 } 156 }
155 mRect.mRight = mRect.mLeft + width; 157 // HACK: casting away const. Should use setRect or some helper function instead.
158 const_cast<LLRect&>(getRect()).mRight = getRect().mLeft + width;
156 159
157 top = total_height - 20; 160 top = total_height - 20;
158 bottom = top; 161 bottom = top;