From b2f0169a764119ad6b51ad0df964309ca7458278 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Thu, 4 Feb 2010 20:40:30 +0200 Subject: Fixed normal bug EXT-4627(Nearby Chat floater in Mouselook breaks ability to type & use gestures) --HG-- branch : product-engine --- indra/newview/llbottomtray.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 4c8cec3d30..92c00efe99 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -80,6 +80,14 @@ public: { mNearbyChatBar = getChild("chat_bar"); mGesturePanel = getChild("gesture_panel"); + + // Hide "show_nearby_chat" button + LLLineEditor* chat_box = mNearbyChatBar->getChatBox(); + LLUICtrl* show_btn = mNearbyChatBar->getChild("show_nearby_chat"); + S32 delta_width = show_btn->getRect().getWidth(); + show_btn->setVisible(FALSE); + chat_box->reshape(chat_box->getRect().getWidth() + delta_width, chat_box->getRect().getHeight()); + return TRUE; } -- cgit v1.2.3 From 3f0762f65ad8ba9d4f854378ca2d2dd826470f4e Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Thu, 4 Feb 2010 20:40:30 +0200 Subject: Fixed normal bug EXT-4307 (There are no text context menues for Search text field and for IM text field) --HG-- branch : product-engine --- indra/llui/lllineeditor.cpp | 42 ++++++++++++++++++++++++++++++++++- indra/llui/lllineeditor.h | 9 +++++++- indra/newview/llbottomtray.cpp | 2 ++ indra/newview/lllocationinputctrl.cpp | 1 + 4 files changed, 52 insertions(+), 2 deletions(-) diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index eb2b4f7705..00376cc4dd 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -55,6 +55,7 @@ #include "llui.h" #include "lluictrlfactory.h" #include "llclipboard.h" +#include "llmenugl.h" // // Imported globals @@ -164,7 +165,8 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p) mTentativeFgColor(p.text_tentative_color()), mHighlightColor(p.highlight_color()), mPreeditBgColor(p.preedit_bg_color()), - mGLFont(p.font) + mGLFont(p.font), + mContextMenuHandle() { llassert( mMaxLengthBytes > 0 ); @@ -191,6 +193,12 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p) setCursor(mText.length()); setPrevalidate(p.prevalidate_callback()); + + LLContextMenu* menu = LLUICtrlFactory::instance().createFromFile + ("menu_text_editor.xml", + LLMenuGL::sMenuContainer, + LLMenuHolderGL::child_registry_t::instance()); + setContextMenu(menu); } LLLineEditor::~LLLineEditor() @@ -663,6 +671,16 @@ BOOL LLLineEditor::handleMiddleMouseDown(S32 x, S32 y, MASK mask) return TRUE; } +BOOL LLLineEditor::handleRightMouseDown(S32 x, S32 y, MASK mask) +{ + setFocus(TRUE); + if (!LLUICtrl::handleRightMouseDown(x, y, mask)) + { + showContextMenu(x, y); + } + return TRUE; +} + BOOL LLLineEditor::handleHover(S32 x, S32 y, MASK mask) { BOOL handled = FALSE; @@ -2560,3 +2578,25 @@ LLWString LLLineEditor::getConvertedText() const } return text; } + +void LLLineEditor::showContextMenu(S32 x, S32 y) +{ + LLContextMenu* menu = static_cast(mContextMenuHandle.get()); + + if (menu) + { + gEditMenuHandler = this; + + S32 screen_x, screen_y; + localPointToScreen(x, y, &screen_x, &screen_y); + menu->show(screen_x, screen_y); + } +} + +void LLLineEditor::setContextMenu(LLContextMenu* new_context_menu) +{ + if (new_context_menu) + mContextMenuHandle = new_context_menu->getHandle(); + else + mContextMenuHandle.markDead(); +} diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index 49e9539b16..a06a317f76 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -56,6 +56,7 @@ class LLFontGL; class LLLineEditorRollback; class LLButton; +class LLContextMenu; typedef boost::function LLLinePrevalidateFunc; @@ -113,6 +114,7 @@ protected: LLLineEditor(const Params&); friend class LLUICtrlFactory; friend class LLFloaterEditUI; + void showContextMenu(S32 x, S32 y); public: virtual ~LLLineEditor(); @@ -122,6 +124,7 @@ public: /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleDoubleClick(S32 x,S32 y,MASK mask); /*virtual*/ BOOL handleMiddleMouseDown(S32 x,S32 y,MASK mask); + /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask ); /*virtual*/ BOOL handleUnicodeCharHere(llwchar uni_char); /*virtual*/ void onMouseCaptureLost(); @@ -249,7 +252,9 @@ public: void updateHistory(); // stores current line in history void setReplaceNewlinesWithSpaces(BOOL replace); - + + void setContextMenu(LLContextMenu* new_context_menu); + private: // private helper methods @@ -348,6 +353,8 @@ protected: std::vector mPreeditPositions; LLPreeditor::standouts_t mPreeditStandouts; + LLHandle mContextMenuHandle; + private: // Instances that by default point to the statics but can be overidden in XML. LLPointer mBgImage; diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 92c00efe99..93b708f299 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -441,6 +441,8 @@ BOOL LLBottomTray::postBuild() mObjectDefaultWidthMap[RS_BUTTON_CAMERA] = mCamPanel->getRect().getWidth(); mObjectDefaultWidthMap[RS_BUTTON_SPEAK] = mSpeakPanel->getRect().getWidth(); + mNearbyChatBar->getChatBox()->setContextMenu(NULL); + return TRUE; } diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 4f40a0a532..1b7ad6ab7e 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -227,6 +227,7 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) params.commit_on_focus_lost(false); params.follows.flags(FOLLOWS_ALL); mTextEntry = LLUICtrlFactory::create(params); + mTextEntry->setContextMenu(NULL); addChild(mTextEntry); // LLLineEditor is replaced with LLLocationLineEditor -- cgit v1.2.3 From 558cd44e6be87c661a873bb96918265282de361b Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Thu, 4 Feb 2010 20:40:30 +0200 Subject: Fixed low bug EXT-4184 (Fav bar: drop landmark pointer is visible badly) --HG-- branch : product-engine --- indra/newview/llfavoritesbar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 90f6438980..0f52b30567 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -628,8 +628,8 @@ void LLFavoritesBarCtrl::draw() if (mShowDragMarker) { - S32 w = mImageDragIndication->getWidth() / 2; - S32 h = mImageDragIndication->getHeight() / 2; + S32 w = mImageDragIndication->getWidth(); + S32 h = mImageDragIndication->getHeight(); if (mLandingTab) { -- cgit v1.2.3 From f60afe790b156051f1da72abea2ea64731c704ac Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Thu, 4 Feb 2010 21:22:05 +0200 Subject: Fixed major bug EXT-4853 (Color Picker - Arrow Used to Select Color Density is Nearly Invisible) --HG-- branch : product-engine --- indra/newview/llfloatercolorpicker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp index 73b79d8e13..b65457c4eb 100644 --- a/indra/newview/llfloatercolorpicker.cpp +++ b/indra/newview/llfloatercolorpicker.cpp @@ -586,7 +586,7 @@ void LLFloaterColorPicker::draw() gl_triangle_2d ( startX, startY, startX + mLumMarkerSize, startY - mLumMarkerSize, startX + mLumMarkerSize, startY + mLumMarkerSize, - LLColor4 ( 0.0f, 0.0f, 0.0f, 1.0f ), TRUE ); + LLColor4 ( 0.75f, 0.75f, 0.75f, 1.0f ), TRUE ); // draw luminance slider outline gl_rect_2d ( mLumRegionLeft, -- cgit v1.2.3