diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index d1d840729d6538ed84da756814d285d8a6715663..869ad4410b0f9dc35d580347752ba32e0d1a5bc3 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 8beb11507e115750c17d06320a60a25f49e802e4..f610b04e3527ee0d6ed59c2b8a0559139e164351 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -128,7 +128,8 @@ class LLFloater : public LLPanel 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 @@ class LLFloater : public LLPanel 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 0edfc8da2d4aa9630cad4518e8be2e80f02ce122..df3cff9968f19d2642c30c04835fdfd2071a88ef 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 { diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index cc2a189b7628954b21b4084c1ef5f2c4ab7d775d..5ad2a560bcf7cbe9ae1d29d6708165a4d66d8506 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -151,10 +151,6 @@ BOOL LLCallFloater::postBuild() connectToChannel(LLVoiceChannel::getCurrentVoiceChannel()); - setIsChrome(true); - //chrome="true" hides floater caption - if (mDragHandle) - mDragHandle->setTitleVisible(TRUE); updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730) updateSession(); diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index 71077f59166c34ff4eca67223134144cfa459507..b33dea4890fabbe6bfb219b15781f341539c3944 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -353,8 +353,6 @@ LLFloaterCamera::LLFloaterCamera(const LLSD& val) // virtual BOOL LLFloaterCamera::postBuild() { - setIsChrome(TRUE); - setTitleVisible(TRUE); // restore title visibility after chrome applying updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730) mRotate = getChild<LLJoystickCameraRotate>(ORBIT); diff --git a/indra/newview/llfloaterhud.cpp b/indra/newview/llfloaterhud.cpp index 4181d1906e55a652d6d689fbf51a949a139f0622..58c76a0b85efe08995e93a231de8c706bc98f549 100644 --- a/indra/newview/llfloaterhud.cpp +++ b/indra/newview/llfloaterhud.cpp @@ -54,14 +54,6 @@ LLFloaterHUD::LLFloaterHUD(const LLSD& key) return; } - // Don't grab the focus as it will impede performing in-world actions - // while using the HUD - setIsChrome(TRUE); - - // Chrome doesn't show the window title by default, but here we - // want to show it. - setTitleVisible(true); - // Opaque background since we never get the focus setBackgroundOpaque(TRUE); } diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp index 871351305425c1ce1a6dfeb078a7e977627ea39b..a65e9e911a9fb91c6624361ff377ffbace99bbdc 100644 --- a/indra/newview/llfloatermap.cpp +++ b/indra/newview/llfloatermap.cpp @@ -105,9 +105,6 @@ BOOL LLFloaterMap::postBuild() // Get the drag handle all the way in back sendChildToBack(getDragHandle()); - //setIsChrome(TRUE); - //getDragHandle()->setTitleVisible(TRUE); - // keep onscreen gFloaterView->adjustToFitScreen(this, FALSE); diff --git a/indra/newview/llfloatersounddevices.cpp b/indra/newview/llfloatersounddevices.cpp index 56c08065467922891df3c93139c4d2e431085dc2..72c077d2156b5b323046c4dcc4c6b16845cbfec2 100644 --- a/indra/newview/llfloatersounddevices.cpp +++ b/indra/newview/llfloatersounddevices.cpp @@ -55,9 +55,6 @@ BOOL LLFloaterSoundDevices::postBuild() { LLTransientDockableFloater::postBuild(); - setIsChrome(TRUE); - if (mDragHandle) - mDragHandle->setTitleVisible(TRUE); updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730) LLPanelVoiceDeviceSettings* panel = findChild<LLPanelVoiceDeviceSettings>("device_settings_panel"); diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 6873cf058aed7179d46003050fe7fcbc4f111e1d..de305bf3d9d3de96586d68e4c8fb7845509577c4 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -91,8 +91,6 @@ mCloseNotificationOnDestroy(true) sFont = LLFontGL::getFontSansSerif(); sFontSmall = LLFontGL::getFontSansSerifSmall(); } - // clicking on a button does not steal current focus - setIsChrome(TRUE); // initialize setFocusRoot(!mIsTip); // get a form for the notification diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml index afe8584a2d3777e99873473ad1ea0a7ce571f33b..6f6ddd95faa32a14b40f2f23dc47876c6a22add5 100644 --- a/indra/newview/skins/default/xui/en/floater_camera.xml +++ b/indra/newview/skins/default/xui/en/floater_camera.xml @@ -14,6 +14,7 @@ save_visibility="true" single_instance="true" title="VIEW" + chrome="true" save_rect="true" width="228"> <floater.string diff --git a/indra/newview/skins/default/xui/en/floater_hud.xml b/indra/newview/skins/default/xui/en/floater_hud.xml index 99a6a95828edad946f52ddd0c23ecd604e407b19..e2d860881a25be8d9cde567b149b13e0247e4e56 100644 --- a/indra/newview/skins/default/xui/en/floater_hud.xml +++ b/indra/newview/skins/default/xui/en/floater_hud.xml @@ -8,6 +8,7 @@ help_topic="floater_hud" save_rect="true" save_visibility="true" + chrome="true" title="TUTORIAL" width="362"> <web_browser diff --git a/indra/newview/skins/default/xui/en/floater_map.xml b/indra/newview/skins/default/xui/en/floater_map.xml index 58d67c82211e10baaed9629683968eef8dc9a8fa..31972d412247fa32cb77e7c012966519decda46c 100644 --- a/indra/newview/skins/default/xui/en/floater_map.xml +++ b/indra/newview/skins/default/xui/en/floater_map.xml @@ -3,6 +3,7 @@ open_positioning="cascading" can_minimize="true" can_resize="true" + chrome="true" follows="top|right" height="200" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/floater_moveview.xml b/indra/newview/skins/default/xui/en/floater_moveview.xml index b7370580af49bd7feee49fe0da5ab000d5bd19a3..b9881e4347368d27d4312efe2a8d384f07917a2e 100644 --- a/indra/newview/skins/default/xui/en/floater_moveview.xml +++ b/indra/newview/skins/default/xui/en/floater_moveview.xml @@ -15,6 +15,7 @@ save_rect="true" save_visibility="true" save_dock_state="true" + chrome="true" title="MOVE" width="133"> <string diff --git a/indra/newview/skins/default/xui/en/floater_sound_devices.xml b/indra/newview/skins/default/xui/en/floater_sound_devices.xml index 3dbe4adf28af3d827e2b3f79c7faeec218b90095..dec0e9b6c620e3f44233ff24d9c04314684f41f3 100644 --- a/indra/newview/skins/default/xui/en/floater_sound_devices.xml +++ b/indra/newview/skins/default/xui/en/floater_sound_devices.xml @@ -6,6 +6,7 @@ can_minimize="true" can_resize="false" can_close="false" + chrome="true" save_dock_state="true" save_visibility="true" save_rect="true" diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml index 3f5768bc0b59c3b335eaca9347ac6c61c54c8b27..1a2b248b16c2e631f3b68bd8498b6468cfa075fa 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml @@ -4,6 +4,7 @@ can_resize="true" can_minimize="true" can_close="true" + chrome="true" height="205" layout="topleft" min_height="124" diff --git a/indra/newview/skins/default/xui/en/panel_notification.xml b/indra/newview/skins/default/xui/en/panel_notification.xml index 59ead84127a7273cd4227a76bc1cdd9001713e05..f6f62ac54eb71ee56051b27cb0be8ab0a00a81ed 100644 --- a/indra/newview/skins/default/xui/en/panel_notification.xml +++ b/indra/newview/skins/default/xui/en/panel_notification.xml @@ -9,6 +9,8 @@ layout="topleft" left="0" name="notification_panel" + chrome="true" + show_title="false" top="0" height="140" translate="false"