Skip to content
Snippets Groups Projects
Commit bbc265a9 authored by Richard Linden's avatar Richard Linden
Browse files

EXP-1846 FIX Text positioning issues in Floaters, Notifications, UI, and...

EXP-1846 FIX Text positioning issues in Floaters, Notifications, UI, and toasts with UI size smaller than 1
also, re-enabled floater_test_textbox.xml
parent ce9ff40c
No related branches found
No related tags found
No related merge requests found
......@@ -215,16 +215,17 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
cur_y = ((F32)y * sScaleY) + origin.mV[VY];
// Offset y by vertical alignment.
// use unscaled font metrics here
switch (valign)
{
case TOP:
cur_y -= getAscenderHeight();
cur_y -= mFontFreetype->getAscenderHeight();
break;
case BOTTOM:
cur_y += getDescenderHeight();
cur_y += mFontFreetype->getDescenderHeight();
break;
case VCENTER:
cur_y -= (getAscenderHeight() - getDescenderHeight()) / 2.f;
cur_y -= (mFontFreetype->getAscenderHeight() - mFontFreetype->getDescenderHeight()) / 2.f;
break;
case BASELINE:
// Baseline, do nothing.
......
......@@ -8,18 +8,7 @@
help_topic="floater_test_textbox"
translate="false"
width="800">
<text
type="string"
length="1"
height="90"
layout="topleft"
left="10"
valign="bottom"
clip="true"
top_pad="30"
width="300">
___</text>
<!--<text
<text
clip_partial="true"
top_pad="10"
left="10"
......@@ -150,7 +139,7 @@ ___</text>
The 华文细黑 brown fox ヒラキjumped over the lazy dog.
</text>
--><!-- next column --><!--
<!-- next column -->
<text_editor
height="50"
follows="top|left|bottom"
......@@ -247,5 +236,5 @@ with
multiple lines
and too many lines
to actually fit
</text>-->
</text>
</floater>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment