Automated merge with ssh://hg.lindenlab.com/richard/viewer-experience

meow-7.2.2
Richard Linden 2012-02-03 19:05:04 -08:00
commit 8b44dafd8f
13 changed files with 319 additions and 131 deletions

View File

@ -185,9 +185,6 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
//gGL.translateUI(-pixel_offset_x, -pixel_offset_y, 0.f);
LLVector2 origin(floorf(sCurOrigin.mX*sScaleX), floorf(sCurOrigin.mY*sScaleY));
// snap the text origin to a pixel grid to start with
origin.mV[VX] -= llround((F32)sCurOrigin.mX) - (sCurOrigin.mX);
origin.mV[VY] -= llround((F32)sCurOrigin.mY) - (sCurOrigin.mY);
// Depth translation, so that floating text appears 'inworld'
// and is correclty occluded.

View File

@ -2395,10 +2395,21 @@ void LLTextBase::updateRects()
}
mTextBoundingRect.mTop += mVPad;
//// subtract a pixel off the bottom to deal with rounding errors in measuring font height
//mTextBoundingRect.mBottom -= 1;
S32 delta_pos = -mTextBoundingRect.mBottom;
S32 delta_pos = 0;
switch(mVAlign)
{
case LLFontGL::TOP:
delta_pos = llmax(mVisibleTextRect.mTop - mTextBoundingRect.mTop, -mTextBoundingRect.mBottom);
break;
case LLFontGL::VCENTER:
delta_pos = (llmax(mVisibleTextRect.mTop - mTextBoundingRect.mTop, -mTextBoundingRect.mBottom) + (mVisibleTextRect.mBottom - mTextBoundingRect.mBottom)) / 2;
break;
case LLFontGL::BOTTOM:
delta_pos = mVisibleTextRect.mBottom - mTextBoundingRect.mBottom;
break;
}
// move line segments to fit new document rect
for (line_list_t::iterator it = mLineInfoList.begin(); it != mLineInfoList.end(); ++it)
{
@ -2408,8 +2419,9 @@ void LLTextBase::updateRects()
}
// update document container dimensions according to text contents
LLRect doc_rect = mTextBoundingRect;
LLRect doc_rect;
// use old mVisibleTextRect constraint document to width of viewable region
doc_rect.mBottom = llmin(mVisibleTextRect.mBottom, mTextBoundingRect.mBottom);
doc_rect.mLeft = 0;
// allow horizontal scrolling?
@ -2419,11 +2431,22 @@ void LLTextBase::updateRects()
doc_rect.mRight = mScroller
? llmax(mVisibleTextRect.getWidth(), mTextBoundingRect.mRight)
: mVisibleTextRect.getWidth();
doc_rect.mTop = llmax(mVisibleTextRect.mTop, mTextBoundingRect.mTop);
if (!mScroller)
{
// push doc rect to top of text widget
doc_rect.translate(0, mVisibleTextRect.getHeight() - doc_rect.mTop);
switch(mVAlign)
{
case LLFontGL::TOP:
doc_rect.translate(0, mVisibleTextRect.getHeight() - doc_rect.mTop);
break;
case LLFontGL::VCENTER:
doc_rect.translate(0, (mVisibleTextRect.getHeight() - doc_rect.mTop) / 2);
case LLFontGL::BOTTOM:
default:
break;
}
}
mDocumentView->setShape(doc_rect);
@ -2444,9 +2467,27 @@ void LLTextBase::updateRects()
}
// update document container again, using new mVisibleTextRect (that has scrollbars enabled as needed)
doc_rect.mBottom = llmin(mVisibleTextRect.mBottom, mTextBoundingRect.mBottom);
doc_rect.mLeft = 0;
doc_rect.mRight = mScroller
? llmax(mVisibleTextRect.getWidth(), mTextBoundingRect.mRight)
: mVisibleTextRect.getWidth();
doc_rect.mTop = llmax(mVisibleTextRect.mTop, mTextBoundingRect.mTop);
if (!mScroller)
{
// push doc rect to top of text widget
switch(mVAlign)
{
case LLFontGL::TOP:
doc_rect.translate(0, mVisibleTextRect.getHeight() - doc_rect.mTop);
break;
case LLFontGL::VCENTER:
doc_rect.translate(0, (mVisibleTextRect.getHeight() - doc_rect.mTop) / 2);
case LLFontGL::BOTTOM:
default:
break;
}
}
mDocumentView->setShape(doc_rect);
}

View File

@ -180,6 +180,7 @@ LLToolTip::LLToolTip(const LLToolTip::Params& p)
params.font = p.font;
params.use_ellipses = true;
params.wrap = p.wrap;
params.font_valign = LLFontGL::VCENTER;
params.parse_urls = false; // disallow hyperlinks in tooltips, as they want to spawn their own explanatory tooltips
mTextBox = LLUICtrlFactory::create<LLTextBox> (params);
addChild(mTextBox);
@ -190,7 +191,6 @@ LLToolTip::LLToolTip(const LLToolTip::Params& p)
{
LLButton::Params icon_params;
icon_params.name = "tooltip_info";
icon_params.label(""); // provid label but set to empty so name does not overwrite it -angela
LLRect icon_rect;
LLUIImage* imagep = p.image;
TOOLTIP_ICON_SIZE = (imagep ? imagep->getWidth() : 16);
@ -291,6 +291,12 @@ void LLToolTip::initFromParams(const LLToolTip::Params& p)
S32 text_width = llmin(p.max_width(), mTextBox->getTextPixelWidth());
S32 text_height = mTextBox->getTextPixelHeight();
mTextBox->reshape(text_width, text_height);
if (mInfoButton)
{
LLRect text_rect = mTextBox->getRect();
LLRect icon_rect = mInfoButton->getRect();
mTextBox->translate(0, icon_rect.getCenterY() - text_rect.getCenterY());
}
// reshape tooltip panel to fit text box
LLRect tooltip_rect = calcBoundingRect();
@ -299,6 +305,8 @@ void LLToolTip::initFromParams(const LLToolTip::Params& p)
tooltip_rect.mBottom = 0;
tooltip_rect.mLeft = 0;
mTextBox->reshape(mTextBox->getRect().getWidth(), llmax(mTextBox->getRect().getHeight(), tooltip_rect.getHeight() - 2 * mPadding));
setShape(tooltip_rect);
}

View File

@ -1901,7 +1901,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
}
}
LL_WARNS_ONCE("Plugin") << "plugin intialization failed for mime type: " << media_type << LL_ENDL;
LL_WARNS_ONCE("Plugin") << "plugin initialization failed for mime type: " << media_type << LL_ENDL;
LLSD args;
args["MIME_TYPE"] = media_type;
LLNotificationsUtil::add("NoPlugin", args);

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
legacy_header_height="18"
can_minimize="false"
can_tear_off="false"
can_resize="true"
@ -16,67 +15,98 @@
save_dock_state="true"
save_visibility="true"
single_instance="true"
width="320">
<string name="nudge_parabuild" translate="false">Nudge 1</string>
<string name="test_the_vlt">This string CHANGE2 is extracted.</string>
<string name="testing_eli">Just a test. changes.</string>
<text_editor
parse_urls="true"
bg_readonly_color="ChatHistoryBgColor"
bg_writeable_color="ChatHistoryBgColor"
border_visible="false"
follows="all"
font="SansSerif"
left="1"
top="20"
layout="topleft"
height="260"
name="chat_history"
max_length="200000"
parse_highlights="true"
text_color="ChatHistoryTextColor"
text_readonly_color="ChatHistoryTextColor"
translate="false"
track_end="true"
wrap="true"
width="320">
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
Really long line that is long enough to wrap once with jyg descenders.
</text_editor>
width="650">
<text left="0"
follows="left|top|bottom"
top="5"
clip_partial="true"
bottom="-5"
width="100"
valign="top">
this
is
some
text
that
is
top
aligned</text>
<text left_pad="5"
follows="left|top|bottom"
top="5"
bottom="-5"
clip_partial="true"
width="100"
valign="center">
this
is
some
text
that
is
center
aligned</text>
<text left_pad="5"
follows="left|top|bottom"
top="5"
clip_partial="true"
bottom="-5"
width="100"
valign="bottom">
this
is
some
text
that
is
bottom
aligned</text>
<text_editor left_pad="5"
follows="left|top|bottom"
top="5"
clip_partial="true"
bottom="-5"
width="100"
valign="top">
this
is
some
text
that
is
top
aligned
</text_editor>
<text_editor left_pad="5"
follows="left|top|bottom"
top="5"
bottom="-5"
clip_partial="true"
width="100"
valign="center">
this
is
some
text
that
is
center
aligned
</text_editor>
<text_editor left_pad="5"
follows="left|top|bottom"
top="5"
clip_partial="true"
bottom="-5"
width="100"
valign="bottom">
this
is
some
text
that
is
bottom
aligned
</text_editor>
</floater>

View File

@ -197,7 +197,7 @@
left_pad="2"
valign="center"
name="ContentRatingText"
top_delta="0"
top_delta="-2"
width="250">
Adult
</text>
@ -209,7 +209,7 @@
layout="topleft"
left="10"
name="Owner:"
top_pad="1"
top_pad="3"
width="100">
Owner:
</text>
@ -736,7 +736,7 @@
height="16"
layout="topleft"
left_pad="10"
top_delta="-3"
top_delta="-1"
mouse_opaque="false"
name="region_maturity_text"
valign="center"

View File

@ -99,7 +99,7 @@
halign="center"
font="SansSerifMedium"
font_shadow="hard"
valign="bottom">
valign="top">
Drag items here to create folders
</text>
</panel>
@ -114,8 +114,8 @@
height="20"
wrap="true"
halign="left"
valign="bottom"
font="SansSerif" />
valign="center"
font="SansSerif"/>
<button
label="Send to Marketplace"
tool_tip="Push to my Marketplace Storefront"

View File

@ -117,18 +117,18 @@
name="lod_tab_border"
top_pad="0"
width="619" />
<text
follows="left|top"
height="18"
initial_value="Source"
layout="topleft"
left="75"
name="source"
text_color="ModelUploaderLabels"
top="15"
valign="center"
value="Source"
width="335" />
<text
follows="left|top"
height="18"
initial_value="Source"
layout="topleft"
left="75"
name="source"
text_color="ModelUploaderLabels"
top="15"
valign="center"
value="Source"
width="335"/>
<text
follows="left|top"
halign="right"
@ -163,7 +163,7 @@
name="high_label"
text_color="ModelUploaderLabels"
top_pad="10"
valign="center"
valign="top"
value="High"
width="65" />
<combo_box
@ -240,34 +240,34 @@
<text
follows="left|top"
halign="right"
height="18"
height="15"
initial_value="0"
layout="topleft"
left_pad="0"
name="high_triangles"
valign="center"
valign="top"
value="0"
width="65" />
<text
follows="left|top"
halign="right"
height="18"
height="15"
initial_value="0"
layout="topleft"
left_pad="0"
name="high_vertices"
valign="center"
valign="top"
value="0"
width="65" />
<text
follows="left|top"
halign="center"
height="18"
height="15"
initial_value=""
layout="topleft"
left_pad="0"
name="high_status"
valign="center"
valign="top"
value=""
width="65" />
<icon
@ -277,7 +277,7 @@
left_delta="20"
mouse_opaque="true"
name="status_icon_high"
top_delta="0"
top_delta="-2"
width="16" />
<text
follows="left|top"
@ -288,7 +288,7 @@
name="medium_label"
text_color="ModelUploaderLabels"
top_pad="15"
valign="center"
valign="top"
value="Medium"
width="65" />
<combo_box
@ -368,34 +368,34 @@
<text
follows="left|top"
halign="right"
height="18"
height="15"
initial_value="0"
layout="topleft"
left_pad="0"
name="medium_triangles"
valign="center"
valign="top"
value="0"
width="65" />
<text
follows="left|top"
halign="right"
height="18"
height="15"
initial_value="0"
layout="topleft"
left_pad="0"
name="medium_vertices"
valign="center"
valign="top"
value="0"
width="65" />
<text
follows="left|top"
halign="center"
height="18"
height="15"
initial_value=""
layout="topleft"
left_pad="0"
name="medium_status"
valign="center"
valign="top"
value=""
width="65" />
<icon
@ -405,7 +405,7 @@
left_delta="20"
mouse_opaque="true"
name="status_icon_medium"
top_delta="0"
top_delta="-2"
width="16" />
<text
follows="left|top"
@ -416,7 +416,7 @@
name="low_label"
text_color="ModelUploaderLabels"
top_pad="15"
valign="center"
valign="top"
value="Low"
width="65" />
<combo_box
@ -496,34 +496,34 @@
<text
follows="left|top"
halign="right"
height="18"
height="15"
initial_value="0"
layout="topleft"
left_pad="0"
name="low_triangles"
valign="center"
valign="top"
value="0"
width="65" />
<text
follows="left|top"
halign="right"
height="18"
height="15"
initial_value="0"
layout="topleft"
left_pad="0"
name="low_vertices"
valign="center"
valign="top"
value="0"
width="65" />
<text
follows="left|top"
halign="center"
height="18"
height="15"
initial_value=""
layout="topleft"
left_pad="0"
name="low_status"
valign="center"
valign="top"
value=""
width="65" />
<icon
@ -533,7 +533,7 @@
left_delta="20"
mouse_opaque="true"
name="status_icon_low"
top_delta="0"
top_delta="-2"
width="16" />
<text
follows="left|top"
@ -544,7 +544,7 @@
name="lowest_label"
text_color="ModelUploaderLabels"
top_pad="15"
valign="center"
valign="top"
value="Lowest"
width="65" />
<combo_box
@ -624,34 +624,34 @@
<text
follows="left|top"
halign="right"
height="18"
height="15"
initial_value="0"
layout="topleft"
left_pad="0"
name="lowest_triangles"
valign="center"
valign="top"
value="0"
width="65" />
<text
follows="left|top"
halign="right"
height="18"
height="15"
initial_value="0"
layout="topleft"
left_pad="0"
name="lowest_vertices"
valign="center"
valign="top"
value="0"
width="65" />
<text
follows="left|top"
halign="center"
height="18"
height="15"
initial_value=""
layout="topleft"
left_pad="0"
name="lowest_status"
valign="center"
valign="top"
value=""
width="65" />
<icon

View File

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
can_minimize="false"
can_tear_off="false"
can_resize="true"
can_drag_on_left="false"
can_close="true"
can_dock="true"
bevel_style="in"
height="300"
layout="topleft"
name="Test Floater"
save_rect="true"
title="TEST FLOATER"
save_dock_state="true"
save_visibility="true"
single_instance="true"
width="650">
<text left="0"
follows="left|top|bottom"
top="5"
clip_partial="true"
bottom="-5"
width="100"
valign="top">
this
is
some
text
that
is
top
aligned</text>
<text left_pad="5"
follows="left|top|bottom"
top="5"
bottom="-5"
clip_partial="true"
width="100"
valign="center">
this
is
some
text
that
is
center
aligned</text>
<text left_pad="5"
follows="left|top|bottom"
top="5"
clip_partial="true"
bottom="-5"
width="100"
valign="bottom">
this
is
some
text
that
is
bottom
aligned</text>
<text_editor left_pad="5"
follows="left|top|bottom"
top="5"
clip_partial="true"
bottom="-5"
width="100"
valign="top">
this
is
some
text
that
is
top
aligned
</text_editor>
<text_editor left_pad="5"
follows="left|top|bottom"
top="5"
bottom="-5"
clip_partial="true"
width="100"
valign="center">
this
is
some
text
that
is
center
aligned
</text_editor>
<text_editor left_pad="5"
follows="left|top|bottom"
top="5"
clip_partial="true"
bottom="-5"
width="100"
valign="bottom">
this
is
some
text
that
is
bottom
aligned
</text_editor>
</floater>

View File

@ -18,7 +18,7 @@
<text
follows="left|top"
font="SansSerifMedium"
valign="bottom"
valign="top"
halign="left"
height="20"
layout="topleft"
@ -33,7 +33,7 @@
<text
follows="left|top"
font="SansSerifMedium"
valign="bottom"
valign="top"
halign="left"
height="20"
layout="topleft"

View File

@ -23,7 +23,7 @@
<text
parse_urls="false"
allow_scroll="false"
v_pad = "7"
v_pad = "6"
read_only = "true"
follows="left|right"
font.style="BOLD"
@ -37,7 +37,7 @@
top="0"
translate="false"
use_ellipses="true"
valign="bottom"
valign="top"
value="TestString PleaseIgnore" />
<text
allow_scroll="false"
@ -49,7 +49,7 @@
left_pad="5"
name="time_box"
right="-5"
top="8"
top="7"
value="23:30"
width="110" />
</panel>

View File

@ -16,13 +16,13 @@
top="3"
width="18" />
<text_chat
top="5"
top="3"
left="30"
height="120"
text_color="white"
word_wrap="true"
mouse_opaque="true"
valign="bottom"
valign="top"
name="msg_text">
</text_chat>
</panel>

View File

@ -11,7 +11,7 @@ label_pad_left - padding to the left of tab button labels
halign="center"
font="SansSerifSmall"
tab_height="21"
label_pad_bottom="0"
label_pad_bottom="1"
label_pad_left="4">
<!--
Possible additional attributes for tabs: