summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/llsliderctrl.cpp3
-rw-r--r--indra/llui/llsliderctrl.h4
-rw-r--r--indra/llui/lltexteditor.cpp26
-rw-r--r--indra/newview/llchathistory.cpp12
-rw-r--r--indra/newview/llpanelprofileview.cpp2
-rw-r--r--indra/newview/skins/default/xui/en/floater_test_slider.xml15
-rw-r--r--indra/newview/skins/default/xui/en/panel_chat_header.xml24
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile_view.xml7
8 files changed, 61 insertions, 32 deletions
diff --git a/indra/llui/llsliderctrl.cpp b/indra/llui/llsliderctrl.cpp
index a4f89ae1d3..01c274bb4e 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<Params, LLF32UICtrl::Params>
{
+ Optional<std::string> orientation;
Optional<S32> label_width;
Optional<S32> text_width;
Optional<bool> 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/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 4ce3b50ed5..24fa28c6cd 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -33,11 +33,10 @@
#include "llviewerprecompiledheaders.h"
#include "llchathistory.h"
#include "llpanel.h"
-#include "lltextbox.h"
#include "lluictrlfactory.h"
#include "llscrollcontainer.h"
#include "llavatariconctrl.h"
-
+#include "lltexteditor.h"
#include "llimview.h"
#include "llcallingcard.h" //for LLAvatarTracker
#include "llagentdata.h"
@@ -185,11 +184,10 @@ public:
mSourceType = CHAT_SOURCE_SYSTEM;
}
- LLTextBox* userName = getChild<LLTextBox>("user_name");
+ LLTextEditor* userName = getChild<LLTextEditor>("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())
{
@@ -203,7 +201,7 @@ public:
}
- LLTextBox* timeBox = getChild<LLTextBox>("time_box");
+ LLUICtrl* timeBox = getChild<LLUICtrl>("time_box");
timeBox->setValue(chat.mTimeStr);
LLAvatarIconCtrl* icon = getChild<LLAvatarIconCtrl>("avatar_icon");
diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp
index d4ab5013f9..bcf5b16aa6 100644
--- a/indra/newview/llpanelprofileview.cpp
+++ b/indra/newview/llpanelprofileview.cpp
@@ -190,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<LLTextBox>("user_name", FALSE)->setValue(first_name + " " + last_name);
+ getChild<LLUICtrl>("user_name", FALSE)->setValue(first_name + " " + last_name);
}
void LLPanelProfileView::togglePanel(LLPanel* panel)
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 @@
<floater
legacy_header_height="18"
can_resize="true"
- height="400"
+ height="500"
layout="topleft"
name="floater_test_slider"
help_topic="floater_test_slider"
@@ -84,4 +84,17 @@
name="red_slider"
text_color="red"
text_width="40" />
+ <slider
+ width ="140"
+ bottom="490"
+ decimal_digits="1"
+ height="100"
+ left="20"
+ label="Red Slider Vertical"
+ label_width="100"
+ layout="topleft"
+ name="red_slider_vertical"
+ text_color="red"
+ orientation="vertical"
+ text_width="20" />
</floater>
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..692461b1a2 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 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
- background_visible="true"
+ background_visible="true"
bevel_style="in"
bg_alpha_color="black"
follows="top|left|right"
height="24"
label="im_header"
- layout="topleft"
+ layout="topleft"
name="im_header"
width="300">
- <avatar_icon
+ <avatar_icon
follows="left"
height="18"
image_name="Generic_Person"
@@ -19,18 +19,20 @@
name="avatar_icon"
top="3"
width="18" />
- <text
+ <text_editor
+ v_pad = "0"
+ read_only = "true"
follows="left|right"
- font.style="BOLD"
- height="12"
- layout="topleft"
- left_pad="5"
+ font.style="BOLD"
+ height="12"
+ layout="topleft"
+ left_pad="5"
right="-50"
name="user_name"
text_color="white"
- top="8"
- use_ellipses="true"
- value="Erica Vader" />
+ top="8"
+ use_ellipses="true"
+ value="Ericag Vader" />
<text
font="SansSerifSmall"
follows="right"
diff --git a/indra/newview/skins/default/xui/en/panel_profile_view.xml b/indra/newview/skins/default/xui/en/panel_profile_view.xml
index b015346a79..8e683bffc1 100644
--- a/indra/newview/skins/default/xui/en/panel_profile_view.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile_view.xml
@@ -25,10 +25,11 @@
tab_stop="false"
top="2"
width="23" />
- <text
+ <text_editor
+ read_only = "true"
follows="top|left|right"
font="SansSerifHugeBold"
- height="26"
+ height="29"
layout="topleft"
left_pad="10"
name="user_name"
@@ -52,7 +53,7 @@
halign="center"
layout="topleft"
left="10"
- min_width="333"
+ min_width="333"
name="tabs"
tab_min_width="80"
tab_height="30"