Implemented seperate Conversations opacity options
parent
1be2b04093
commit
da395c715c
|
|
@ -1086,6 +1086,14 @@ F32 LLUICtrl::getCurrentTransparency()
|
|||
|
||||
}
|
||||
|
||||
// <FS:TJ> [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
|
||||
if (mGetIMOpacityCallback && mTransparencyType != TT_ACTIVE)
|
||||
{
|
||||
return llmin(mGetIMOpacityCallback(), alpha);
|
||||
}
|
||||
// </FS:TJ>
|
||||
|
||||
return alpha;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -238,6 +238,11 @@ public:
|
|||
void setTransparencyType(ETypeTransparency type);
|
||||
ETypeTransparency getTransparencyType() const {return mTransparencyType;}
|
||||
|
||||
// <FS:TJ> [FIRE-35804] Allow the IM floater to have separate transparency
|
||||
boost::function<F32()> mGetIMOpacityCallback;
|
||||
void setGetIMOpacityCallback (boost::function<F32()> cb) { mGetIMOpacityCallback = cb; }
|
||||
// </FS:TJ>
|
||||
|
||||
bool focusNextItem(bool text_entry_only);
|
||||
bool focusPrevItem(bool text_entry_only);
|
||||
|
||||
|
|
|
|||
|
|
@ -26773,5 +26773,27 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>FSIMOpacity</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Opacity of the IM floater</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>1.0</real>
|
||||
</map>
|
||||
<key>FSImActiveOpacityOverride</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>When enabled, uses the Active Opacity value when IM window is focused</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<real>0</real>
|
||||
</map>
|
||||
</map>
|
||||
</llsd>
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
// <FS:TJ> [FIRE-35804] Allow the IM floater to have separate transparency
|
||||
mInputEditor->setGetIMOpacityCallback(boost::bind(&FSFloaterIM::onGetIMOpacityCallback));
|
||||
// </FS:TJ>
|
||||
|
||||
mEmojiRecentPanelToggleBtn = getChild<LLButton>("emoji_recent_panel_toggle_btn");
|
||||
mEmojiRecentPanelToggleBtn->setClickedCallback([this](LLUICtrl*, const LLSD&) { onEmojiRecentPanelToggleBtnClicked(); });
|
||||
|
|
@ -2650,3 +2653,12 @@ uuid_vec_t FSFloaterIM::getSessionParticipants() const
|
|||
|
||||
return mControlPanel->getParticipants();
|
||||
}
|
||||
|
||||
// <FS:TJ> [FIRE-35804] Allow the IM floater to have separate transparency
|
||||
// static
|
||||
F32 FSFloaterIM::onGetIMOpacityCallback()
|
||||
{
|
||||
static LLCachedControl<F32> im_opacity(gSavedSettings, "FSIMOpacity", 1.0f);
|
||||
return im_opacity;
|
||||
}
|
||||
// </FS:TJ>
|
||||
|
|
|
|||
|
|
@ -164,6 +164,8 @@ public:
|
|||
|
||||
uuid_vec_t getSessionParticipants() const;
|
||||
|
||||
static F32 onGetIMOpacityCallback(); // <FS:TJ/> [FIRE-35804] Allow the IM floater to have separate transparency
|
||||
|
||||
protected:
|
||||
/* virtual */
|
||||
void onClickCloseBtn(bool app_quitting = false);
|
||||
|
|
|
|||
|
|
@ -373,6 +373,22 @@ FSFloaterIMContainer* FSFloaterIMContainer::getInstance()
|
|||
return LLFloaterReg::getTypedInstance<FSFloaterIMContainer>("fs_im_container");
|
||||
}
|
||||
|
||||
// <FS:TJ> [FIRE-35804] Allow the IM floater to have separate transparency
|
||||
F32 FSFloaterIMContainer::getCurrentTransparency()
|
||||
{
|
||||
static LLCachedControl<F32> im_opacity(gSavedSettings, "FSIMOpacity", 1.0f);
|
||||
static LLCachedControl<bool> 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);
|
||||
}
|
||||
// </FS:TJ>
|
||||
|
||||
void FSFloaterIMContainer::setVisible(bool b)
|
||||
{
|
||||
LLMultiFloater::setVisible(b);
|
||||
|
|
|
|||
|
|
@ -60,6 +60,8 @@ public:
|
|||
static FSFloaterIMContainer* findInstance();
|
||||
static FSFloaterIMContainer* getInstance();
|
||||
|
||||
F32 getCurrentTransparency() override; // <FS:TJ/> [FIRE-35804] Allow the IM floater to have separate transparency
|
||||
|
||||
virtual void setVisible(bool b);
|
||||
/*virtual*/ void setMinimized(bool b);
|
||||
|
||||
|
|
|
|||
|
|
@ -148,6 +148,9 @@ bool FSFloaterNearbyChat::postBuild()
|
|||
mInputEditor->setFont(LLViewerChat::getChatFont());
|
||||
mInputEditor->setLabel(getString("chatbox_label"));
|
||||
mInputEditor->enableSingleLineMode(gSavedSettings.getBOOL("FSUseSingleLineChatEntry"));
|
||||
// <FS:TJ> [FIRE-35804] Allow the IM floater to have separate transparency
|
||||
mInputEditor->setGetIMOpacityCallback(boost::bind(&FSFloaterIM::onGetIMOpacityCallback));
|
||||
// </FS:TJ>
|
||||
|
||||
mChatLayoutPanel = getChild<LLLayoutPanel>("chat_layout_panel");
|
||||
mInputPanels = getChild<LLLayoutStack>("input_panels");
|
||||
|
|
|
|||
|
|
@ -1857,6 +1857,34 @@
|
|||
show_text="true"
|
||||
top_pad="2"
|
||||
width="415" />
|
||||
<slider
|
||||
can_edit_text="false"
|
||||
control_name="FSIMOpacity"
|
||||
decimal_digits="2"
|
||||
follows="left|top"
|
||||
height="16"
|
||||
increment="0.01"
|
||||
initial_value="1.0"
|
||||
layout="topleft"
|
||||
label_width="115"
|
||||
label="Conversations:"
|
||||
left="50"
|
||||
max_val="1.00"
|
||||
min_val="0.00"
|
||||
name="conversations"
|
||||
show_text="true"
|
||||
top_pad="2"
|
||||
width="415" />
|
||||
<check_box
|
||||
control_name="FSImActiveOpacityOverride"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
left="49"
|
||||
height="12"
|
||||
name="override_im_active_opacity_checkbox"
|
||||
top_pad="5"
|
||||
width="450"
|
||||
label="Use Active Opacity value when the Conversations window is focused" />
|
||||
<text
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
|
|
|
|||
Loading…
Reference in New Issue