From e367e2efc23321d94ec4a4ae0264f885b4f0333b Mon Sep 17 00:00:00 2001 From: angela Date: Mon, 23 Nov 2009 13:52:40 +0800 Subject: EXT-2159 Create Vertical Slider to use for zoom in / out controls in view --- indra/llui/llsliderctrl.cpp | 3 ++- indra/llui/llsliderctrl.h | 4 +++- .../newview/skins/default/xui/en/floater_test_slider.xml | 15 ++++++++++++++- 3 files changed, 19 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/llui/llsliderctrl.cpp b/indra/llui/llsliderctrl.cpp index ed22c0a47f..ac35bc7992 100644 --- a/indra/llui/llsliderctrl.cpp +++ b/indra/llui/llsliderctrl.cpp @@ -122,7 +122,8 @@ LLSliderCtrl::LLSliderCtrl(const LLSliderCtrl::Params& p) slider_p.min_value.setIfNotProvided(p.min_value); slider_p.max_value.setIfNotProvided(p.max_value); slider_p.increment.setIfNotProvided(p.increment); - + slider_p.orientation.setIfNotProvided(p.orientation); + slider_p.commit_callback.function(&LLSliderCtrl::onSliderCommit); slider_p.control_name(p.control_name); slider_p.mouse_down_callback( p.mouse_down_callback ); diff --git a/indra/llui/llsliderctrl.h b/indra/llui/llsliderctrl.h index 4a1574d502..c425849782 100644 --- a/indra/llui/llsliderctrl.h +++ b/indra/llui/llsliderctrl.h @@ -46,6 +46,7 @@ class LLSliderCtrl : public LLF32UICtrl public: struct Params : public LLInitParam::Block { + Optional orientation; Optional label_width; Optional text_width; Optional show_text; @@ -78,7 +79,8 @@ public: value_text("value_text"), slider_label("slider_label"), mouse_down_callback("mouse_down_callback"), - mouse_up_callback("mouse_up_callback") + mouse_up_callback("mouse_up_callback"), + orientation("orientation", std::string ("horizontal")) {} }; protected: diff --git a/indra/newview/skins/default/xui/en/floater_test_slider.xml b/indra/newview/skins/default/xui/en/floater_test_slider.xml index 86ff82e01f..85d8bb2bb1 100644 --- a/indra/newview/skins/default/xui/en/floater_test_slider.xml +++ b/indra/newview/skins/default/xui/en/floater_test_slider.xml @@ -2,7 +2,7 @@ + -- cgit v1.2.3 From dd9b1f819de025f1a6caa37cfbd4fd3394f9fa9e Mon Sep 17 00:00:00 2001 From: angela Date: Mon, 23 Nov 2009 17:33:03 +0800 Subject: EXT-2297 Functionality Loss - Ability to copy (control+c) residents name from their profile & local chat --- indra/newview/llchathistory.cpp | 3 ++- indra/newview/llpanelprofileview.cpp | 3 ++- .../skins/default/xui/en/panel_chat_header.xml | 23 +++++++++++----------- .../skins/default/xui/en/panel_profile_view.xml | 7 ++++--- 4 files changed, 20 insertions(+), 16 deletions(-) (limited to 'indra') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 4ce3b50ed5..a95234099c 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -34,6 +34,7 @@ #include "llchathistory.h" #include "llpanel.h" #include "lltextbox.h" +#include "lltexteditor.h" #include "lluictrlfactory.h" #include "llscrollcontainer.h" #include "llavatariconctrl.h" @@ -185,7 +186,7 @@ public: mSourceType = CHAT_SOURCE_SYSTEM; } - LLTextBox* userName = getChild("user_name"); + LLTextEditor* userName = getChild("user_name"); LLUIColor color = style_params.color; userName->setReadOnlyColor(color); diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp index d4ab5013f9..c7c2484be3 100644 --- a/indra/newview/llpanelprofileview.cpp +++ b/indra/newview/llpanelprofileview.cpp @@ -43,6 +43,7 @@ #include "llpanelpicks.h" #include "llpanelprofile.h" #include "llsidetraypanelcontainer.h" +#include "lltexteditor.h" static LLRegisterPanelClassWrapper t_panel_target_profile("panel_profile_view"); @@ -190,7 +191,7 @@ void LLPanelProfileView::processOnlineStatus(bool online) void LLPanelProfileView::onAvatarNameCached(const LLUUID& id, const std::string& first_name, const std::string& last_name, BOOL is_group) { llassert(getAvatarId() == id); - getChild("user_name", FALSE)->setValue(first_name + " " + last_name); + getChild("user_name", FALSE)->setValue(first_name + " " + last_name); } void LLPanelProfileView::togglePanel(LLPanel* panel) diff --git a/indra/newview/skins/default/xui/en/panel_chat_header.xml b/indra/newview/skins/default/xui/en/panel_chat_header.xml index 7a3eae35a9..da175a75cd 100644 --- a/indra/newview/skins/default/xui/en/panel_chat_header.xml +++ b/indra/newview/skins/default/xui/en/panel_chat_header.xml @@ -1,15 +1,15 @@ - - + top="5" + use_ellipses="true" + value="Erica Vader" /> - Date: Tue, 24 Nov 2009 11:54:33 +0800 Subject: EXT-2780 allow_scroll = false in LLTextEditor will crash the viewer --- indra/llui/lltexteditor.cpp | 26 ++++++++++++++++------ indra/newview/llchathistory.cpp | 11 ++++----- indra/newview/llpanelprofileview.cpp | 3 +-- .../skins/default/xui/en/panel_chat_header.xml | 7 +++--- 4 files changed, 28 insertions(+), 19 deletions(-) (limited to 'indra') diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 224f066968..3f4ef24f82 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -750,8 +750,10 @@ BOOL LLTextEditor::handleHover(S32 x, S32 y, MASK mask) { if( mIsSelecting ) { - mScroller->autoScroll(x, y); - + if(mScroller) + { + mScroller->autoScroll(x, y); + } S32 clamped_x = llclamp(x, mTextRect.mLeft, mTextRect.mRight); S32 clamped_y = llclamp(y, mTextRect.mBottom, mTextRect.mTop); setCursorAtLocalPos( clamped_x, clamped_y, true ); @@ -799,7 +801,10 @@ BOOL LLTextEditor::handleMouseUp(S32 x, S32 y, MASK mask) { if( mIsSelecting ) { - mScroller->autoScroll(x, y); + if(mScroller) + { + mScroller->autoScroll(x, y); + } S32 clamped_x = llclamp(x, mTextRect.mLeft, mTextRect.mRight); S32 clamped_y = llclamp(y, mTextRect.mBottom, mTextRect.mTop); setCursorAtLocalPos( clamped_x, clamped_y, true ); @@ -1696,7 +1701,15 @@ BOOL LLTextEditor::handleKeyHere(KEY key, MASK mask ) */ if (mReadOnly) { - handled = mScroller->handleKeyHere( key, mask ); + if(mScroller) + { + handled = mScroller->handleKeyHere( key, mask ); + } + else + { + handled = handleNavigationKey( key, mask ); + } + } else { @@ -2135,9 +2148,8 @@ void LLTextEditor::drawPreeditMarker() void LLTextEditor::drawLineNumbers() { LLGLSUIDefault gls_ui; - - LLRect scrolled_view_rect = mScroller->getVisibleContentRect(); - LLRect content_rect = mScroller->getContentWindowRect(); + LLRect scrolled_view_rect = getVisibleDocumentRect(); + LLRect content_rect = getTextRect(); LLLocalClipRect clip(content_rect); S32 first_line = getFirstVisibleLine(); S32 num_lines = getLineCount(); diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index a95234099c..24fa28c6cd 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -33,12 +33,10 @@ #include "llviewerprecompiledheaders.h" #include "llchathistory.h" #include "llpanel.h" -#include "lltextbox.h" -#include "lltexteditor.h" #include "lluictrlfactory.h" #include "llscrollcontainer.h" #include "llavatariconctrl.h" - +#include "lltexteditor.h" #include "llimview.h" #include "llcallingcard.h" //for LLAvatarTracker #include "llagentdata.h" @@ -188,9 +186,8 @@ public: LLTextEditor* userName = getChild("user_name"); - LLUIColor color = style_params.color; - userName->setReadOnlyColor(color); - userName->setColor(color); + userName->setReadOnlyColor(style_params.readonly_color()); + userName->setColor(style_params.color()); if(!chat.mFromName.empty()) { @@ -204,7 +201,7 @@ public: } - LLTextBox* timeBox = getChild("time_box"); + LLUICtrl* timeBox = getChild("time_box"); timeBox->setValue(chat.mTimeStr); LLAvatarIconCtrl* icon = getChild("avatar_icon"); diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp index c7c2484be3..bcf5b16aa6 100644 --- a/indra/newview/llpanelprofileview.cpp +++ b/indra/newview/llpanelprofileview.cpp @@ -43,7 +43,6 @@ #include "llpanelpicks.h" #include "llpanelprofile.h" #include "llsidetraypanelcontainer.h" -#include "lltexteditor.h" static LLRegisterPanelClassWrapper t_panel_target_profile("panel_profile_view"); @@ -191,7 +190,7 @@ void LLPanelProfileView::processOnlineStatus(bool online) void LLPanelProfileView::onAvatarNameCached(const LLUUID& id, const std::string& first_name, const std::string& last_name, BOOL is_group) { llassert(getAvatarId() == id); - getChild("user_name", FALSE)->setValue(first_name + " " + last_name); + getChild("user_name", FALSE)->setValue(first_name + " " + last_name); } void LLPanelProfileView::togglePanel(LLPanel* panel) diff --git a/indra/newview/skins/default/xui/en/panel_chat_header.xml b/indra/newview/skins/default/xui/en/panel_chat_header.xml index da175a75cd..692461b1a2 100644 --- a/indra/newview/skins/default/xui/en/panel_chat_header.xml +++ b/indra/newview/skins/default/xui/en/panel_chat_header.xml @@ -20,18 +20,19 @@ top="3" width="18" /> + value="Ericag Vader" />