Merged in maxim_productengine/viewer-eep (pull request #317)

SL-10833 FIXED [EEP] Text in the Sky Altitudes boxes is low contrast and difficult to read.

Approved-by: Andrey Kleshchev <andreykproductengine@lindenlab.com>
meow-7.2.2
Rider Linden 2019-03-29 16:13:06 +00:00
commit f57a02e9ab
4 changed files with 50 additions and 25 deletions

View File

@ -96,6 +96,8 @@ LLLineEditor::Params::Params()
ignore_tab("ignore_tab", true),
is_password("is_password", false),
cursor_color("cursor_color"),
use_bg_color("use_bg_color", false),
bg_color("bg_color"),
text_color("text_color"),
text_readonly_color("text_readonly_color"),
text_tentative_color("text_tentative_color"),
@ -150,10 +152,12 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p)
mBgImageDisabled( p.background_image_disabled ),
mBgImageFocused( p.background_image_focused ),
mShowImageFocused( p.bg_image_always_focused ),
mUseBgColor(p.use_bg_color),
mHaveHistory(FALSE),
mReplaceNewlinesWithSpaces( TRUE ),
mLabel(p.label),
mCursorColor(p.cursor_color()),
mBgColor(p.bg_color()),
mFgColor(p.text_color()),
mReadOnlyFgColor(p.text_readonly_color()),
mTentativeFgColor(p.text_tentative_color()),
@ -1681,37 +1685,42 @@ void LLLineEditor::doDelete()
void LLLineEditor::drawBackground()
{
bool has_focus = hasFocus();
LLUIImage* image;
if ( mReadOnly )
F32 alpha = getCurrentTransparency();
if (mUseBgColor)
{
image = mBgImageDisabled;
}
else if ( has_focus || mShowImageFocused)
{
image = mBgImageFocused;
gl_rect_2d(getLocalRect(), mBgColor % alpha, TRUE);
}
else
{
image = mBgImage;
}
bool has_focus = hasFocus();
LLUIImage* image;
if (mReadOnly)
{
image = mBgImageDisabled;
}
else if (has_focus || mShowImageFocused)
{
image = mBgImageFocused;
}
else
{
image = mBgImage;
}
if (!image) return;
F32 alpha = getCurrentTransparency();
// optionally draw programmatic border
if (has_focus)
{
LLColor4 tmp_color = gFocusMgr.getFocusColor();
if (!image) return;
// optionally draw programmatic border
if (has_focus)
{
LLColor4 tmp_color = gFocusMgr.getFocusColor();
tmp_color.setAlpha(alpha);
image->drawBorder(0, 0, getRect().getWidth(), getRect().getHeight(),
tmp_color,
gFocusMgr.getFocusFlashWidth());
}
LLColor4 tmp_color = UI_VERTEX_COLOR;
tmp_color.setAlpha(alpha);
image->drawBorder(0, 0, getRect().getWidth(), getRect().getHeight(),
tmp_color,
gFocusMgr.getFocusFlashWidth());
image->draw(getLocalRect(), tmp_color);
}
LLColor4 tmp_color = UI_VERTEX_COLOR;
tmp_color.setAlpha(alpha);
image->draw(getLocalRect(), tmp_color);
}
void LLLineEditor::draw()

View File

@ -91,10 +91,12 @@ public:
commit_on_focus_lost,
ignore_tab,
bg_image_always_focused,
is_password;
is_password,
use_bg_color;
// colors
Optional<LLUIColor> cursor_color,
bg_color,
text_color,
text_readonly_color,
text_tentative_color,
@ -365,6 +367,7 @@ protected:
LLTimer mTripleClickTimer;
LLUIColor mCursorColor;
LLUIColor mBgColor;
LLUIColor mFgColor;
LLUIColor mReadOnlyFgColor;
LLUIColor mTentativeFgColor;
@ -385,6 +388,8 @@ protected:
BOOL mShowImageFocused;
bool mUseBgColor;
LLWString mPreeditWString;
LLWString mPreeditOverwrittenWString;
std::vector<S32> mPreeditPositions;

View File

@ -253,6 +253,8 @@
height="20"
layout="topleft"
name="edt_invname_alt1"
use_bg_color="true"
bg_color="TextBgReadOnlyColor"
width="155">
Unknown
</line_editor>
@ -297,6 +299,8 @@
height="20"
layout="topleft"
name="edt_invname_alt2"
use_bg_color="true"
bg_color="TextBgReadOnlyColor"
width="155">
Unknown
</line_editor>
@ -342,6 +346,8 @@
height="20"
layout="topleft"
name="edt_invname_alt3"
use_bg_color="true"
bg_color="TextBgReadOnlyColor"
width="155">
Unknown
</line_editor>
@ -460,6 +466,8 @@
height="20"
layout="topleft"
name="edt_invname_ground"
use_bg_color="true"
bg_color="TextBgReadOnlyColor"
width="155">
Unknown
</line_editor>
@ -514,6 +522,8 @@
height="20"
layout="topleft"
name="edt_invname_water"
use_bg_color="true"
bg_color="TextBgReadOnlyColor"
width="155">
Unknown
</line_editor>

View File

@ -6,6 +6,7 @@
commit_on_focus_lost="true"
ignore_tab="true"
cursor_color="TextCursorColor"
bg_color="White"
text_color="TextFgColor"
text_pad_left="2"
text_readonly_color="TextFgReadOnlyColor"