From 862a951880a8dfb2096b8bb88842f427d3c5f152 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 6 Oct 2010 20:22:53 -0700 Subject: Backed out changeset 28f52b3d2e3d (optimizations in button rendering). --- indra/llui/llbutton.cpp | 12 +++++------- indra/llui/llbutton.h | 1 - 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 5a4f0515fc..aeedf62379 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -120,7 +120,6 @@ LLButton::LLButton(const LLButton::Params& p) mFlashing( FALSE ), mCurGlowStrength(0.f), mNeedsHighlight(FALSE), - mMouseOver(false), mUnselectedLabel(p.label()), mSelectedLabel(p.label_selected()), mGLFont(p.font), @@ -505,11 +504,7 @@ void LLButton::onMouseEnter(S32 x, S32 y, MASK mask) LLUICtrl::onMouseEnter(x, y, mask); if (isInEnabledChain()) - { mNeedsHighlight = TRUE; - } - - mMouseOver = true; } void LLButton::onMouseLeave(S32 x, S32 y, MASK mask) @@ -517,7 +512,6 @@ void LLButton::onMouseLeave(S32 x, S32 y, MASK mask) LLUICtrl::onMouseLeave(x, y, mask); mNeedsHighlight = FALSE; - mMouseOver = true; } void LLButton::setHighlight(bool b) @@ -571,10 +565,14 @@ void LLButton::draw() } // Unselected image assignments + S32 local_mouse_x; + S32 local_mouse_y; + LLUI::getMousePositionLocal(this, &local_mouse_x, &local_mouse_y); + bool enabled = isInEnabledChain(); bool pressed = pressed_by_keyboard - || (hasMouseCapture() && mMouseOver) + || (hasMouseCapture() && pointInView(local_mouse_x, local_mouse_y)) || mForcePressedState; bool selected = getToggleState(); diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index 5f25084b35..f4af19b696 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -356,7 +356,6 @@ private: BOOL mCommitOnReturn; BOOL mFadeWhenDisabled; bool mForcePressedState; - bool mMouseOver; LLFrameTimer mFlashingTimer; }; -- cgit v1.2.3 From d0bc4fc5e656b07308fe5fe0dc99ed78c00efd78 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 9 Sep 2010 19:07:07 -0700 Subject: DEV-53015 FIX Volume slider disappears when sliding on panel_prim_media_controls.xml --- indra/llui/llbutton.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index f014a2a98d..65ef3e5f8f 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -558,15 +558,19 @@ void LLButton::draw() pressed_by_keyboard = gKeyboard->getKeyDown(' ') || (mCommitOnReturn && gKeyboard->getKeyDown(KEY_RETURN)); } - // Unselected image assignments - S32 local_mouse_x; - S32 local_mouse_y; - LLUI::getMousePositionLocal(this, &local_mouse_x, &local_mouse_y); + bool mouse_pressed_and_over = false; + if (hasMouseCapture()) + { + S32 local_mouse_x ; + S32 local_mouse_y; + LLUI::getMousePositionLocal(this, &local_mouse_x, &local_mouse_y); + mouse_pressed_and_over = pointInView(local_mouse_x, local_mouse_y); + } bool enabled = isInEnabledChain(); bool pressed = pressed_by_keyboard - || (hasMouseCapture() && pointInView(local_mouse_x, local_mouse_y)) + || mouse_pressed_and_over || mForcePressedState; bool selected = getToggleState(); -- cgit v1.2.3 From d129d6ee23995d0a5e89aa71e56d6ed6aa95761e Mon Sep 17 00:00:00 2001 From: Kelly Washington Date: Fri, 24 Sep 2010 15:57:17 -0700 Subject: VWR-21377 Script editor ctrl-f fix. let some LLViews handle shortcut keys if they want. reviewed with ambroff --- indra/llui/llfocusmgr.cpp | 14 ++++++++++++++ indra/llui/llfocusmgr.h | 2 ++ indra/llui/llview.h | 5 +++++ 3 files changed, 21 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/llfocusmgr.cpp b/indra/llui/llfocusmgr.cpp index 1f16d12add..7fbfd80d8d 100644 --- a/indra/llui/llfocusmgr.cpp +++ b/indra/llui/llfocusmgr.cpp @@ -315,6 +315,20 @@ void LLFocusMgr::removeKeyboardFocusWithoutCallback( const LLFocusableElement* f } } +bool LLFocusMgr::keyboardFocusHasMenus() const +{ + LLView* focus_view = dynamic_cast(mKeyboardFocus); + while( focus_view ) + { + if(focus_view->hasMenus()) + { + return true; + } + + focus_view = focus_view->getParent(); + } + return false; +} void LLFocusMgr::setMouseCapture( LLMouseHandler* new_captor ) { diff --git a/indra/llui/llfocusmgr.h b/indra/llui/llfocusmgr.h index eef82a3b5a..e09bad0187 100644 --- a/indra/llui/llfocusmgr.h +++ b/indra/llui/llfocusmgr.h @@ -118,6 +118,8 @@ public: void unlockFocus(); BOOL focusLocked() const { return mLockedView != NULL; } + bool keyboardFocusHasMenus() const; + private: LLUICtrl* mLockedView; diff --git a/indra/llui/llview.h b/indra/llui/llview.h index f7175112bf..62683491ef 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -277,6 +277,11 @@ public: BOOL focusNextRoot(); BOOL focusPrevRoot(); + // Normally we want the app menus to get priority on modified keys + // However, if this item claims to have menus then we want to give + // it first chance at handling them. (eg. the script editor) + virtual bool hasMenus() const { return false; }; + // delete all children. Override this function if you need to // perform any extra clean up such as cached pointers to selected // children, etc. -- cgit v1.2.3 From 92013d1212fdd2f082f1fdf07350e8e319b2fd75 Mon Sep 17 00:00:00 2001 From: Kelly Washington Date: Fri, 24 Sep 2010 16:31:43 -0700 Subject: VWR-21377 Script editor ctrl-f fix. change to better / more consistent naming --- indra/llui/llfocusmgr.cpp | 4 ++-- indra/llui/llfocusmgr.h | 2 +- indra/llui/llview.h | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llfocusmgr.cpp b/indra/llui/llfocusmgr.cpp index 7fbfd80d8d..43e5f6b051 100644 --- a/indra/llui/llfocusmgr.cpp +++ b/indra/llui/llfocusmgr.cpp @@ -315,12 +315,12 @@ void LLFocusMgr::removeKeyboardFocusWithoutCallback( const LLFocusableElement* f } } -bool LLFocusMgr::keyboardFocusHasMenus() const +bool LLFocusMgr::keyboardFocusHasAccelerators() const { LLView* focus_view = dynamic_cast(mKeyboardFocus); while( focus_view ) { - if(focus_view->hasMenus()) + if(focus_view->hasAccelerators()) { return true; } diff --git a/indra/llui/llfocusmgr.h b/indra/llui/llfocusmgr.h index e09bad0187..22c1895075 100644 --- a/indra/llui/llfocusmgr.h +++ b/indra/llui/llfocusmgr.h @@ -118,7 +118,7 @@ public: void unlockFocus(); BOOL focusLocked() const { return mLockedView != NULL; } - bool keyboardFocusHasMenus() const; + bool keyboardFocusHasAccelerators() const; private: LLUICtrl* mLockedView; diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 62683491ef..6d79415c26 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -277,10 +277,10 @@ public: BOOL focusNextRoot(); BOOL focusPrevRoot(); - // Normally we want the app menus to get priority on modified keys - // However, if this item claims to have menus then we want to give - // it first chance at handling them. (eg. the script editor) - virtual bool hasMenus() const { return false; }; + // Normally we want the app menus to get priority on accelerated keys + // However, sometimes we want to give specific views a first chance + // iat handling them. (eg. the script editor) + virtual bool hasAccelerators() const { return false; }; // delete all children. Override this function if you need to // perform any extra clean up such as cached pointers to selected -- cgit v1.2.3 From 7af6d1c7319bc0f339e9159161c05ed6eb45fb5b Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Fri, 1 Oct 2010 18:58:20 +0300 Subject: STORM-307 FIXED Disabled highlighting of URLs in outfit names. Affected: My Outfits and Edit Outfit panels. --- indra/llui/llaccordionctrltab.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llui') diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index b7da5f4a1b..e28ef1f25d 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -141,6 +141,7 @@ LLAccordionCtrlTab::LLAccordionCtrlTabHeader::LLAccordionCtrlTabHeader( textboxParams.use_ellipses = true; textboxParams.bg_visible = false; textboxParams.mouse_opaque = false; + textboxParams.parse_urls = false; mHeaderTextbox = LLUICtrlFactory::create(textboxParams); addChild(mHeaderTextbox); } -- cgit v1.2.3 From 33bfe43b0cbae946f5c0929f1dacc16e2e9d88f6 Mon Sep 17 00:00:00 2001 From: Andrew Productengine Date: Mon, 11 Oct 2010 19:32:42 +0300 Subject: STORM-301 FIXED Fixed behaviour of camera on undocked 'My Appearance' tab minimizing. - Added signal to LLFloater that is emitted on minimize. - Set minimize callback for appearance tab floater in LLSideTrayTab::undock. Method from LLSidePanelAppearance that handles camera issues is called on minimization of floater. --- indra/llui/llfloater.cpp | 16 +++++++++++++++- indra/llui/llfloater.h | 4 ++++ 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index eb5d7a6b6a..d23b876543 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -231,7 +231,8 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p) mTornOff(false), mHasBeenDraggedWhileMinimized(FALSE), mPreviousMinimizedBottom(0), - mPreviousMinimizedLeft(0) + mPreviousMinimizedLeft(0), + mMinimizeSignal(NULL) // mNotificationContext(NULL) { mHandle.bind(this); @@ -493,6 +494,8 @@ LLFloater::~LLFloater() setVisible(false); // We're not visible if we're destroyed storeVisibilityControl(); storeDockStateControl(); + + delete mMinimizeSignal; } void LLFloater::storeRectControl() @@ -997,6 +1000,11 @@ void LLFloater::setMinimized(BOOL minimize) if (minimize == mMinimized) return; + if(mMinimizeSignal) + { + (*mMinimizeSignal)(this, LLSD(minimize)); + } + if (minimize) { // minimized flag should be turned on before release focus @@ -2810,6 +2818,12 @@ void LLFloater::initFromParams(const LLFloater::Params& p) } } +boost::signals2::connection LLFloater::setMinimizeCallback( const commit_signal_t::slot_type& cb ) +{ + if (!mMinimizeSignal) mMinimizeSignal = new commit_signal_t(); + return mMinimizeSignal->connect(cb); +} + LLFastTimer::DeclareTimer POST_BUILD("Floater Post Build"); bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::string& filename, LLXMLNodePtr output_node) diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 5ecf515cf9..d26f41b4c7 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -142,6 +142,8 @@ public: // Don't export top/left for rect, only height/width static void setupParamsForExport(Params& p, LLView* parent); + boost::signals2::connection setMinimizeCallback( const commit_signal_t::slot_type& cb ); + void initFromParams(const LLFloater::Params& p); bool initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::string& filename, LLXMLNodePtr output_node = NULL); @@ -347,6 +349,8 @@ public: // Public so external views or floaters can watch for this floater closing commit_signal_t mCloseSignal; + commit_signal_t* mMinimizeSignal; + protected: std::string mRectControl; std::string mVisibilityControl; -- cgit v1.2.3 From c47a5dfe003e4b6ae8987ab3169f14694c97efc3 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Mon, 11 Oct 2010 19:58:16 +0300 Subject: STORM-298 FIXED Don't scroll the My Landmarks panel down when favorites get changed. I'm not sure what the root cause of the problem was (maybe invalid initial selection in folder view), but what seems to be definitely wrong is passing "scroll to rect" event from *invisible* folder views up to accordion control, which is what I've fixed. --- indra/llui/llaccordionctrltab.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index b7da5f4a1b..32112c6c51 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -735,6 +735,12 @@ S32 LLAccordionCtrlTab::notifyParent(const LLSD& info) return 1; } + + if (!getDisplayChildren()) + { + // Don't pass scrolling event further if our contents are invisible (STORM-298). + return 1; + } } return LLUICtrl::notifyParent(info); -- cgit v1.2.3