#3778 #3654 Split text and background selection colors

master
Andrey Kleshchev 2025-03-20 19:37:25 +02:00 committed by Andrey Kleshchev
parent bb914ab5e3
commit d2dd881a5c
6 changed files with 16 additions and 7 deletions

View File

@ -837,7 +837,7 @@ void LLButton::draw()
// Highlight if needed
if( ll::ui::SearchableControl::getHighlighted() )
label_color = ll::ui::SearchableControl::getHighlightColor();
label_color = ll::ui::SearchableControl::getHighlightFontColor();
// overlay with keyboard focus border
if (hasFocus())

View File

@ -508,7 +508,7 @@ void LLMenuItemGL::draw( void )
// Highlight if needed
if( ll::ui::SearchableControl::getHighlighted() )
color = ll::ui::SearchableControl::getHighlightColor();
color = ll::ui::SearchableControl::getHighlightFontColor();
// Draw the text on top.
if (mBriefItem)

View File

@ -3394,7 +3394,7 @@ bool LLScrollListCtrl::highlightMatchingItems(const std::string& filter_str)
bool res = false;
setHighlightedColor(LLUIColorTable::instance().getColor("SearchableControlHighlightColor", LLColor4::red4));
setHighlightedColor(LLUIColorTable::instance().getColor("SearchableControlHighlightBgColor", LLColor4::red4));
std::string filter_str_lc(filter_str);
LLStringUtil::toLower(filter_str_lc);

View File

@ -43,9 +43,15 @@ namespace ll
virtual ~SearchableControl()
{ }
const LLColor4& getHighlightColor( ) const
const LLColor4& getHighlightBgColor( ) const
{
static LLUIColor highlight_color = LLUIColorTable::instance().getColor("SearchableControlHighlightColor", LLColor4::red4);
static LLUIColor highlight_color = LLUIColorTable::instance().getColor("SearchableControlHighlightBgColor", LLColor4::red4);
return highlight_color.get();
}
const LLColor4& getHighlightFontColor() const
{
static LLUIColor highlight_color = LLUIColorTable::instance().getColor("SearchableControlHighlightFontColor", LLColor4::red4);
return highlight_color.get();
}

View File

@ -1378,7 +1378,7 @@ void LLTextBase::draw()
// Draw highlighted if needed
if( ll::ui::SearchableControl::getHighlighted() )
{
const LLColor4& bg_color = ll::ui::SearchableControl::getHighlightColor();
const LLColor4& bg_color = ll::ui::SearchableControl::getHighlightBgColor();
LLRect bg_rect = mVisibleTextRect;
if( mScroller )
bg_rect.intersectWith( text_rect );

View File

@ -759,7 +759,10 @@
name="SelectedOutfitTextColor"
reference="EmphasisColor" />
<color
name="SearchableControlHighlightColor"
name="SearchableControlHighlightFontColor"
value="1 0 0 1" />
<color
name="SearchableControlHighlightBgColor"
value="0.5 0.1 0.1 1" />
<color
name="SilhouetteChildColor"