From aecfaef10c41dce7395c3a02dcd84a39b6ffbeee Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 5 Jul 2011 16:51:04 -0700 Subject: EXP-982 FIX As a user, I would like to see the new web-based profiles without any browser chrome and at an appropriate default size --- indra/newview/app_settings/settings.xml | 15 +++++++++++++++ indra/newview/llavataractions.cpp | 4 +++- indra/newview/llfloaterwebcontent.cpp | 18 ++++++++++++++++-- indra/newview/llfloaterwebcontent.h | 2 +- .../skins/default/xui/en/floater_media_browser.xml | 2 +- .../skins/default/xui/en/floater_web_content.xml | 9 +++++++-- .../skins/minimal/xui/en/floater_web_content.xml | 9 +++++++-- 7 files changed, 50 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 34a179f95b..9d46cd442b 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -13405,5 +13405,20 @@ Value 1 + WebProfileRect + + Comment + Web profile dimensions + Persist + 1 + Type + Rect + Value + + 0 + 650 + 475 + 0 + diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index eeb4ec8458..b2d97a796a 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -313,7 +313,9 @@ static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarNa std::string url = getProfileURL(username); // PROFILES: open in webkit window - LLWeb::loadWebURLInternal(url, "", agent_id.asString()); + const bool show_chrome = false; + static LLCachedControl profile_rect(gSavedSettings, "WebProfileRect"); + LLFloaterWebContent::create(url, "", agent_id.asString(), show_chrome, profile_rect); } // static diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index 058567492b..43eecbf048 100644 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -99,7 +99,7 @@ void LLFloaterWebContent::initializeURLHistory() } //static -void LLFloaterWebContent::create( const std::string &url, const std::string& target, const std::string& uuid ) +void LLFloaterWebContent::create( const std::string &url, const std::string& target, const std::string& uuid, bool show_chrome, const LLRect& preferred_media_size) { lldebugs << "url = " << url << ", target = " << target << ", uuid = " << uuid << llendl; @@ -155,6 +155,20 @@ void LLFloaterWebContent::create( const std::string &url, const std::string& tar // tell the browser instance to load the specified URL browser->open_media(url, target); LLViewerMedia::proxyWindowOpened(target, uuid); + + browser->getChild("status_bar")->setVisible(show_chrome); + browser->getChild("nav_controls")->setVisible(show_chrome); + + if (!show_chrome) + { + browser->setResizeLimits(100, 100); + } + + if (!preferred_media_size.isEmpty()) + { + //ignore x, y for now + browser->geometryChanged(browser->getRect().mLeft, browser->getRect().mBottom, preferred_media_size.getWidth(), preferred_media_size.getHeight()); + } } } @@ -210,7 +224,7 @@ void LLFloaterWebContent::geometryChanged(S32 x, S32 y, S32 width, S32 height) lldebugs << "geometry change: " << geom << llendl; - handleReshape(geom,false); + setShape(geom); } void LLFloaterWebContent::open_media(const std::string& web_url, const std::string& target) diff --git a/indra/newview/llfloaterwebcontent.h b/indra/newview/llfloaterwebcontent.h index ecc7e970d8..56b6ef12c8 100644 --- a/indra/newview/llfloaterwebcontent.h +++ b/indra/newview/llfloaterwebcontent.h @@ -46,7 +46,7 @@ public: void initializeURLHistory(); - static void create(const std::string &url, const std::string& target, const std::string& uuid = LLStringUtil::null); + static void create(const std::string &url, const std::string& target, const std::string& uuid = LLStringUtil::null, bool show_chrome = true, const LLRect& preferred_media_size = LLRect() ); static void closeRequest(const std::string &uuid); static void geometryChanged(const std::string &uuid, S32 x, S32 y, S32 width, S32 height); diff --git a/indra/newview/skins/default/xui/en/floater_media_browser.xml b/indra/newview/skins/default/xui/en/floater_media_browser.xml index 43729d7c9f..5a1f920398 100644 --- a/indra/newview/skins/default/xui/en/floater_media_browser.xml +++ b/indra/newview/skins/default/xui/en/floater_media_browser.xml @@ -5,7 +5,7 @@ height="440" layout="topleft" min_height="140" - min_width="467" + min_width="0" name="floater_about" help_topic="floater_about" save_rect="true" diff --git a/indra/newview/skins/default/xui/en/floater_web_content.xml b/indra/newview/skins/default/xui/en/floater_web_content.xml index e04a72cbc0..a62ff21589 100644 --- a/indra/newview/skins/default/xui/en/floater_web_content.xml +++ b/indra/newview/skins/default/xui/en/floater_web_content.xml @@ -18,6 +18,7 @@ follows="left|right|top|bottom" layout="topleft" left="5" + animate="false" name="stack1" orientation="vertical" top="20" @@ -156,14 +157,18 @@ name="external_controls" top_delta="0" user_resize="false" + auto_resize="true" width="585"> + + + +