summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp2
-rw-r--r--indra/llui/llfloater.cpp38
2 files changed, 27 insertions, 13 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index 2c9fb35588..3d2eaed5c5 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -126,7 +126,7 @@ void LLPluginClassMedia::reset()
mCanPaste = false;
mMediaName.clear();
mMediaDescription.clear();
- mBackgroundColor = LLColor4::white;
+ mBackgroundColor = LLColor4(1.0f, 1.0f, 1.0f, 1.0f);
// media_browser class
mNavigateURI.clear();
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index a35d279500..a17e306325 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -1067,10 +1067,6 @@ void LLFloater::setMinimized(BOOL minimize)
reshape( mExpandedRect.getWidth(), mExpandedRect.getHeight(), TRUE );
}
- // don't show the help button while minimized - it's
- // not very useful when minimized and uses up space
- mButtonsEnabled[BUTTON_HELP] = !minimize;
-
applyTitle ();
make_ui_sound("UISndWindowClose");
@@ -1743,14 +1739,32 @@ void LLFloater::updateButtons()
S32 button_count = 0;
for (S32 i = 0; i < BUTTON_COUNT; i++)
{
- if(!mButtons[i]) continue;
- mButtons[i]->setEnabled(mButtonsEnabled[i]);
+ if (!mButtons[i])
+ {
+ continue;
+ }
- if (mButtonsEnabled[i]
- //*HACK: always render close button for hosted floaters
- // so that users don't accidentally hit the button when closing multiple windows
- // in the chatterbox
- || (i == BUTTON_CLOSE && mButtonScale != 1.f))
+ bool enabled = mButtonsEnabled[i];
+ if (i == BUTTON_HELP)
+ {
+ // don't show the help button if the floater is minimized
+ // or if it is a tear-off hosted floater
+ if (isMinimized() || mButtonsEnabled[BUTTON_TEAR_OFF])
+ {
+ enabled = false;
+ }
+ }
+ if (i == BUTTON_CLOSE && mButtonScale != 1.f)
+ {
+ //*HACK: always render close button for hosted floaters so
+ //that users don't accidentally hit the button when
+ //closing multiple windows in the chatterbox
+ enabled = true;
+ }
+
+ mButtons[i]->setEnabled(enabled);
+
+ if (enabled)
{
button_count++;
@@ -1777,7 +1791,7 @@ void LLFloater::updateButtons()
// the restore button should have a tab stop so that it takes action when you Ctrl-Tab to a minimized floater
mButtons[i]->setTabStop(i == BUTTON_RESTORE);
}
- else if (mButtons[i])
+ else
{
mButtons[i]->setVisible(FALSE);
}