diff options
author | Richard Nelson <richard@lindenlab.com> | 2011-09-26 17:42:25 -0700 |
---|---|---|
committer | Richard Nelson <richard@lindenlab.com> | 2011-09-26 17:42:25 -0700 |
commit | 756532ba8a0a29ca7e5991d8a4f48ddac3bf06ac (patch) | |
tree | 50e815635d579aa203f9b8dfb8414f2483bf568e /indra/llui | |
parent | 53a486649381af53d21de28aced388bc2aacac0f (diff) | |
parent | a465f816b8e7674aa3f22023d7708106ca35b350 (diff) |
Automated merge with ssh://hg.lindenlab.com/richard/viewer-experience-fui
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llcommandmanager.cpp | 2 | ||||
-rw-r--r-- | indra/llui/lldockcontrol.cpp | 3 | ||||
-rw-r--r-- | indra/llui/lltoolbar.cpp | 54 | ||||
-rw-r--r-- | indra/llui/lltoolbarview.cpp | 4 |
4 files changed, 26 insertions, 37 deletions
diff --git a/indra/llui/llcommandmanager.cpp b/indra/llui/llcommandmanager.cpp index 62e1d186f5..783990780b 100644 --- a/indra/llui/llcommandmanager.cpp +++ b/indra/llui/llcommandmanager.cpp @@ -117,7 +117,7 @@ void LLCommandManager::addCommand(LLCommand * command) mCommandIndices[command->id()] = mCommands.size(); mCommands.push_back(command); - llinfos << "Successfully added command: " << command->id().name() << llendl; + lldebugs << "Successfully added command: " << command->id().name() << llendl; } //static diff --git a/indra/llui/lldockcontrol.cpp b/indra/llui/lldockcontrol.cpp index b1c27126d9..6e39fcd714 100644 --- a/indra/llui/lldockcontrol.cpp +++ b/indra/llui/lldockcontrol.cpp @@ -97,6 +97,7 @@ void LLDockControl::getAllowedRect(LLRect& rect) void LLDockControl::repositionDockable() { + if (!mDockWidget) return; LLRect dockRect = mDockWidget->calcScreenRect(); LLRect rootRect; mGetAllowedRectCallback(rootRect); @@ -160,7 +161,7 @@ bool LLDockControl::isDockVisible() case TOP: { // check is dock inside parent rect - // assume that parent for all dockable flaoters + // assume that parent for all dockable floaters // is the root view LLRect dockParentRect = mDockWidget->getRootView()->calcScreenRect(); diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index 1e1cb16fbb..278c04aef8 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -162,6 +162,7 @@ void LLToolBar::initFromParams(const LLToolBar::Params& p) centering_stack_p.rect = getLocalRect(); centering_stack_p.follows.flags = FOLLOWS_ALL; centering_stack_p.orientation = orientation; + centering_stack_p.mouse_opaque = false; mCenteringStack = LLUICtrlFactory::create<LLLayoutStack>(centering_stack_p); addChild(mCenteringStack); @@ -171,6 +172,7 @@ void LLToolBar::initFromParams(const LLToolBar::Params& p) border_panel_p.rect = getLocalRect(); border_panel_p.auto_resize = true; border_panel_p.user_resize = false; + border_panel_p.mouse_opaque = false; mCenteringStack->addChild(LLUICtrlFactory::create<LLLayoutPanel>(border_panel_p)); @@ -185,21 +187,7 @@ void LLToolBar::initFromParams(const LLToolBar::Params& p) LLPanel::Params button_panel_p(p.button_panel); button_panel_p.rect = center_panel->getLocalRect(); - switch(p.side()) - { - case SIDE_LEFT: - button_panel_p.follows.flags = FOLLOWS_BOTTOM|FOLLOWS_LEFT; - break; - case SIDE_RIGHT: - button_panel_p.follows.flags = FOLLOWS_BOTTOM|FOLLOWS_RIGHT; - break; - case SIDE_TOP: - button_panel_p.follows.flags = FOLLOWS_TOP|FOLLOWS_LEFT; - break; - case SIDE_BOTTOM: button_panel_p.follows.flags = FOLLOWS_BOTTOM|FOLLOWS_LEFT; - break; - } mButtonPanel = LLUICtrlFactory::create<LLPanel>(button_panel_p); center_panel->addChild(mButtonPanel); @@ -229,20 +217,20 @@ bool LLToolBar::addCommand(const LLCommandId& commandId) // if (add_command) { - LLToolBarButton::Params button_p(mButtonParams[mButtonType]); + LLToolBarButton::Params button_p(mButtonParams[mButtonType]); button_p.name = commandId.name(); - button_p.label = LLTrans::getString(command->labelRef()); - button_p.tool_tip = LLTrans::getString(command->tooltipRef()); + button_p.label = LLTrans::getString(command->labelRef()); + button_p.tool_tip = LLTrans::getString(command->tooltipRef()); - // - // Add it to the list of buttons - // - LLToolBarButton * toolbar_button = LLUICtrlFactory::create<LLToolBarButton>(button_p); - mButtons.push_back(toolbar_button); + // + // Add it to the list of buttons + // + LLToolBarButton * toolbar_button = LLUICtrlFactory::create<LLToolBarButton>(button_p); + mButtons.push_back(toolbar_button); mButtonCommands.push_back(commandId); - mButtonPanel->addChild(toolbar_button); + mButtonPanel->addChild(toolbar_button); - mNeedsLayout = true; + mNeedsLayout = true; } return add_command; @@ -403,8 +391,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(); @@ -435,11 +423,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 @@ -468,20 +456,22 @@ void LLToolBar::updateLayoutAsNeeded() { if (mSideType == SIDE_TOP) { // shift down to maintain top edge - mButtonPanel->translate(0, mButtonPanel->getRect().getHeight() - total_girth); + translate(0, getRect().getHeight() - total_girth); } + reshape(getRect().getWidth(), total_girth); mButtonPanel->reshape(max_row_length, total_girth); } else // VERTICAL { if (mSideType == SIDE_RIGHT) { // shift left to maintain right edge - mButtonPanel->translate(mButtonPanel->getRect().getWidth() - total_girth, 0); + translate(getRect().getWidth() - total_girth, 0); } - + + reshape(total_girth, getRect().getHeight()); 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 6c29e566b8..21d3785c82 100644 --- a/indra/llui/lltoolbarview.cpp +++ b/indra/llui/lltoolbarview.cpp @@ -93,8 +93,7 @@ void LLToolBarView::draw() if (mToolbarBottom) bottom_rect = mToolbarBottom->getRect(); if (mToolbarLeft) left_rect = mToolbarLeft->getRect(); if (mToolbarRight) right_rect = mToolbarRight->getRect(); - - LLRect sizer_left_rect = sizer_left->getRect(); + if ((old_width != getRect().getWidth()) || (old_height != getRect().getHeight())) debug_print = true; @@ -105,7 +104,6 @@ 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; |