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

meow-7.2.2
Richard Linden 2011-07-05 16:51:04 -07:00
parent 37bc2b2fe8
commit aecfaef10c
7 changed files with 50 additions and 9 deletions

View File

@ -13405,5 +13405,20 @@
<key>Value</key>
<integer>1</integer>
</map>
<key>WebProfileRect</key>
<map>
<key>Comment</key>
<string>Web profile dimensions</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Rect</string>
<key>Value</key>
<array>
<integer>0</integer>
<integer>650</integer>
<integer>475</integer>
<integer>0</integer>
</array> </map>
</map>
</llsd>

View File

@ -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<LLRect> profile_rect(gSavedSettings, "WebProfileRect");
LLFloaterWebContent::create(url, "", agent_id.asString(), show_chrome, profile_rect);
}
// static

View File

@ -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<LLLayoutPanel>("status_bar")->setVisible(show_chrome);
browser->getChild<LLLayoutPanel>("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)

View File

@ -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);

View File

@ -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"

View File

@ -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">
<web_browser
bottom="-22"
bottom="-2"
follows="all"
layout="topleft"
left="0"
name="webbrowser"
top="0"/>
</layout_panel>
<layout_panel name="status_bar"
height="23">
<text
type="string"
length="200"
@ -174,7 +179,7 @@
name="statusbartext"
parse_urls="false"
text_color="0.4 0.4 0.4 1"
top_pad="5"
top_pad="3"
width="495"/>
<progress_bar
color_bar="0.3 1.0 0.3 1"

View File

@ -17,6 +17,7 @@
follows="left|right|top|bottom"
layout="topleft"
left="5"
animate="false"
name="stack1"
orientation="vertical"
top="20"
@ -155,14 +156,18 @@
name="external_controls"
top_delta="0"
user_resize="false"
auto_resize="true"
width="585">
<web_browser
bottom="-22"
bottom="-2"
follows="all"
layout="topleft"
left="0"
name="webbrowser"
top="0"/>
</layout_panel>
<layout_panel name="status_bar"
height="23">
<text
type="string"
length="200"
@ -173,7 +178,7 @@
name="statusbartext"
parse_urls="false"
text_color="0.4 0.4 0.4 1"
top_pad="5"
top_pad="3"
width="495"/>
<progress_bar
color_bar="0.3 1.0 0.3 1"