summaryrefslogtreecommitdiff
path: root/indra/llui/lltoolbarview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/lltoolbarview.cpp')
-rw-r--r--indra/llui/lltoolbarview.cpp36
1 files changed, 24 insertions, 12 deletions
diff --git a/indra/llui/lltoolbarview.cpp b/indra/llui/lltoolbarview.cpp
index 0e54c91cea..590cd4ffca 100644
--- a/indra/llui/lltoolbarview.cpp
+++ b/indra/llui/lltoolbarview.cpp
@@ -28,6 +28,7 @@
#include "linden_common.h"
#include "lltoolbarview.h"
+
#include "lltoolbar.h"
#include "llbutton.h"
@@ -35,33 +36,39 @@ LLToolBarView* gToolBarView = NULL;
static LLDefaultChildRegistry::Register<LLToolBarView> r("toolbar_view");
-LLToolBarView::LLToolBarView(const Params& p)
+LLToolBarView::LLToolBarView(const LLToolBarView::Params& p)
: LLUICtrl(p)
{
}
-BOOL LLToolBarView::postBuild()
+void LLToolBarView::initFromParams(const LLToolBarView::Params& p)
+{
+ // Initialize the base object
+ LLUICtrl::initFromParams(p);
+}
+
+LLToolBarView::~LLToolBarView()
{
- LLRect ctrl_rect = getRect();
- LLButton* btn = getChild<LLButton>("test");
- LLRect btn_rect = btn->getRect();
- llinfos << "Merov debug : control rect = " << ctrl_rect.mLeft << ", " << ctrl_rect.mTop << ", " << ctrl_rect.mRight << ", " << ctrl_rect.mBottom << llendl;
- llinfos << "Merov debug : test rect = " << btn_rect.mLeft << ", " << btn_rect.mTop << ", " << btn_rect.mRight << ", " << btn_rect.mBottom << llendl;
- return TRUE;
}
void LLToolBarView::draw()
{
static bool debug_print = true;
+ static S32 old_width = 0;
+ static S32 old_height = 0;
LLToolBar* toolbar_bottom = getChild<LLToolBar>("toolbar_bottom");
LLToolBar* toolbar_left = getChild<LLToolBar>("toolbar_left");
LLToolBar* toolbar_right = getChild<LLToolBar>("toolbar_right");
+ LLPanel* sizer_left = getChild<LLPanel>("sizer_left");
LLRect bottom_rect = toolbar_bottom->getRect();
LLRect left_rect = toolbar_left->getRect();
LLRect right_rect = toolbar_right->getRect();
+ LLRect sizer_left_rect = sizer_left->getRect();
+ if ((old_width != getRect().getWidth()) || (old_height != getRect().getHeight()))
+ debug_print = true;
if (debug_print)
{
LLRect ctrl_rect = getRect();
@@ -69,13 +76,18 @@ void LLToolBarView::draw()
llinfos << "Merov debug : draw bottom rect = " << bottom_rect.mLeft << ", " << bottom_rect.mTop << ", " << bottom_rect.mRight << ", " << bottom_rect.mBottom << llendl;
llinfos << "Merov debug : draw left rect = " << left_rect.mLeft << ", " << left_rect.mTop << ", " << left_rect.mRight << ", " << left_rect.mBottom << llendl;
llinfos << "Merov debug : draw right rect = " << right_rect.mLeft << ", " << right_rect.mTop << ", " << right_rect.mRight << ", " << right_rect.mBottom << llendl;
+ llinfos << "Merov debug : draw s left rect = " << sizer_left_rect.mLeft << ", " << sizer_left_rect.mTop << ", " << sizer_left_rect.mRight << ", " << sizer_left_rect.mBottom << llendl;
+ old_width = ctrl_rect.getWidth();
+ old_height = ctrl_rect.getHeight();
debug_print = false;
}
// Debug draw
- gl_rect_2d(getLocalRect(), LLColor4::blue, TRUE);
- gl_rect_2d(bottom_rect, LLColor4::red, TRUE);
- gl_rect_2d(left_rect, LLColor4::green, TRUE);
- gl_rect_2d(right_rect, LLColor4::yellow, TRUE);
+ LLColor4 back_color = LLColor4::blue;
+ back_color[VALPHA] = 0.5f;
+// gl_rect_2d(getLocalRect(), back_color, TRUE);
+// gl_rect_2d(bottom_rect, LLColor4::red, TRUE);
+// gl_rect_2d(left_rect, LLColor4::green, TRUE);
+// gl_rect_2d(right_rect, LLColor4::yellow, TRUE);
LLUICtrl::draw();
}