summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
-rw-r--r--indra/newview/llviewerwindow.cpp2
-rw-r--r--indra/newview/skins/default/xui/en/panel_toolbar_view.xml4
6 files changed, 20 insertions, 12 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
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 5355e77bfc..947f0ec184 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1786,7 +1786,7 @@ void LLViewerWindow::initBase()
// Get a pointer to the toolbar view holder
LLPanel* panel_holder = main_view->getChild<LLPanel>("toolbar_view_holder");
// Load the toolbar view from file
- gToolBarView = LLUICtrlFactory::getInstance()->createFromFile<LLToolBarView>("panel_toolbar_view.xml", panel_holder, LLPanel::child_registry_t::instance());
+ gToolBarView = LLUICtrlFactory::getInstance()->createFromFile<LLToolBarView>("panel_toolbar_view.xml", panel_holder, LLDefaultChildRegistry::instance());
// Attach it to the toolbar view holder
//panel_holder->addChild(gToolBarView);
}
diff --git a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml
index 33a19bcdb0..12c442d8f1 100644
--- a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml
+++ b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml
@@ -5,6 +5,8 @@
name="toolbar view"
height="500"
width="1024"
+ left="0"
+ top="0"
mouse_opaque="false"
tab_stop="false"
visible="true">
@@ -39,7 +41,7 @@
side="right"
visible="true" />
<panel
- follows="right|bottom|left"
+ follows="top|bottom|left"
layout="topleft"
name="sizer_left"
height="500"