From 05879242832607795040573791b0790891367b81 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 4 Oct 2011 14:55:55 -0700 Subject: * Updating "Move" floater to be more FUI-like --- indra/newview/llmoveview.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/llmoveview.cpp') diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 142ee40cc8..a29526777a 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -92,8 +92,6 @@ LLFloaterMove::~LLFloaterMove() // virtual BOOL LLFloaterMove::postBuild() { - setIsChrome(TRUE); - setTitleVisible(TRUE); // restore title visibility after chrome applying updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730) LLDockableFloater::postBuild(); -- cgit v1.2.3 From 8154c245dd2f7aaee390e0206f460b9dd5b9f693 Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Tue, 11 Oct 2011 18:14:37 +0200 Subject: EXP-1281 FIXED (As a FUI user, I want all bottom bar floaters to become independent) Made bottom bar dependent floaters independent from it. Also some LLTransientDockableFloaters are just LLFLoaters now. Note: IM Floater and SysWellWindow will be made independent within EXP-1276 --- indra/newview/llmoveview.cpp | 76 ++++++++++++-------------------------------- 1 file changed, 20 insertions(+), 56 deletions(-) (limited to 'indra/newview/llmoveview.cpp') diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index a29526777a..2af01d06c1 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -37,7 +37,6 @@ #include "llagent.h" #include "llagentcamera.h" #include "llvoavatarself.h" // to check gAgentAvatarp->isSitting() -#include "llbottomtray.h" #include "llbutton.h" #include "llfirstuse.h" #include "llfloaterreg.h" @@ -46,7 +45,8 @@ #include "lluictrlfactory.h" #include "llviewerwindow.h" #include "llviewercontrol.h" -#include "llselectmgr.h" +#include "llselectmgr.h" +#include "lltoolbarview.h" #include "llviewerparcelmgr.h" #include "llviewerregion.h" #include "lltooltip.h" @@ -59,15 +59,13 @@ const F32 MOVE_BUTTON_DELAY = 0.0f; const F32 YAW_NUDGE_RATE = 0.05f; // fraction of normal speed const F32 NUDGE_TIME = 0.25f; // in seconds -const std::string BOTTOM_TRAY_BUTTON_NAME = "movement_btn"; - // // Member functions // // protected LLFloaterMove::LLFloaterMove(const LLSD& key) -: LLTransientDockableFloater(NULL, true, key), +: LLFloater(key), mForwardButton(NULL), mBackwardButton(NULL), mTurnLeftButton(NULL), @@ -94,8 +92,6 @@ BOOL LLFloaterMove::postBuild() { updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730) - LLDockableFloater::postBuild(); - // Code that implements floater buttons toggling when user moves via keyboard is located in LLAgent::propagate() mForwardButton = getChild("forward btn"); @@ -153,10 +149,10 @@ BOOL LLFloaterMove::postBuild() // virtual void LLFloaterMove::setVisible(BOOL visible) { - // Do nothing with Stand/Stop Flying panel in excessive calls of this method (from LLTransientFloaterMgr?). + // Do nothing with Stand/Stop Flying panel in excessive calls of this method. if (getVisible() == visible) { - LLTransientDockableFloater::setVisible(visible); + LLFloater::setVisible(visible); return; } @@ -175,7 +171,7 @@ void LLFloaterMove::setVisible(BOOL visible) LLPanelStandStopFlying::getInstance()->reparent(NULL); } - LLTransientDockableFloater::setVisible(visible); + LLFloater::setVisible(visible); } // static @@ -439,30 +435,6 @@ void LLFloaterMove::setModeTitle(const EMovementMode mode) setTitle(title); } -/** - * Updates position of the floater to be center aligned with Move button. - */ -void LLFloaterMove::updatePosition() -{ - LLBottomTray* tray = LLBottomTray::getInstance(); - if (!tray) return; - - LLButton* movement_btn = tray->findChild(BOTTOM_TRAY_BUTTON_NAME); - - if (movement_btn) - { - //align centers of a button and a floater - S32 x = movement_btn->calcScreenRect().getCenterX() - getRect().getWidth()/2; - - S32 y = 0; - if (!mModeActionsPanel->getVisible()) - { - y = mModeActionsPanel->getRect().getHeight(); - } - setOrigin(x, y); - } -} - //static void LLFloaterMove::sUpdateFlyingStatus() { @@ -497,8 +469,6 @@ void LLFloaterMove::enableInstance(BOOL bEnable) void LLFloaterMove::onOpen(const LLSD& key) { - LLButton *anchor_panel = LLBottomTray::getInstance()->getChild("movement_btn"); - if (gAgent.getFlying()) { setFlyingMode(TRUE); @@ -511,19 +481,9 @@ void LLFloaterMove::onOpen(const LLSD& key) showModeButtons(FALSE); } - setDockControl(new LLDockControl( - anchor_panel, this, - getDockTongue(), LLDockControl::TOP)); - sUpdateFlyingStatus(); } -//virtual -void LLFloaterMove::setDocked(bool docked, bool pop_on_undock/* = true*/) -{ - LLTransientDockableFloater::setDocked(docked, pop_on_undock); -} - void LLFloaterMove::setModeButtonToggleState(const EMovementMode mode) { llassert_always(mModeControlButtonMap.end() != mModeControlButtonMap.find(mode)); @@ -734,23 +694,27 @@ void LLPanelStandStopFlying::onStopFlyingButtonClick() */ void LLPanelStandStopFlying::updatePosition() { - LLBottomTray* tray = LLBottomTray::getInstance(); - if (!tray || mAttached) return; - - LLButton* movement_btn = tray->findChild(BOTTOM_TRAY_BUTTON_NAME); + if (mAttached) return; S32 x = 0; - if (movement_btn) + S32 y = 0; + + if(LLView* root = getRootView()) { - // Align centers of the button and the panel. - x = movement_btn->calcScreenRect().getCenterX() - getRect().getWidth()/2; + x = root->calcScreenRect().getCenterX() - getRect().getWidth()/2; } - else + + if (LLToolBar* toolbar_bottom = gToolBarView->getChild("toolbar_bottom")) { - x = tray->calcScreenRect().getCenterX() - getRect().getWidth()/2; + y = toolbar_bottom->getRect().getHeight(); } + + if(LLPanel* panel_ssf_container = getRootView()->getChild("stand_stop_flying_container")) + { + panel_ssf_container->setOrigin(0, y); + } + setOrigin(x, 0); } - // EOF -- cgit v1.2.3 From ed53295cb3137f757d4d120f84f5d22c170ae823 Mon Sep 17 00:00:00 2001 From: callum Date: Wed, 12 Oct 2011 12:55:37 -0700 Subject: EXP-1322 FIX Stand / Stop Flying button should be centered above the bottom toolbar at all times --- indra/newview/llmoveview.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'indra/newview/llmoveview.cpp') diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 2af01d06c1..c3d8b91d67 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -696,25 +696,28 @@ void LLPanelStandStopFlying::updatePosition() { if (mAttached) return; - S32 x = 0; - S32 y = 0; - - if(LLView* root = getRootView()) + S32 y_pos = 0; + S32 bottom_tb_center = 0; + if (LLToolBar* toolbar_bottom = gToolBarView->getChild("toolbar_bottom")) { - x = root->calcScreenRect().getCenterX() - getRect().getWidth()/2; + y_pos = toolbar_bottom->getRect().getHeight(); + bottom_tb_center = toolbar_bottom->getRect().getCenterX(); } - if (LLToolBar* toolbar_bottom = gToolBarView->getChild("toolbar_bottom")) + S32 left_tb_width = 0; + if (LLToolBar* toolbar_left = gToolBarView->getChild("toolbar_left")) { - y = toolbar_bottom->getRect().getHeight(); + left_tb_width = toolbar_left->getRect().getWidth(); } if(LLPanel* panel_ssf_container = getRootView()->getChild("stand_stop_flying_container")) { - panel_ssf_container->setOrigin(0, y); + panel_ssf_container->setOrigin(0, y_pos); } - setOrigin(x, 0); + S32 x_pos = bottom_tb_center-getRect().getWidth()/2 - left_tb_width; + + setOrigin( x_pos, 0); } // EOF -- cgit v1.2.3