From 432e243e1aca565ea19091d39f1ff33056ce4075 Mon Sep 17 00:00:00 2001 From: James Cook Date: Thu, 29 Oct 2009 15:37:25 -0700 Subject: 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. --- indra/newview/app_settings/settings.xml | 11 ----------- indra/newview/llfloatercamera.cpp | 4 ++-- indra/newview/llfloatergroupinvite.cpp | 5 +++-- indra/newview/llfloaternotificationsconsole.cpp | 3 ++- indra/newview/llfloateruipreview.cpp | 3 ++- indra/newview/lltexturectrl.cpp | 2 +- indra/newview/skins/default/textures/textures.xml | 8 ++++---- .../textures/windows/Window_NoTitle_Background.png | Bin 0 -> 289 bytes .../textures/windows/Window_NoTitle_Foreground.png | Bin 0 -> 290 bytes indra/newview/skins/default/xui/en/floater_tools.xml | 2 ++ indra/newview/skins/default/xui/en/widgets/floater.xml | 4 +++- 11 files changed, 19 insertions(+), 23 deletions(-) create mode 100644 indra/newview/skins/default/textures/windows/Window_NoTitle_Background.png create mode 100644 indra/newview/skins/default/textures/windows/Window_NoTitle_Foreground.png (limited to 'indra/newview') 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 @@ Value 16 - UIFloaterHeaderSize - - Comment - UI floater header height in pixels - Persist - 1 - Type - S32 - Value - 25 - UIFloaterHPad Comment 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 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 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 *agent_ids) { - static LLUICachedControl 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 floater_header_size ("UIFloaterHeaderSize", 0); + const LLFloater::Params& floater_params = LLFloater::getDefaultParams(); + S32 floater_header_size = floater_params.header_height; LLLayoutStack& stack = getChildRef("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 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(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 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" /> - - - - + + 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 Binary files /dev/null and b/indra/newview/skins/default/textures/windows/Window_NoTitle_Background.png 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 Binary files /dev/null and b/indra/newview/skins/default/textures/windows/Window_NoTitle_Foreground.png 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" /> -- cgit v1.2.3