summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2025-11-19 21:05:46 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2025-11-19 21:05:46 +0200
commit093d969eb97ca03dbf4ae5cd3a3c784f58613a32 (patch)
tree916a65d49f2bfe6c12effba979bfa39417d6304a /indra/llui
parent7e09943d57ecf2d9b15249cbc19b4e2ec16f7bf3 (diff)
parentae659adab6f8d1adf0224d12fb3b379251eaa501 (diff)
Merge branch 'develop-linux' into marchcat/slua-linux
# Conflicts: # indra/newview/llfeaturemanager.cpp # indra/newview/llstartup.cpp
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/CMakeLists.txt4
-rw-r--r--indra/llui/llcheckboxctrl.h5
-rw-r--r--indra/llui/llemojihelper.h2
-rw-r--r--indra/llui/llfloater.cpp2
-rw-r--r--indra/llui/llscrolllistcell.cpp32
-rw-r--r--indra/llui/llscrolllistcell.h2
-rw-r--r--indra/llui/llviewereventrecorder.h2
7 files changed, 41 insertions, 8 deletions
diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt
index 908e94b24c..b543a12281 100644
--- a/indra/llui/CMakeLists.txt
+++ b/indra/llui/CMakeLists.txt
@@ -272,6 +272,10 @@ target_link_libraries(llui
llcommon
)
+if (USE_PRECOMPILED_HEADERS)
+ target_precompile_headers(llui REUSE_FROM llprecompiled)
+endif ()
+
# Add tests
if(LL_TESTS)
include(LLAddBuildTest)
diff --git a/indra/llui/llcheckboxctrl.h b/indra/llui/llcheckboxctrl.h
index 4068741978..3507d3f34a 100644
--- a/indra/llui/llcheckboxctrl.h
+++ b/indra/llui/llcheckboxctrl.h
@@ -124,6 +124,11 @@ public:
virtual bool isDirty() const; // Returns true if the user has modified this control.
virtual void resetDirty(); // Clear dirty state
+ LLTextBox* getTextBox() // Provide direct access to label textbox control
+ {
+ return mLabel;
+ }
+
protected:
virtual std::string _getSearchText() const
{
diff --git a/indra/llui/llemojihelper.h b/indra/llui/llemojihelper.h
index 26840eef94..0dc74b1a74 100644
--- a/indra/llui/llemojihelper.h
+++ b/indra/llui/llemojihelper.h
@@ -69,5 +69,5 @@ private:
boost::signals2::connection mHelperCommitConn;
boost::signals2::connection mHelperCloseConn;
std::function<void(llwchar)> mEmojiCommitCb;
- bool mIsHideDisabled;
+ bool mIsHideDisabled = false;
};
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 52a5e3dbd6..f609fe8105 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -248,6 +248,7 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p)
mShortTitle(p.short_title),
mSingleInstance(p.single_instance),
mReuseInstance(p.reuse_instance.isProvided() ? p.reuse_instance : p.single_instance), // reuse single-instance floaters by default
+ mIsReuseInitialized(p.reuse_instance.isProvided()),
mKey(key),
mCanTearOff(p.can_tear_off),
mCanMinimize(p.can_minimize),
@@ -3351,6 +3352,7 @@ void LLFloater::initFromParams(const LLFloater::Params& p)
mLegacyHeaderHeight = p.legacy_header_height;
mSingleInstance = p.single_instance;
mReuseInstance = p.reuse_instance.isProvided() ? p.reuse_instance : p.single_instance;
+ mIsReuseInitialized = p.reuse_instance.isProvided();
mDefaultRelativeX = p.rel_x;
mDefaultRelativeY = p.rel_y;
diff --git a/indra/llui/llscrolllistcell.cpp b/indra/llui/llscrolllistcell.cpp
index a3108d77e8..bdf88768c3 100644
--- a/indra/llui/llscrolllistcell.cpp
+++ b/indra/llui/llscrolllistcell.cpp
@@ -98,6 +98,7 @@ const LLSD LLScrollListCell::getAltValue() const
LLScrollListIcon::LLScrollListIcon(const LLScrollListCell::Params& p)
: LLScrollListCell(p),
mIcon(LLUI::getUIImage(p.value().asString())),
+ mIconSize(0),
mColor(p.color),
mAlignment(p.font_halign)
{}
@@ -140,20 +141,32 @@ void LLScrollListIcon::setValue(const LLSD& value)
}
}
-
void LLScrollListIcon::setColor(const LLColor4& color)
{
mColor = color;
}
+void LLScrollListIcon::setIconSize(S32 size)
+{
+ mIconSize = size;
+}
+
S32 LLScrollListIcon::getWidth() const
{
// if no specified fix width, use width of icon
- if (LLScrollListCell::getWidth() == 0 && mIcon.notNull())
+ if (LLScrollListCell::getWidth() != 0)
+ {
+ return LLScrollListCell::getWidth();
+ }
+ if (mIconSize != 0)
+ {
+ return mIconSize;
+ }
+ if (mIcon.notNull())
{
return mIcon->getWidth();
}
- return LLScrollListCell::getWidth();
+ return 0;
}
@@ -161,16 +174,23 @@ void LLScrollListIcon::draw(const LLColor4& color, const LLColor4& highlight_col
{
if (mIcon)
{
+ S32 draw_width = mIcon->getWidth();
+ S32 draw_height = mIcon->getHeight();
+ if (mIconSize != 0)
+ {
+ draw_width = mIconSize;
+ draw_height = mIconSize;
+ } // else will draw full icon even if cell is smaller
switch(mAlignment)
{
case LLFontGL::LEFT:
- mIcon->draw(0, 0, mColor);
+ mIcon->draw(0, 0, draw_width, draw_height, mColor);
break;
case LLFontGL::RIGHT:
- mIcon->draw(getWidth() - mIcon->getWidth(), 0, mColor);
+ mIcon->draw(getWidth() - draw_width, 0, draw_width, draw_height, mColor);
break;
case LLFontGL::HCENTER:
- mIcon->draw((getWidth() - mIcon->getWidth()) / 2, 0, mColor);
+ mIcon->draw((getWidth() - draw_width) / 2, 0, draw_width, draw_height, mColor);
break;
default:
break;
diff --git a/indra/llui/llscrolllistcell.h b/indra/llui/llscrolllistcell.h
index 7dded3c0b7..f0a0f216b4 100644
--- a/indra/llui/llscrolllistcell.h
+++ b/indra/llui/llscrolllistcell.h
@@ -197,11 +197,13 @@ public:
/*virtual*/ const LLSD getValue() const;
/*virtual*/ void setColor(const LLColor4&);
/*virtual*/ void setValue(const LLSD& value);
+ void setIconSize(S32 size);
private:
LLPointer<LLUIImage> mIcon;
LLColor4 mColor;
LLFontGL::HAlign mAlignment;
+ S32 mIconSize;
};
diff --git a/indra/llui/llviewereventrecorder.h b/indra/llui/llviewereventrecorder.h
index 5636c068d8..3bd8eb1f75 100644
--- a/indra/llui/llviewereventrecorder.h
+++ b/indra/llui/llviewereventrecorder.h
@@ -75,7 +75,7 @@ public:
bool logEvents;
std::string mLogFilename;
- llofstream mLog;
+ llofstream mLog;
private: