From 803aa3b1aaf2fb0803620f5bb28a7047f82b10b9 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 2 Jul 2011 22:19:29 +0200 Subject: [PATCH] Add option to have the script dialog ignore the global transparency setting and use an opaque background to make it easiert to notice. Fixes FIRE-1868 --- indra/llui/lluictrl.h | 3 ++- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llscriptfloater.cpp | 15 +++++++++++++++ indra/newview/llscriptfloater.h | 2 ++ .../default/xui/en/panel_preferences_colors.xml | 15 +++++++++++++-- 5 files changed, 43 insertions(+), 3 deletions(-) diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h index b37e9f6b1b..bbe31595e5 100644 --- a/indra/llui/lluictrl.h +++ b/indra/llui/lluictrl.h @@ -209,7 +209,8 @@ public: virtual void setColor(const LLColor4& color); - F32 getCurrentTransparency(); + // Ansariel: Changed to virtual. We might want to change the transparency ourself! + virtual F32 getCurrentTransparency(); void setTransparencyType(ETypeTransparency type); ETypeTransparency getTransparencyType() const {return mTransparencyType;} diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index e5c4041320..b933b1140a 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2,6 +2,17 @@ + FSScriptDialogNoTransparency + + Comment + If true, script dialogs will be shown opaque and ignore the floater opacity settings. + Persist + 1 + Type + Boolean + Value + 0 + ShowMutedAvatarsAsCloud Comment diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 44c6806c0b..da216325cc 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -278,6 +278,21 @@ void LLScriptFloater::restorePosition() } } +// Ansariel: Override base method so we have the option to ignore +// the global transparency settings and show the script dialog +// always on opaque background. +F32 LLScriptFloater::getCurrentTransparency() +{ + if (gSavedSettings.getBOOL("FSScriptDialogNoTransparency")) + { + return 1.0; + } + else + { + return LLUICtrl::getCurrentTransparency(); + } +} + void LLScriptFloater::onFocusLost() { if(getNotificationId().notNull()) diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h index 8e959a3d0e..8a5a5485d3 100644 --- a/indra/newview/llscriptfloater.h +++ b/indra/newview/llscriptfloater.h @@ -178,6 +178,8 @@ public: void restorePosition(); + F32 getCurrentTransparency(); + protected: /** 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 a6dc75097f..46d706f0bd 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_colors.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_colors.xml @@ -460,6 +460,17 @@ top_pad="5" width="415" /> + +