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/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 4991c4afa641a3139f3e289534d70a08a8c12a99..0e7060e22cfc887157bdfceb40ceb5c38b1a4d40 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -47,6 +47,19 @@ void LLLayoutStack::OrientationNames::declareValues() // // LLLayoutPanel // +LLLayoutPanel::Params::Params() +: expanded_min_dim("expanded_min_dim", 0), + min_dim("min_dim", 0), + max_dim("max_dim", S32_MAX), + user_resize("user_resize", true), + auto_resize("auto_resize", true) +{ + addSynonym(min_dim, "min_width"); + addSynonym(min_dim, "min_height"); + addSynonym(max_dim, "max_width"); + addSynonym(max_dim, "max_height"); +} + LLLayoutPanel::LLLayoutPanel(const Params& p) : LLPanel(p), mExpandedMinDimSpecified(false), @@ -527,8 +540,8 @@ void LLLayoutStack::updateLayout(BOOL force_resize) // not enough room to fit existing contents if (force_resize == FALSE // layout did not complete by reaching target position - && ((mOrientation == VERTICAL && cur_y != -mPanelSpacing) - || (mOrientation == HORIZONTAL && cur_x != getRect().getWidth() + mPanelSpacing))) + && ((mOrientation == VERTICAL && llround(cur_y) != -mPanelSpacing) + || (mOrientation == HORIZONTAL && llround(cur_x) != getRect().getWidth() + mPanelSpacing))) { // do another layout pass with all stacked elements contributing // even those that don't usually resize diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h index 5d79505fc36b5eea4b1ce9ec94599cb7791e5438..ede6149a800da8c15b6de93079cb2845a767d0e5 100644 --- a/indra/llui/lllayoutstack.h +++ b/indra/llui/lllayoutstack.h @@ -161,18 +161,7 @@ friend class LLUICtrlFactory; Optional<bool> user_resize, auto_resize; - Params() - : expanded_min_dim("expanded_min_dim", 0), - min_dim("min_dim", 0), - max_dim("max_dim", 0), - user_resize("user_resize", true), - auto_resize("auto_resize", true) - { - addSynonym(min_dim, "min_width"); - addSynonym(min_dim, "min_height"); - addSynonym(max_dim, "max_width"); - addSynonym(max_dim, "max_height"); - } + Params(); }; ~LLLayoutPanel(); diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index cc2a189b7628954b21b4084c1ef5f2c4ab7d775d..e3217668c540eda7e0895051f03f533cdb5e8bae 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -44,6 +44,7 @@ #include "llparticipantlist.h" #include "llspeakers.h" #include "lltextutil.h" +#include "lltransientfloatermgr.h" #include "llviewercontrol.h" #include "llviewerdisplayname.h" #include "llviewerwindow.h" @@ -96,7 +97,7 @@ static void* create_non_avatar_caller(void*) LLVoiceChannel* LLCallFloater::sCurrentVoiceChannel = NULL; LLCallFloater::LLCallFloater(const LLSD& key) -: LLFloater(key) +: LLTransientDockableFloater(NULL, false, key) , mSpeakerManager(NULL) , mParticipants(NULL) , mAvatarList(NULL) @@ -112,6 +113,7 @@ LLCallFloater::LLCallFloater(const LLSD& key) mFactoryMap["non_avatar_caller"] = LLCallbackMap(create_non_avatar_caller, NULL); LLVoiceClient::instance().addObserver(this); + LLTransientFloaterMgr::getInstance()->addControlView(this); // update the agent's name if display name setting change LLAvatarNameCache::addUseDisplayNamesCallback(boost::bind(&LLCallFloater::updateAgentModeratorState, this)); @@ -134,6 +136,7 @@ LLCallFloater::~LLCallFloater() { LLVoiceClient::getInstance()->removeObserver(this); } + LLTransientFloaterMgr::getInstance()->removeControlView(this); } // virtual @@ -151,10 +154,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/llcallfloater.h b/indra/newview/llcallfloater.h index 7282f7a8be98c0eb25500b80ba63d9830b4bfd28..00a3f76e5679d53ee2908cff0ab9776ebe04e289 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -28,7 +28,7 @@ #ifndef LL_LLCALLFLOATER_H #define LL_LLCALLFLOATER_H -#include "llfloater.h" +#include "lltransientdockablefloater.h" #include "llvoicechannel.h" #include "llvoiceclient.h" @@ -52,7 +52,7 @@ class LLSpeakersDelayActionsStorage; * When the Resident is engaged in any chat except Nearby Chat, the Voice Control Panel * also provides a 'Leave Call' button to allow the Resident to leave that voice channel. */ -class LLCallFloater : public LLFloater, LLVoiceClientParticipantObserver +class LLCallFloater : public LLTransientDockableFloater, LLVoiceClientParticipantObserver { public: @@ -262,6 +262,9 @@ class LLCallFloater : public LLFloater, LLVoiceClientParticipantObserver */ static LLVoiceChannel* sCurrentVoiceChannel; + /* virtual */ + LLTransientFloaterMgr::ETransientGroup getGroup() { return LLTransientFloaterMgr::IM; } + boost::signals2::connection mVoiceChannelStateChangeConnection; }; diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index aa78bc4f2921375c5c397308f2e42d884fe9d93f..b33dea4890fabbe6bfb219b15781f341539c3944 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -347,13 +347,12 @@ LLFloaterCamera::LLFloaterCamera(const LLSD& val) mPrevMode(CAMERA_CTRL_MODE_PAN) { LLHints::registerHintTarget("view_popup", LLView::getHandle()); + mCommitCallbackRegistrar.add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraItem, _2)); } // 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/menu_bottomtray.xml b/indra/newview/skins/default/xui/en/menu_bottomtray.xml deleted file mode 100644 index 1a102c21bbbb682f1369d7298b9fdc9d6b8b3382..0000000000000000000000000000000000000000 --- a/indra/newview/skins/default/xui/en/menu_bottomtray.xml +++ /dev/null @@ -1,163 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<menu - height="201" - layout="topleft" - left="100" - mouse_opaque="false" - name="hide_camera_move_controls_menu" - top="624" - visible="false" - width="128"> - <menu_item_check - label="Speak Button" - layout="topleft" - name="EnableVoiceChat"> - <menu_item_check.on_click - function="ToggleControl" - parameter="EnableVoiceChat" /> - <menu_item_check.on_check - function="CheckControl" - parameter="EnableVoiceChat" /> - </menu_item_check> - <menu_item_check - label="Gesture button" - layout="topleft" - name="ShowGestureButton"> - <menu_item_check.on_click - function="ToggleControl" - parameter="ShowGestureButton" /> - <menu_item_check.on_check - function="CheckControl" - parameter="ShowGestureButton" /> - </menu_item_check> - <menu_item_check - label="Move button" - layout="topleft" - name="ShowMoveButton"> - <menu_item_check.on_click - function="ToggleControl" - parameter="ShowMoveButton" /> - <menu_item_check.on_check - function="CheckControl" - parameter="ShowMoveButton" /> - </menu_item_check> - <menu_item_check - label="View button" - layout="topleft" - name="ShowCameraButton"> - <menu_item_check.on_click - function="ToggleControl" - parameter="ShowCameraButton" /> - <menu_item_check.on_check - function="CheckControl" - parameter="ShowCameraButton" /> - </menu_item_check> - <menu_item_check - label="Snapshot button" - layout="topleft" - name="ShowSnapshotButton"> - <menu_item_check.on_click - function="ToggleControl" - parameter="ShowSnapshotButton" /> - <menu_item_check.on_check - function="CheckControl" - parameter="ShowSnapshotButton" /> - </menu_item_check> - <menu_item_check - label="Build button" - layout="topleft" - name="ShowBuildButton"> - <menu_item_check.on_click - function="ToggleControl" - parameter="ShowBuildButton" /> - <menu_item_check.on_check - function="CheckControl" - parameter="ShowBuildButton" /> - </menu_item_check> - <menu_item_check - label="Search button" - layout="topleft" - name="ShowSearchButton"> - <menu_item_check.on_click - function="ToggleControl" - parameter="ShowSearchButton" /> - <menu_item_check.on_check - function="CheckControl" - parameter="ShowSearchButton" /> - </menu_item_check> - <menu_item_check - label="Map button" - layout="topleft" - name="ShowWorldMapButton"> - <menu_item_check.on_click - function="ToggleControl" - parameter="ShowWorldMapButton" /> - <menu_item_check.on_check - function="CheckControl" - parameter="ShowWorldMapButton" /> - </menu_item_check> - <menu_item_check - label="Mini-map button" - layout="topleft" - name="ShowMiniMapButton"> - <menu_item_check.on_click - function="ToggleControl" - parameter="ShowMiniMapButton" /> - <menu_item_check.on_check - function="CheckControl" - parameter="ShowMiniMapButton" /> - </menu_item_check> - <menu_item_separator - name="Separator" /> - <menu_item_call - label="Cut" - name="NearbyChatBar_Cut"> - <menu_item_call.on_click - function="NearbyChatBar.Action" - parameter="cut" /> - <menu_item_call.on_enable - function="NearbyChatBar.EnableMenuItem" - parameter="can_cut" /> - </menu_item_call> - <menu_item_call - label="Copy" - name="NearbyChatBar_Copy"> - <menu_item_call.on_click - function="NearbyChatBar.Action" - parameter="copy" /> - <menu_item_call.on_enable - function="NearbyChatBar.EnableMenuItem" - parameter="can_copy" /> - </menu_item_call> - <menu_item_call - label="Paste" - name="NearbyChatBar_Paste"> - <menu_item_call.on_click - function="NearbyChatBar.Action" - parameter="paste" /> - <menu_item_call.on_enable - function="NearbyChatBar.EnableMenuItem" - parameter="can_paste" /> - </menu_item_call> - <menu_item_call - label="Delete" - name="NearbyChatBar_Delete"> - <menu_item_call.on_click - function="NearbyChatBar.Action" - parameter="delete" /> - <menu_item_call.on_enable - function="NearbyChatBar.EnableMenuItem" - parameter="can_delete" /> - </menu_item_call> - <menu_item_call - label="Select All" - name="NearbyChatBar_Select_All"> - <menu_item_call.on_click - function="NearbyChatBar.Action" - parameter="select_all" /> - <menu_item_call.on_enable - function="NearbyChatBar.EnableMenuItem" - parameter="can_select_all" /> - </menu_item_call> - -</menu> 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"