summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-07-12 17:57:31 -0700
committerMerov Linden <merov@lindenlab.com>2013-07-12 17:57:31 -0700
commit0530eac42c8cbb4f41131e8d7796006b47ba1fa5 (patch)
tree1246e2e94ce1aec2f13beb732c071e479ea576c4 /indra
parentb22b47fde552d2b1951858b7a4707876744cf396 (diff)
ACME-701 : Align all social panels UX, recenter the preview in the photo panel
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloatersocial.cpp17
-rw-r--r--indra/newview/skins/default/xui/en/floater_social.xml14
-rw-r--r--indra/newview/skins/default/xui/en/panel_social_photo.xml66
-rw-r--r--indra/newview/skins/default/xui/en/panel_social_place.xml34
-rw-r--r--indra/newview/skins/default/xui/en/panel_social_status.xml14
5 files changed, 82 insertions, 63 deletions
diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp
index 4c384efae1..c8c203fc25 100644
--- a/indra/newview/llfloatersocial.cpp
+++ b/indra/newview/llfloatersocial.cpp
@@ -168,6 +168,7 @@ mLocationCheckbox(NULL),
mPostButton(NULL)
{
mCommitCallbackRegistrar.add("SocialSharing.SendPhoto", boost::bind(&LLSocialPhotoPanel::onSend, this));
+ mCommitCallbackRegistrar.add("SocialSharing.RefreshPhoto", boost::bind(&LLSocialPhotoPanel::onClickNewSnapshot, this));
}
LLSocialPhotoPanel::~LLSocialPhotoPanel()
@@ -186,7 +187,6 @@ BOOL LLSocialPhotoPanel::postBuild()
mResolutionComboBox = getChild<LLUICtrl>("resolution_combobox");
mResolutionComboBox->setCommitCallback(boost::bind(&LLSocialPhotoPanel::updateResolution, this, TRUE));
mRefreshBtn = getChild<LLUICtrl>("new_snapshot_btn");
- childSetAction("new_snapshot_btn", boost::bind(&LLSocialPhotoPanel::onClickNewSnapshot, this));
mWorkingLabel = getChild<LLUICtrl>("working_lbl");
mThumbnailPlaceholder = getChild<LLUICtrl>("thumbnail_placeholder");
mCaptionTextBox = getChild<LLUICtrl>("photo_caption");
@@ -217,15 +217,18 @@ void LLSocialPhotoPanel::draw()
const S32 thumbnail_h = previewp->getThumbnailHeight();
// calc preview offset within the preview rect
- const S32 local_offset_x = (thumbnail_rect.getWidth() - thumbnail_w) / 2 ;
+ const S32 local_offset_x = (thumbnail_rect.getWidth() - thumbnail_w) / 2 ;
+ const S32 local_offset_y = (thumbnail_rect.getHeight() - thumbnail_h) / 2 ;
// calc preview offset within the floater rect
- S32 offset_x = thumbnail_rect.mLeft + local_offset_x;
- // Hack : "15" is to compensate for "top=8" of "stack_photo" and "top=7" of "tabs"
- S32 offset_y = thumbnail_rect.mBottom - 15;
-
+ // Hack : To get the full offset, we need to take into account each and every offset of each widgets up to the floater.
+ // This is almost as arbitrary as using a fixed offset so that's what we do here for the sake of simplicity.
+ // *TODO : Get the offset looking through the hierarchy of widgets, should be done in postBuild() so to avoid traversing the hierarchy each time.
+ S32 offset_x = thumbnail_rect.mLeft + local_offset_x - 1;
+ S32 offset_y = thumbnail_rect.mBottom + local_offset_y - 39;
+
mSnapshotPanel->localPointToOtherView(offset_x, offset_y, &offset_x, &offset_y, getParentByType<LLFloater>());
-
+
gGL.matrixMode(LLRender::MM_MODELVIEW);
// Apply floater transparency to the texture unless the floater is focused.
F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency();
diff --git a/indra/newview/skins/default/xui/en/floater_social.xml b/indra/newview/skins/default/xui/en/floater_social.xml
index c24e9a2194..65f738de1f 100644
--- a/indra/newview/skins/default/xui/en/floater_social.xml
+++ b/indra/newview/skins/default/xui/en/floater_social.xml
@@ -11,10 +11,10 @@
single_instance="true"
reuse_instance="true"
title="FACEBOOK"
- height="465"
+ height="482"
width="304">
<panel
- height="465"
+ height="482"
width="304"
visible="true"
name="background"
@@ -34,7 +34,7 @@
bg_opaque_color="DkGray"
bg_alpha_color="DkGray_66"
top="7"
- height="430"
+ height="437"
halign="center">
<panel
filename="panel_social_status.xml"
@@ -69,8 +69,8 @@
name="connection_error_text"
type="string"
follows="left|bottom|right"
- top="3"
- left="12"
+ top="5"
+ left="9"
width="250"
height="20"
wrap="true"
@@ -85,14 +85,14 @@
height="24"
width="24"
name="connection_loading_indicator"
- top="0"
+ top="2"
left="9"
visible="true"/>
<text
name="connection_loading_text"
type="string"
follows="left|bottom|right"
- top="3"
+ top="5"
left_pad="5"
width="250"
height="20"
diff --git a/indra/newview/skins/default/xui/en/panel_social_photo.xml b/indra/newview/skins/default/xui/en/panel_social_photo.xml
index ad901db748..a55613b52a 100644
--- a/indra/newview/skins/default/xui/en/panel_social_photo.xml
+++ b/indra/newview/skins/default/xui/en/panel_social_photo.xml
@@ -1,19 +1,19 @@
<panel
- height="393"
+ height="400"
width="304"
layout="topleft"
name="panel_social_photo">
<layout_stack
layout="topleft"
border_size="0"
- height="385"
+ height="392"
follows="all"
orientation="vertical"
name="stack_photo"
top="8">
<layout_panel
name="snapshot_panel"
- height="360">
+ height="367">
<combo_box
control_name="SocialPhotoResolution"
follows="left|top"
@@ -61,32 +61,36 @@
top="33"
follows="left|top"
left="9">
- <text
- follows="left|top|right"
- font="SansSerifBold"
- height="14"
- left="5"
- length="1"
- halign="center"
- name="working_lbl"
- right="-5"
- top="98"
- translate="false"
- type="string"
- visible="false">
- Refreshing...
- </text>
- <button
- follows="left|top"
- height="22"
- image_overlay="Refresh_Off"
- left="20"
- name="new_snapshot_btn"
- tool_tip="Click to refresh"
- bottom="-10"
- visible="false"
- width="22" />
</panel>
+ <button
+ follows="left|top"
+ height="23"
+ label="Refresh"
+ left="9"
+ top_pad="5"
+ name="new_snapshot_btn"
+ tool_tip="Click to refresh"
+ visible="true"
+ width="100" >
+ <button.commit_callback
+ function="SocialSharing.RefreshPhoto" />
+ </button>
+ <text
+ follows="left|top"
+ font="SansSerif"
+ text_color="EmphasisColor"
+ height="14"
+ top_pad="-19"
+ left_pad="-20"
+ length="1"
+ halign="center"
+ name="working_lbl"
+ translate="false"
+ type="string"
+ visible="true"
+ width="150">
+ Refreshing...
+ </text>
<text
length="1"
follows="top|left|right"
@@ -94,7 +98,7 @@
height="16"
left="9"
name="caption_label"
- top_pad="5"
+ top_pad="20"
type="string">
Comment (optional):
</text>
@@ -114,9 +118,9 @@
initial_value="true"
label="Include location in posting"
name="add_location_cb"
- left="6"
+ left="9"
height="16"
- top_pad="5"/>
+ top_pad="8"/>
</layout_panel>
<layout_panel
name="photo_button_panel"
diff --git a/indra/newview/skins/default/xui/en/panel_social_place.xml b/indra/newview/skins/default/xui/en/panel_social_place.xml
index c0fc9ada75..b53a41487a 100644
--- a/indra/newview/skins/default/xui/en/panel_social_place.xml
+++ b/indra/newview/skins/default/xui/en/panel_social_place.xml
@@ -1,19 +1,19 @@
<panel
- height="393"
+ height="400"
width="304"
layout="topleft"
name="panel_social_place">
<layout_stack
layout="topleft"
border_size="0"
- height="385"
+ height="392"
follows="all"
orientation="vertical"
name="stack_place"
top="8">
<layout_panel
name="place_detail_panel"
- height="127">
+ height="181">
<text
length="1"
follows="top|left|right"
@@ -21,14 +21,14 @@
height="16"
left="9"
name="place_caption_label"
- top="1"
+ top="13"
type="string">
Say something about where you are:
</text>
<text_editor
- follows="top|left|right"
- height="80"
- right="-9"
+ follows="top|left"
+ height="150"
+ width="250"
left="9"
length="1"
max_length="700"
@@ -39,13 +39,25 @@
</layout_panel>
<layout_panel
name="place_map_panel"
- height="233">
+ height="186">
+ <panel
+ follows="left|top"
+ height="128"
+ width="128"
+ background_visible="true"
+ bg_opaque_color="Black"
+ bg_alpha_color="Black"
+ top="20"
+ left="9"
+ visible="true"
+ name="map_border">
+ </panel>
<loading_indicator
follows="left|top"
height="24"
width="24"
name="map_loading_indicator"
- top="57"
+ top="77"
left="61"
visible="true"/>
<icon
@@ -54,9 +66,9 @@
width="128"
image_name="Map_Placeholder_Icon"
layout="topleft"
- top="5"
+ top="20"
left="9"
- visible="false"
+ visible="true"
name="map_placeholder">
</icon>
<check_box
diff --git a/indra/newview/skins/default/xui/en/panel_social_status.xml b/indra/newview/skins/default/xui/en/panel_social_status.xml
index 975f8cd29c..54cfa3f524 100644
--- a/indra/newview/skins/default/xui/en/panel_social_status.xml
+++ b/indra/newview/skins/default/xui/en/panel_social_status.xml
@@ -1,19 +1,19 @@
<panel
- height="393"
+ height="400"
width="304"
layout="topleft"
name="panel_social_status">
<layout_stack
layout="topleft"
border_size="0"
- height="385"
+ height="392"
follows="all"
orientation="vertical"
name="stack_status"
top="8">
<layout_panel
name="status_detail_panel"
- height="360">
+ height="367">
<text
length="1"
follows="top|left|right"
@@ -21,14 +21,14 @@
height="16"
left="9"
name="status_caption_label"
- top="1"
+ top="13"
type="string">
What's on your mind?
</text>
<text_editor
- follows="left|top|right"
- height="80"
- right="-9"
+ follows="left|top"
+ height="150"
+ width="250"
left="9"
length="1"
max_length="700"