From e834e77988fcf637ee0f3e4c5c0875e47044e324 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Mon, 1 Jul 2024 21:48:34 -0400 Subject: Reduce string temporaries from findChild and getChild --- indra/llui/lllineeditor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/lllineeditor.h') diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index e955cbb17d..1cb7cac854 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -466,7 +466,7 @@ private: // Build time optimization, generate once in .cpp file #ifndef LLLINEEDITOR_CPP extern template class LLLineEditor* LLView::getChild( - const std::string& name, bool recurse) const; + std::string_view name, bool recurse) const; #endif #endif // LL_LINEEDITOR_ -- cgit v1.2.3 From 456d013ba80566bd3c142f03b1754de47c940baf Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Sun, 4 Aug 2024 15:51:21 -0400 Subject: Fix various issues with ui elements not updating colors dynamically --- indra/llui/lllineeditor.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/llui/lllineeditor.h') diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index 1cb7cac854..22ec9ecc8a 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -224,12 +224,12 @@ public: void setRevertOnEsc( bool b ) { mRevertOnEsc = b; } void setKeystrokeOnEsc(bool b) { mKeystrokeOnEsc = b; } - void setCursorColor(const LLColor4& c) { mCursorColor = c; } + void setCursorColor(const LLUIColor& c) { mCursorColor = c; } const LLColor4& getCursorColor() const { return mCursorColor.get(); } - void setFgColor( const LLColor4& c ) { mFgColor = c; } - void setReadOnlyFgColor( const LLColor4& c ) { mReadOnlyFgColor = c; } - void setTentativeFgColor(const LLColor4& c) { mTentativeFgColor = c; } + void setFgColor( const LLUIColor& c ) { mFgColor = c; } + void setReadOnlyFgColor( const LLUIColor& c ) { mReadOnlyFgColor = c; } + void setTentativeFgColor(const LLUIColor& c) { mTentativeFgColor = c; } const LLColor4& getFgColor() const { return mFgColor.get(); } const LLColor4& getReadOnlyFgColor() const { return mReadOnlyFgColor.get(); } -- cgit v1.2.3 From 409b9eebe12b864280ead8e3c537a73e40548b97 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Sun, 4 Aug 2024 20:02:53 -0400 Subject: Fix chat text segments not dynamically updating when colors changed in preferences --- indra/llui/lllineeditor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/lllineeditor.h') diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index 22ec9ecc8a..cdd22413e7 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -204,7 +204,7 @@ public: void setText(const LLStringExplicit &new_text); const std::string& getText() const override { return mText.getString(); } - LLWString getWText() const { return mText.getWString(); } + const LLWString& getWText() const { return mText.getWString(); } LLWString getConvertedText() const; // trimmed text with paragraphs converted to newlines S32 getLength() const { return mText.length(); } -- cgit v1.2.3 From 442ee9795ecde5a89df254b78465c8f4ed46845f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 4 Sep 2024 15:40:11 +0300 Subject: viewer#2411 Use font buffer in line editor --- indra/llui/lllineeditor.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/llui/lllineeditor.h') diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index cdd22413e7..12fe800acb 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -40,6 +40,7 @@ #include "llframetimer.h" #include "lleditmenuhandler.h" +#include "llfontvertexbuffer.h" #include "llspellcheckmenuhandler.h" #include "lluictrl.h" #include "lluiimage.h" @@ -344,6 +345,10 @@ protected: LLViewBorder* mBorder; const LLFontGL* mGLFont; + LLFontVertexBuffer mFontBufferPreSelection; + LLFontVertexBuffer mFontBufferSelection; + LLFontVertexBuffer mFontBufferPostSelection; + LLFontVertexBuffer mFontBufferLabel; S32 mMaxLengthBytes; // Max length of the UTF8 string in bytes S32 mMaxLengthChars; // Maximum number of characters in the string S32 mCursorPos; // I-beam is just after the mCursorPos-th character. -- cgit v1.2.3