From 23a2a77369b9f4b4fb5e606dc962e5838fb44503 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Wed, 12 Oct 2011 15:39:40 -0700 Subject: added separator above navigation bar --- .../newview/skins/default/textures/navbar/separator.png | Bin 0 -> 2826 bytes indra/newview/skins/default/textures/textures.xml | 2 +- .../skins/default/xui/en/panel_navigation_bar.xml | 10 ++++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 indra/newview/skins/default/textures/navbar/separator.png (limited to 'indra') diff --git a/indra/newview/skins/default/textures/navbar/separator.png b/indra/newview/skins/default/textures/navbar/separator.png new file mode 100644 index 0000000000..b93e5791a7 Binary files /dev/null and b/indra/newview/skins/default/textures/navbar/separator.png differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 27577d42ea..4f34352516 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -769,5 +769,5 @@ with the same filename but different name - + diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml index bf9eeb6d26..ab6fa36e6c 100644 --- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml @@ -43,6 +43,16 @@ top="0" height="34" width="600"/> + Date: Wed, 12 Oct 2011 15:46:45 -0700 Subject: EXP-1275 WIP A UI element or Keyboard shortcut to clear the viewport added confirmation dialog before hiding UI --- indra/llui/llfloater.cpp | 1 + indra/llui/llfloater.h | 3 ++- indra/newview/llviewermenu.cpp | 30 +++++++++++++++++++++- indra/newview/skins/default/xui/en/menu_viewer.xml | 14 +++++----- .../newview/skins/default/xui/en/notifications.xml | 14 ++++++++++ 5 files changed, 53 insertions(+), 9 deletions(-) (limited to 'indra') diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 4bcc7c6fe0..16fe3b8ca6 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -247,6 +247,7 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p) mHeaderHeight(p.header_height), mLegacyHeaderHeight(p.legacy_header_height), mMinimized(FALSE), + mVisibleWhenMinimized(TRUE), mForeground(FALSE), mFirstLook(TRUE), mButtonScale(1.0f), diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 275b508f79..c94aa0207e 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -212,7 +212,7 @@ public: void addDependentFloater(LLFloater* dependent, BOOL reposition = TRUE); void addDependentFloater(LLHandle dependent_handle, BOOL reposition = TRUE); LLFloater* getDependee() { return (LLFloater*)mDependeeHandle.get(); } - void removeDependentFloater(LLFloater* dependent); + void removeDependentFloater(LLFloater* dependent); BOOL isMinimized() const { return mMinimized; } /// isShown() differs from getVisible() in that isShown() also considers /// isMinimized(). isShown() is true only if visible and not minimized. @@ -420,6 +420,7 @@ private: S32 mLegacyHeaderHeight;// HACK see initFloaterXML() BOOL mMinimized; + bool mVisibleWhenMinimized; BOOL mForeground; LLHandle mDependeeHandle; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 0cbbfae002..478af6ab7d 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3766,9 +3766,37 @@ class LLViewToggleUI : public view_listener_t { bool handleEvent(const LLSD& userdata) { - gViewerWindow->setUIVisibility(!gViewerWindow->getUIVisibility()); + LLNotification::Params params("ConfirmHideUI"); + params.functor.function(boost::bind(&LLViewToggleUI::confirm, this, _1, _2)); + LLSD substitutions; +#if LL_DARWIN + substitutions["SHORTCUT"] = "Cmd+Shift+U"; +#else + substitutions["SHORTCUT"] = "Ctrl+Shift+U"; +#endif + params.substitutions = substitutions; + if (gViewerWindow->getUIVisibility()) + { + // hiding, so show notification + LLNotifications::instance().add(params); + } + else + { + LLNotifications::instance().forceResponse(params, 0); + } + return true; } + + void confirm(const LLSD& notification, const LLSD& response) + { + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + + if (option == 0) // OK + { + gViewerWindow->setUIVisibility(!gViewerWindow->getUIVisibility()); + } + } }; class LLEditDuplicate : public view_listener_t diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index fdbc3d1882..c586e3a098 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -24,6 +24,13 @@ function="Floater.Toggle" parameter="toybox" /> + + + @@ -1719,13 +1726,6 @@ - - - + + + confirm + This action will hide all menu items and buttons. To get them back, click [SHORTCUT] again. + + + You do not appear to have the proper hardware requirements for [APP_NAME]. [APP_NAME] requires an OpenGL graphics card that has multitexture support. If this is the case, you may want to make sure that you have the latest drivers for your graphics card, and service packs and patches for your operating system. -- cgit v1.2.3 From 45a316831636043663972bdf83adbefb345549de Mon Sep 17 00:00:00 2001 From: callum Date: Wed, 12 Oct 2011 16:08:53 -0700 Subject: EXP-1337 FIX Add Confirmation dialog to "Restore Defaults" in the Toybox Reviewed by Leslie --- indra/newview/llfloatertoybox.cpp | 17 +++++++++++++++-- indra/newview/skins/default/xui/en/notifications.xml | 14 ++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp index 84881655f8..b4c9894271 100644 --- a/indra/newview/llfloatertoybox.cpp +++ b/indra/newview/llfloatertoybox.cpp @@ -30,12 +30,13 @@ #include "llbutton.h" #include "llcommandmanager.h" +#include "llnotifications.h" +#include "llnotificationsutil.h" #include "llpanel.h" #include "lltoolbar.h" #include "lltoolbarview.h" #include "lltrans.h" - LLFloaterToybox::LLFloaterToybox(const LLSD& key) : LLFloater(key) , mBtnRestoreDefaults(NULL) @@ -113,9 +114,21 @@ void LLFloaterToybox::draw() LLFloater::draw(); } +static bool finish_restore_toybox(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + + if (option == 0) + { + LLToolBarView::loadDefaultToolbars(); + } + return false; +} +static LLNotificationFunctorRegistration finish_restore_toybox_reg("ConfirmRestoreToybox", finish_restore_toybox); + void LLFloaterToybox::onBtnRestoreDefaults() { - LLToolBarView::loadDefaultToolbars(); + LLNotificationsUtil::add("ConfirmRestoreToybox"); } BOOL LLFloaterToybox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 6b0ffd9d33..f510b3c5ba 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -4622,6 +4622,20 @@ Are you sure you want to quit? yestext="Quit"/> + + +Are you sure you want to restore your default buttons and toolbars? + +You cannot undo this action. + + + Date: Wed, 12 Oct 2011 16:17:24 -0700 Subject: don't highlight toolbar buttons during drag and drop added mVisibleWhenMinimized to floaters --- indra/llui/llfloater.cpp | 22 ++++++++++++++++++---- indra/llui/llfloater.h | 4 +++- indra/llui/lltoolbar.cpp | 5 ++++- 3 files changed, 25 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 16fe3b8ca6..1e6c8b4a71 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -1407,6 +1407,17 @@ void LLFloater::removeDependentFloater(LLFloater* floaterp) floaterp->mDependeeHandle = LLHandle(); } +void LLFloater::setVisibleWhenMinimized(bool visible) +{ + mVisibleWhenMinimized = visible; + if (visible && isMinimized()) + { + // restack in minimized stack + setMinimized(FALSE); + setMinimized(TRUE); + } +} + BOOL LLFloater::offerClickToButton(S32 x, S32 y, MASK mask, EFloaterButton index) { if( mButtonsEnabled[index] ) @@ -1783,11 +1794,14 @@ void LLFloater::draw() } if (isMinimized()) { - for (S32 i = 0; i < BUTTON_COUNT; i++) + if (mVisibleWhenMinimized) { - drawChild(mButtons[i]); + for (S32 i = 0; i < BUTTON_COUNT; i++) + { + drawChild(mButtons[i]); + } + drawChild(mDragHandle); } - drawChild(mDragHandle); } else { @@ -2442,7 +2456,7 @@ void LLFloaterView::getMinimizePosition(S32 *left, S32 *bottom) { // Examine minimized children. LLFloater* floater = (LLFloater*)((LLView*)*child_it); - if(floater->isMinimized()) + if(floater->isMinimized() && floater->getVisibleWhenMinimized()) { LLRect r = floater->getRect(); if((r.mBottom < (row + floater_header_size)) diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index c94aa0207e..5e3d3aefc9 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -213,7 +213,9 @@ public: void addDependentFloater(LLHandle dependent_handle, BOOL reposition = TRUE); LLFloater* getDependee() { return (LLFloater*)mDependeeHandle.get(); } void removeDependentFloater(LLFloater* dependent); - BOOL isMinimized() const { return mMinimized; } + BOOL isMinimized() const { return mMinimized; } + void setVisibleWhenMinimized(bool visible); + bool getVisibleWhenMinimized() const { return mVisibleWhenMinimized;} /// isShown() differs from getVisible() in that isShown() also considers /// isMinimized(). isShown() is true only if visible and not minimized. bool isShown() const; diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index a1ea4ba18b..02970bc969 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -871,7 +871,10 @@ void LLToolBarButton::onMouseEnter(S32 x, S32 y, MASK mask) LLUICtrl::onMouseEnter(x, y, mask); // Always highlight toolbar buttons, even if they are disabled - mNeedsHighlight = TRUE; + if (!gFocusMgr.getMouseCapture() || gFocusMgr.getMouseCapture() != this) + { + mNeedsHighlight = TRUE; + } } void LLToolBarButton::onMouseCaptureLost() -- cgit v1.2.3 From d5d7e264ad636a42470772f5e96914327e30eca2 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Wed, 12 Oct 2011 16:51:00 -0700 Subject: don't highlight toolbar buttons during drag and drop (for real) --- indra/llui/llbutton.cpp | 2 +- indra/llui/lltoolbar.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 0a7584a576..4f0c0d31bd 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -548,7 +548,7 @@ void LLButton::setHighlight(bool b) BOOL LLButton::handleHover(S32 x, S32 y, MASK mask) { if (isInEnabledChain() - && (!gFocusMgr.getMouseCapture() || gFocusMgr.getMouseCapture() != this)) + && (!gFocusMgr.getMouseCapture() || gFocusMgr.getMouseCapture() == this)) mNeedsHighlight = TRUE; if (!childrenHandleHover(x, y, mask)) diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index 02970bc969..a75a1552fc 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -871,7 +871,7 @@ void LLToolBarButton::onMouseEnter(S32 x, S32 y, MASK mask) LLUICtrl::onMouseEnter(x, y, mask); // Always highlight toolbar buttons, even if they are disabled - if (!gFocusMgr.getMouseCapture() || gFocusMgr.getMouseCapture() != this) + if (!gFocusMgr.getMouseCapture() || gFocusMgr.getMouseCapture() == this) { mNeedsHighlight = TRUE; } -- cgit v1.2.3