Skip to content
Snippets Groups Projects
Commit c3573b6d authored by Cinder's avatar Cinder
Browse files

STORM-2035 - Looking for a good selection box contrast

parent 498a0e36
No related branches found
No related tags found
No related merge requests found
...@@ -267,13 +267,13 @@ void LLScriptEditor::drawSelectionBackground() ...@@ -267,13 +267,13 @@ void LLScriptEditor::drawSelectionBackground()
} }
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
const LLColor4& color = mReadOnly ? mReadOnlyBgColor : mWriteableBgColor; const LLColor4& color = mReadOnly ? mReadOnlyFgColor : mFgColor;
F32 alpha = hasFocus() ? 0.7f : 0.3f; F32 alpha = hasFocus() ? 0.7f : 0.3f;
alpha *= getDrawContext().mAlpha; alpha *= getDrawContext().mAlpha;
// We want to invert the background color in script editors // We want to shift the color to something readable but distinct
LLColor4 selection_color(1.f - color.mV[VRED], LLColor4 selection_color((1.f + color.mV[VRED]) * 0.5f,
1.f - color.mV[VGREEN], (1.f + color.mV[VGREEN]) * 0.5f,
1.f - color.mV[VBLUE], (1.f + color.mV[VBLUE]) * 0.5f,
alpha); alpha);
for (std::vector<LLRect>::iterator rect_it = selection_rects.begin(); for (std::vector<LLRect>::iterator rect_it = selection_rects.begin();
......
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