summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/lltoolbar.cpp14
-rw-r--r--indra/llui/lltoolbarview.cpp8
-rw-r--r--indra/llui/lltoolbarview.h3
-rw-r--r--indra/llui/llui.cpp1
4 files changed, 16 insertions, 10 deletions
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index 96f892d974..31a18dc707 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -33,7 +33,9 @@
#include "llcommandmanager.h"
#include "lltrans.h"
-static LLDefaultChildRegistry::Register<LLToolBar> r1("toolbar");
+// uncomment this and remove the one in llui.cpp when there is an external reference to this translation unit
+// thanks, MSVC!
+//static LLDefaultChildRegistry::Register<LLToolBar> r1("toolbar");
namespace LLToolBarEnums
{
@@ -262,8 +264,8 @@ void LLToolBar::updateLayoutAsNeeded()
std::vector<LLToolBarButton*> buttons_in_row;
- BOOST_FOREACH(LLToolBarButton* button, mButtons)
- {
+ BOOST_FOREACH(LLToolBarButton* button, mButtons)
+ {
button->reshape(mMinButtonWidth, mButtonHeight);
button->autoResize();
@@ -294,11 +296,11 @@ void LLToolBar::updateLayoutAsNeeded()
cur_start = row_pad_start;
cur_row += max_row_girth + mPadBetween;
max_row_girth = 0;
- }
+ }
LLRect button_rect;
if (orientation == LLLayoutStack::HORIZONTAL)
- {
+ {
button_rect.setLeftTopAndSize(cur_start, panel_rect.mTop - cur_row, button_clamped_width, button->getRect().getHeight());
}
else // VERTICAL
@@ -339,7 +341,7 @@ void LLToolBar::updateLayoutAsNeeded()
mButtonPanel->translate(mButtonPanel->getRect().getWidth() - total_girth, 0);
}
mButtonPanel->reshape(total_girth, max_row_length);
- }
+ }
// re-center toolbar buttons
mCenteringStack->updateLayout();
diff --git a/indra/llui/lltoolbarview.cpp b/indra/llui/lltoolbarview.cpp
index 590cd4ffca..c99b573b35 100644
--- a/indra/llui/lltoolbarview.cpp
+++ b/indra/llui/lltoolbarview.cpp
@@ -84,10 +84,10 @@ void LLToolBarView::draw()
// Debug draw
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);
+ //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();
}
diff --git a/indra/llui/lltoolbarview.h b/indra/llui/lltoolbarview.h
index 73278e226b..0e6545015d 100644
--- a/indra/llui/lltoolbarview.h
+++ b/indra/llui/lltoolbarview.h
@@ -41,6 +41,9 @@ public:
virtual ~LLToolBarView();
virtual void draw();
+ // valid children for LLToolBarView are stored in this registry
+ typedef LLDefaultChildRegistry child_registry_t;
+
protected:
friend class LLUICtrlFactory;
LLToolBarView(const Params&);
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index a4303780fd..4f129ccfba 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -96,6 +96,7 @@ static LLDefaultChildRegistry::Register<LLSearchEditor> register_search_editor("
// register other widgets which otherwise may not be linked in
static LLDefaultChildRegistry::Register<LLLoadingIndicator> register_loading_indicator("loading_indicator");
+static LLDefaultChildRegistry::Register<LLToolBar> register_toolbar("toolbar");
//
// Functions