Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce LLUIColorTable debug-settings-alike floater and fix various color system bugs #2190

Merged
merged 6 commits into from
Aug 5, 2024

Conversation

RyeMutt
Copy link
Contributor

@RyeMutt RyeMutt commented Aug 5, 2024

  • Introduce a floater that can access LLUIColortable and update/reset color settings
  • Fix chat colors not dynamically updating when changed in preferences
  • Fix script editors not dynamically updating when changed in script editor preferences
  • Introduce alpha parameter to LLStyle to allow setting text UI color alpha at runtime without breaking reference to color table
  • Cache and optimize various color finds during draw
    secondlife-bin_PqC1iTCO8o
    secondlife-bin_Oyci8svenn
    secondlife-bin_yyQDD3WWFn

@@ -152,6 +152,7 @@ void LLFloaterIMNearbyChatToastPanel::addMessage(LLSD& notification)
{
LLStyle::Params style_params;
style_params.color(textColor);
style_params.alpha(textAlpha);
Copy link
Contributor

@akleshchev akleshchev Aug 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is undoubtfully a good change, but perhaps this should be in a different review? Adding alpha and background to text is a bit out of scope for a color debug floater.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was to replicate the previous behavior in https://github.com/secondlife/viewer/pull/2190/files#diff-b22849a085421bd71afc6b02046ac27f258e5c4ebc9c524b541653ab44174229L104 but without breaking the color reference and thus dynamic updates. I could try to separate out the bug fixes from the new floaterif that would be easier.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fine to keep it together if they are troublesome to separate. But please, separately note those alpha changes in review's header, just in case.

@akleshchev
Copy link
Contributor

akleshchev commented Aug 5, 2024

A lot of macOS build errors related to streams, like:

In file included from /Users/runner/work/viewer/viewer/indra/llcommon/llunits.h:31:
/Users/runner/work/viewer/viewer/indra/llcommon/llunittype.h:241:15: note: candidate template ignored: could not match 'LLUnit<type-parameter-0-0, type-parameter-0-1>' against 'LLUIColor'
std::ostream& operator <<(std::ostream& s, const LLUnit<STORAGE_TYPE, UNITS>& unit)
              ^

In file included from /Users/runner/work/viewer/viewer/indra/llrender/llrender.h:44:
/Users/runner/work/viewer/viewer/indra/llmath/llmatrix4a.h:263:22: note: candidate function not viable: no known conversion from 'LLUIColor' to 'const LLMatrix4a' for 2nd argument
inline std::ostream& operator<<(std::ostream& s, const LLMatrix4a& m)
                     ^

In file included from /Users/runner/work/viewer/viewer/indra/llmath/v4math.h:33:
/Users/runner/work/viewer/viewer/indra/llmath/v2math.h:434:22: note: candidate function not viable: no known conversion from 'LLUIColor' to 'const LLVector2' for 2nd argument
inline std::ostream& operator<<(std::ostream& s, const LLVector2 &a)
                     ^

Copy link
Contributor

@marchcat marchcat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build looks fine now.

Thank you for the contribution!

@marchcat marchcat added this to the Develop milestone Aug 5, 2024
@marchcat marchcat merged commit 693c217 into secondlife:develop Aug 5, 2024
11 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants