diff options
author | Richard Linden <none@none> | 2011-10-18 14:09:52 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2011-10-18 14:09:52 -0700 |
commit | 30527b2206e7fce2890c3c44825ff0bef85aa5a0 (patch) | |
tree | 513c249509d4081f6d8aaf2f5ae9279034b415e1 /indra/llui | |
parent | 591ad2bde7e0acca5eb38e7c29edf8f88d1488b4 (diff) |
EXP-1409 FIX WASD controls don't move avatar while Move floater is in focus
moved "chrome" flags to xui
separated hiding floater title from setting chrome
toolbar toggle button now moves floaters to frontmost and doesn't necessarily rely on focus
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llfloater.cpp | 22 | ||||
-rw-r--r-- | indra/llui/llfloater.h | 4 | ||||
-rw-r--r-- | indra/llui/llfloaterreg.cpp | 8 |
3 files changed, 13 insertions, 21 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index d1d840729d..869ad4410b 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -174,6 +174,7 @@ LLFloater::Params::Params() save_rect("save_rect", false), save_visibility("save_visibility", false), can_dock("can_dock", false), + show_title("show_title", true), open_positioning("open_positioning", LLFloaterEnums::OPEN_POSITIONING_NONE), specified_left("specified_left"), specified_bottom("specified_bottom"), @@ -1142,10 +1143,6 @@ void LLFloater::setMinimized(BOOL minimize) mButtonsEnabled[BUTTON_RESTORE] = TRUE; } - if (mDragHandle) - { - mDragHandle->setVisible(TRUE); - } setBorderVisible(TRUE); for(handle_set_iter_t dependent_it = mDependents.begin(); @@ -1296,19 +1293,9 @@ void LLFloater::setIsChrome(BOOL is_chrome) mButtons[BUTTON_CLOSE]->setToolTip(LLStringExplicit(getButtonTooltip(Params(), BUTTON_CLOSE, is_chrome))); } - // no titles displayed on "chrome" floaters - if (mDragHandle) - mDragHandle->setTitleVisible(!is_chrome); - LLPanel::setIsChrome(is_chrome); } -void LLFloater::setTitleVisible(bool visible) -{ - if (mDragHandle) - mDragHandle->setTitleVisible(visible); -} - // Change the draw style to account for the foreground state. void LLFloater::setForeground(BOOL front) { @@ -1812,7 +1799,7 @@ void LLFloater::draw() { drawChild(mButtons[i]); } - drawChild(mDragHandle); + drawChild(mDragHandle, 0, 0, TRUE); } else { @@ -2991,6 +2978,11 @@ void LLFloater::initFromParams(const LLFloater::Params& p) { setCloseCallback(initCommitCallback(p.close_callback)); } + + if (mDragHandle) + { + mDragHandle->setTitleVisible(p.show_title); + } } boost::signals2::connection LLFloater::setMinimizeCallback( const commit_signal_t::slot_type& cb ) diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 8beb11507e..f610b04e35 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -128,7 +128,8 @@ public: save_rect, save_visibility, save_dock_state, - can_dock; + can_dock, + show_title; Optional<LLFloaterEnums::EOpenPositioning> open_positioning; Optional<S32> specified_left; @@ -209,7 +210,6 @@ public: std::string getTitle() const; void setShortTitle( const std::string& short_title ); std::string getShortTitle() const; - void setTitleVisible(bool visible); virtual void setMinimized(BOOL b); void moveResizeHandlesToFront(); void addDependentFloater(LLFloater* dependent, BOOL reposition = TRUE); diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index 0edfc8da2d..df3cff9968 100644 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -462,16 +462,16 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD& else if (instance->isMinimized()) { instance->setMinimized(FALSE); - instance->setFocus(TRUE); + instance->setVisibleAndFrontmost(); } else if (!instance->isShown()) { instance->openFloater(key); - instance->setFocus(TRUE); + instance->setVisibleAndFrontmost(); } - else if (!instance->hasFocus() && !instance->getIsChrome()) + else if (!instance->isFrontmost()) { - instance->setFocus(TRUE); + instance->setVisibleAndFrontmost(); } else { |