summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-10-29 15:37:25 -0700
committerJames Cook <james@lindenlab.com>2009-10-29 15:37:25 -0700
commit432e243e1aca565ea19091d39f1ff33056ce4075 (patch)
tree20ada2502854689d43b65e5ef035018227537a96 /indra/newview
parent00af1cca0083120149e3b7a7a793285b3c9ad882 (diff)
EXT-1352 Add image art to floater backgrounds.
Implemented "legacy_header_height" hack to account for new art being 25 pixels tall instead of legacy 18 pixels -- it auto-sizes the floaters to be taller. Made all floaters have resize handles, just disable and make invisible if unused. This simplifies the floater construction logic. Floater header height now lives in floater.xml, not as a global saved setting. Reviewed with Richard.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llfloatercamera.cpp4
-rw-r--r--indra/newview/llfloatergroupinvite.cpp5
-rw-r--r--indra/newview/llfloaternotificationsconsole.cpp3
-rw-r--r--indra/newview/llfloateruipreview.cpp3
-rw-r--r--indra/newview/lltexturectrl.cpp2
-rw-r--r--indra/newview/skins/default/textures/textures.xml8
-rw-r--r--indra/newview/skins/default/textures/windows/Window_NoTitle_Background.pngbin0 -> 289 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Window_NoTitle_Foreground.pngbin0 -> 290 bytes
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml2
-rw-r--r--indra/newview/skins/default/xui/en/widgets/floater.xml4
11 files changed, 19 insertions, 23 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 7219944fd7..5e6678131d 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -8820,17 +8820,6 @@
<key>Value</key>
<real>16</real>
</map>
- <key>UIFloaterHeaderSize</key>
- <map>
- <key>Comment</key>
- <string>UI floater header height in pixels</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <real>25</real>
- </map>
<key>UIFloaterHPad</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index dca0773139..d1317f7c36 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -268,8 +268,8 @@ void LLFloaterCamera::updateState()
LLRect controls_rect;
if (childGetRect(CONTROLS, controls_rect))
{
- static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
- static S32 height = controls_rect.getHeight() - floater_header_size;
+ S32 floater_header_size = getHeaderHeight();
+ S32 height = controls_rect.getHeight() - floater_header_size;
S32 newHeight = rect.getHeight();
if (showControls)
diff --git a/indra/newview/llfloatergroupinvite.cpp b/indra/newview/llfloatergroupinvite.cpp
index 3598479305..bf484c6343 100644
--- a/indra/newview/llfloatergroupinvite.cpp
+++ b/indra/newview/llfloatergroupinvite.cpp
@@ -81,7 +81,7 @@ void LLFloaterGroupInvite::impl::closeFloater(void* data)
LLFloaterGroupInvite::LLFloaterGroupInvite(const LLUUID& group_id)
: LLFloater(group_id)
{
- static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+ S32 floater_header_size = getHeaderHeight();
LLRect contents;
mImpl = new impl(group_id);
@@ -114,7 +114,8 @@ LLFloaterGroupInvite::~LLFloaterGroupInvite()
// static
void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id, std::vector<LLUUID> *agent_ids)
{
- static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+ const LLFloater::Params& floater_params = LLFloater::getDefaultParams();
+ S32 floater_header_size = floater_params.header_height;
LLRect contents;
// Make sure group_id isn't null
diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp
index f2dff55044..f20fca1258 100644
--- a/indra/newview/llfloaternotificationsconsole.cpp
+++ b/indra/newview/llfloaternotificationsconsole.cpp
@@ -221,7 +221,8 @@ void LLFloaterNotificationConsole::removeChannel(const std::string& name)
//static
void LLFloaterNotificationConsole::updateResizeLimits()
{
- static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+ const LLFloater::Params& floater_params = LLFloater::getDefaultParams();
+ S32 floater_header_size = floater_params.header_height;
LLLayoutStack& stack = getChildRef<LLLayoutStack>("notification_channels");
setResizeLimits(getMinWidth(), floater_header_size + HEADER_PADDING + ((NOTIFICATION_PANEL_HEADER_HEIGHT + 3) * stack.getNumPanels()));
diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp
index ac743df4f1..2fe21f28de 100644
--- a/indra/newview/llfloateruipreview.cpp
+++ b/indra/newview/llfloateruipreview.cpp
@@ -865,7 +865,8 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save)
}
else // if it is a panel...
{
- static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+ const LLFloater::Params& floater_params = LLFloater::getDefaultParams();
+ S32 floater_header_size = floater_params.header_height;
LLPanel::Params panel_params;
LLPanel* panel = LLUICtrlFactory::create<LLPanel>(panel_params); // create a new panel
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index b5aec1b80b..4940d9b5bb 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -458,7 +458,7 @@ BOOL LLFloaterTexturePicker::postBuild()
// virtual
void LLFloaterTexturePicker::draw()
{
- static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+ S32 floater_header_size = getHeaderHeight();
if (mOwner)
{
// draw cone of context pointing back to texture swatch
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 4f07d25b25..3d1cb84993 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -477,10 +477,10 @@
scale.left="4" scale.top="24" scale.right="26" scale.bottom="4" />
<texture name="Window_Foreground" file_name="windows/Window_Foreground.png" preload="true"
scale.left="4" scale.top="24" scale.right="26" scale.bottom="4" />
-
-
-
-
+ <texture name="Window_NoTitle_Background" file_name="windows/Window_NoTitle_Background.png" preload="true"
+ scale.left="4" scale.top="24" scale.right="26" scale.bottom="4" />
+ <texture name="Window_NoTitle_Foreground" file_name="windows/Window_NoTitle_Foreground.png" preload="true"
+ scale.left="4" scale.top="24" scale.right="26" scale.bottom="4" />
<!--WARNING OLD ART *do not use*-->
diff --git a/indra/newview/skins/default/textures/windows/Window_NoTitle_Background.png b/indra/newview/skins/default/textures/windows/Window_NoTitle_Background.png
new file mode 100644
index 0000000000..a570ac06bd
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/Window_NoTitle_Background.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Window_NoTitle_Foreground.png b/indra/newview/skins/default/textures/windows/Window_NoTitle_Foreground.png
new file mode 100644
index 0000000000..d573e8c69a
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/Window_NoTitle_Foreground.png
Binary files differ
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index 29fe046ed3..4e5c8c3747 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -3,6 +3,8 @@
follows="left|top|right"
height="570"
layout="topleft"
+ bg_opaque_image="Window_NoTitle_Foreground"
+ bg_alpha_image="Window_NoTitle_Background"
name="toolbox floater"
help_topic="toolbox_floater"
save_rect="true"
diff --git a/indra/newview/skins/default/xui/en/widgets/floater.xml b/indra/newview/skins/default/xui/en/widgets/floater.xml
index ece6373166..82f6d44f78 100644
--- a/indra/newview/skins/default/xui/en/widgets/floater.xml
+++ b/indra/newview/skins/default/xui/en/widgets/floater.xml
@@ -6,4 +6,6 @@
bg_opaque_image="Window_Foreground"
bg_alpha_image="Window_Background"
background_visible="true"
- background_opaque="false"/>
+ background_opaque="false"
+ header_height="25"
+ legacy_header_height="18" />