diff --git a/indra/llui/llfiltereditor.cpp b/indra/llui/llfiltereditor.cpp
index f7b3a1e9a6..1ce8a6d9d0 100644
--- a/indra/llui/llfiltereditor.cpp
+++ b/indra/llui/llfiltereditor.cpp
@@ -44,3 +44,11 @@ void LLFilterEditor::handleKeystroke()
// Commit on every keystroke.
onCommit();
}
+
+// Allow any UICtrl to override the transparency with a callback
+void LLFilterEditor::setTransparencyOverrideCallback(boost::function cb)
+{
+ // Simply setting it on the LLFilterEditor object doesn't work
+ mSearchEditor->setTransparencyOverrideCallback(cb);
+}
+//
diff --git a/indra/llui/llfiltereditor.h b/indra/llui/llfiltereditor.h
index 685219c9f6..76a633eb45 100644
--- a/indra/llui/llfiltereditor.h
+++ b/indra/llui/llfiltereditor.h
@@ -45,6 +45,10 @@ public:
{};
virtual ~LLFilterEditor() {}
+ // Allow any UICtrl to override the transparency with a callback
+ void setTransparencyOverrideCallback(boost::function cb) override;
+ //
+
protected:
LLFilterEditor(const Params&);
friend class LLUICtrlFactory;
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index e23acd85b9..5f77c3346f 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -1086,6 +1086,13 @@ F32 LLUICtrl::getCurrentTransparency()
}
+ // Allow any UICtrl to override the transparency with a callback
+ if (mTransparencyOverrideCallback)
+ {
+ return mTransparencyOverrideCallback(mTransparencyType, alpha);
+ }
+ //
+
return alpha;
}
diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h
index 4be0a23261..13ab720ef4 100644
--- a/indra/llui/lluictrl.h
+++ b/indra/llui/lluictrl.h
@@ -238,6 +238,11 @@ public:
void setTransparencyType(ETypeTransparency type);
ETypeTransparency getTransparencyType() const {return mTransparencyType;}
+ // Allow any UICtrl to override the transparency with a callback
+ boost::function mTransparencyOverrideCallback;
+ virtual void setTransparencyOverrideCallback(boost::function cb) { mTransparencyOverrideCallback = cb; }
+ //
+
bool focusNextItem(bool text_entry_only);
bool focusPrevItem(bool text_entry_only);
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 473ae81e32..131a8d2b28 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -26949,5 +26949,27 @@ Change of this parameter will affect the layout of buttons in notification toast
Value
0
+ FSIMOpacity
+
+ FSImActiveOpacityOverride
+
diff --git a/indra/newview/fsfloatercontacts.cpp b/indra/newview/fsfloatercontacts.cpp
index e3f08b2ac3..03c3cd8e95 100644
--- a/indra/newview/fsfloatercontacts.cpp
+++ b/indra/newview/fsfloatercontacts.cpp
@@ -131,6 +131,9 @@ bool FSFloaterContacts::postBuild()
mFriendsCountTb->setTextArg("COUNT", llformat("%d", mFriendsList->getItemCount()));
mFriendFilter = mFriendsTab->getChild("friend_filter_input");
mFriendFilter->setCommitCallback(boost::bind(&FSFloaterContacts::onFriendFilterEdit, this, _2));
+ // [FIRE-35804] Allow the IM floater to have separate transparency
+ mFriendFilter->setTransparencyOverrideCallback(boost::bind(&FSFloaterContacts::onGetFilterOpacityCallback, this, _1, _2));
+ //
mGroupsTab = getChild(GROUP_TAB_NAME);
mGroupList = mGroupsTab->getChild("group_list");
@@ -163,6 +166,9 @@ bool FSFloaterContacts::postBuild()
mGroupssCountTb = mGroupsTab->getChild("groupcount");
mGroupFilter = mGroupsTab->getChild("group_filter_input");
mGroupFilter->setCommitCallback(boost::bind(&FSFloaterContacts::onGroupFilterEdit, this, _2));
+ // [FIRE-35804] Allow the IM floater to have separate transparency
+ mGroupFilter->setTransparencyOverrideCallback(boost::bind(&FSFloaterContacts::onGetFilterOpacityCallback, this, _1, _2));
+ //
mRlvBehaviorCallbackConnection = gRlvHandler.setBehaviourCallback(boost::bind(&FSFloaterContacts::updateRlvRestrictions, this, _1));
@@ -1345,4 +1351,19 @@ void FSFloaterContacts::onGroupFilterEdit(const std::string& search_string)
{
mGroupList->setNameFilter(search_string);
}
+
+// [FIRE-35804] Allow the IM floater to have separate transparency
+// This is specifically for making the filter editors such as mFriendFilter and mGroupFilter always active opacity when the IM floater is focused
+// Otherwise if they aren't active, it will use either the IM opacity, or inactive opacity, whatever is smaller
+F32 FSFloaterContacts::onGetFilterOpacityCallback(ETypeTransparency type, F32 alpha)
+{
+ static LLCachedControl im_opacity(gSavedSettings, "FSIMOpacity", 1.0f);
+ if (type != TT_ACTIVE)
+ {
+ return llmin(im_opacity, alpha);
+ }
+
+ return alpha;
+}
+//
// EOF
diff --git a/indra/newview/fsfloatercontacts.h b/indra/newview/fsfloatercontacts.h
index 660ed8905b..5c3061eff3 100644
--- a/indra/newview/fsfloatercontacts.h
+++ b/indra/newview/fsfloatercontacts.h
@@ -70,6 +70,10 @@ public:
void onDisplayNameChanged();
void resetFriendFilter();
+ // [FIRE-35804] Allow the IM floater to have separate transparency
+ F32 onGetFilterOpacityCallback(ETypeTransparency type, F32 alpha);
+ //
+
private:
typedef std::vector listitem_vec_t;
diff --git a/indra/newview/fsfloaterim.cpp b/indra/newview/fsfloaterim.cpp
index ef83dd0f4f..2521526440 100644
--- a/indra/newview/fsfloaterim.cpp
+++ b/indra/newview/fsfloaterim.cpp
@@ -1010,6 +1010,9 @@ bool FSFloaterIM::postBuild()
mInputEditor->setFont(LLViewerChat::getChatFont());
mInputEditor->enableSingleLineMode(gSavedSettings.getBOOL("FSUseSingleLineChatEntry"));
mInputEditor->setCommitCallback(boost::bind(&FSFloaterIM::sendMsgFromInputEditor, this, CHAT_TYPE_NORMAL));
+ // [FIRE-35804] Allow the IM floater to have separate transparency
+ mInputEditor->setTransparencyOverrideCallback(boost::bind(&FSFloaterIM::onGetChatEditorOpacityCallback, this, _1, _2));
+ //
mEmojiRecentPanelToggleBtn = getChild("emoji_recent_panel_toggle_btn");
mEmojiRecentPanelToggleBtn->setClickedCallback([this](LLUICtrl*, const LLSD&) { onEmojiRecentPanelToggleBtnClicked(); });
@@ -2650,3 +2653,18 @@ uuid_vec_t FSFloaterIM::getSessionParticipants() const
return mControlPanel->getParticipants();
}
+
+// [FIRE-35804] Allow the IM floater to have separate transparency
+// This is specifically for making the text editors such as chat_editor always active opacity when the IM floater is focused
+// Otherwise if they aren't active, it will use either the IM opacity, or inactive opacity, whatever is smaller
+F32 FSFloaterIM::onGetChatEditorOpacityCallback(ETypeTransparency type, F32 alpha)
+{
+ static LLCachedControl im_opacity(gSavedSettings, "FSIMOpacity", 1.0f);
+ if (type != TT_ACTIVE)
+ {
+ return llmin(im_opacity, alpha);
+ }
+
+ return alpha;
+}
+//
diff --git a/indra/newview/fsfloaterim.h b/indra/newview/fsfloaterim.h
index 0b5d65bf7e..3d20957063 100644
--- a/indra/newview/fsfloaterim.h
+++ b/indra/newview/fsfloaterim.h
@@ -164,6 +164,10 @@ public:
uuid_vec_t getSessionParticipants() const;
+ // [FIRE-35804] Allow the IM floater to have separate transparency
+ F32 onGetChatEditorOpacityCallback(ETypeTransparency type, F32 alpha);
+ //
+
protected:
/* virtual */
void onClickCloseBtn(bool app_quitting = false);
diff --git a/indra/newview/fsfloaterimcontainer.cpp b/indra/newview/fsfloaterimcontainer.cpp
index a4db0dc21a..19c4bd8f8a 100644
--- a/indra/newview/fsfloaterimcontainer.cpp
+++ b/indra/newview/fsfloaterimcontainer.cpp
@@ -373,6 +373,22 @@ FSFloaterIMContainer* FSFloaterIMContainer::getInstance()
return LLFloaterReg::getTypedInstance("fs_im_container");
}
+// [FIRE-35804] Allow the IM floater to have separate transparency
+F32 FSFloaterIMContainer::getCurrentTransparency()
+{
+ static LLCachedControl im_opacity(gSavedSettings, "FSIMOpacity", 1.0f);
+ static LLCachedControl im_active_opacity_override(gSavedSettings, "FSImActiveOpacityOverride", false);
+
+ F32 floater_opacity = LLUICtrl::getCurrentTransparency();
+ if (im_active_opacity_override && getTransparencyType() == TT_ACTIVE)
+ {
+ return floater_opacity;
+ }
+
+ return llmin(im_opacity(), floater_opacity);
+}
+//
+
void FSFloaterIMContainer::setVisible(bool b)
{
LLMultiFloater::setVisible(b);
diff --git a/indra/newview/fsfloaterimcontainer.h b/indra/newview/fsfloaterimcontainer.h
index 50b9b36d1f..198b32be6d 100644
--- a/indra/newview/fsfloaterimcontainer.h
+++ b/indra/newview/fsfloaterimcontainer.h
@@ -60,6 +60,8 @@ public:
static FSFloaterIMContainer* findInstance();
static FSFloaterIMContainer* getInstance();
+ F32 getCurrentTransparency() override; // [FIRE-35804] Allow the IM floater to have separate transparency
+
virtual void setVisible(bool b);
/*virtual*/ void setMinimized(bool b);
diff --git a/indra/newview/fsfloaternearbychat.cpp b/indra/newview/fsfloaternearbychat.cpp
index 80e58347e8..51e1d31fad 100644
--- a/indra/newview/fsfloaternearbychat.cpp
+++ b/indra/newview/fsfloaternearbychat.cpp
@@ -148,6 +148,9 @@ bool FSFloaterNearbyChat::postBuild()
mInputEditor->setFont(LLViewerChat::getChatFont());
mInputEditor->setLabel(getString("chatbox_label"));
mInputEditor->enableSingleLineMode(gSavedSettings.getBOOL("FSUseSingleLineChatEntry"));
+ // [FIRE-35804] Allow the IM floater to have separate transparency
+ mInputEditor->setTransparencyOverrideCallback(boost::bind(&FSFloaterNearbyChat::onGetChatBoxOpacityCallback, this, _1, _2));
+ //
mChatLayoutPanel = getChild("chat_layout_panel");
mInputPanels = getChild("input_panels");
@@ -1107,3 +1110,18 @@ uuid_vec_t FSFloaterNearbyChat::getSessionParticipants() const
return avatarIds;
}
+
+// [FIRE-35804] Allow the IM floater to have separate transparency
+// This is specifically for making the text editors such as chat_editor always active opacity when the IM floater is focused
+// Otherwise if they aren't active, it will use either the IM opacity, or inactive opacity, whatever is smaller
+F32 FSFloaterNearbyChat::onGetChatBoxOpacityCallback(ETypeTransparency type, F32 alpha)
+{
+ static LLCachedControl im_opacity(gSavedSettings, "FSIMOpacity", 1.0f);
+ if (type != TT_ACTIVE)
+ {
+ return llmin(im_opacity, alpha);
+ }
+
+ return alpha;
+}
+//
diff --git a/indra/newview/fsfloaternearbychat.h b/indra/newview/fsfloaternearbychat.h
index 37641a4be3..ee485e5498 100644
--- a/indra/newview/fsfloaternearbychat.h
+++ b/indra/newview/fsfloaternearbychat.h
@@ -104,6 +104,10 @@ public:
uuid_vec_t getSessionParticipants() const;
+ // [FIRE-35804] Allow the IM floater to have separate transparency
+ F32 onGetChatBoxOpacityCallback(ETypeTransparency type, F32 alpha);
+ //
+
protected:
void onChatBoxKeystroke();
void onChatBoxFocusLost();
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_colors.xml b/indra/newview/skins/default/xui/en/panel_preferences_colors.xml
index 8df8102615..5cfae471f2 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_colors.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_colors.xml
@@ -1857,6 +1857,34 @@
show_text="true"
top_pad="2"
width="415" />
+
+