summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloatersocial.cpp53
-rw-r--r--indra/newview/skins/default/xui/en/floater_social.xml5
-rw-r--r--indra/newview/skins/default/xui/en/panel_social_photo.xml73
-rw-r--r--indra/newview/skins/default/xui/en/panel_social_place.xml11
-rw-r--r--indra/newview/skins/default/xui/en/panel_social_status.xml49
5 files changed, 70 insertions, 121 deletions
diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp
index 2ecadcfaf6..58a9edc524 100644
--- a/indra/newview/llfloatersocial.cpp
+++ b/indra/newview/llfloatersocial.cpp
@@ -198,76 +198,33 @@ void LLSocialPhotoPanel::draw()
{
LLSnapshotLivePreview * previewp = static_cast<LLSnapshotLivePreview *>(mPreviewHandle.get());
- LLPanel::draw();
-
- if(previewp && previewp->getThumbnailImage())
+ if (previewp && previewp->getThumbnailImage())
{
- bool working = false; //impl.getStatus() == Impl::STATUS_WORKING;
const LLRect& thumbnail_rect = mThumbnailPlaceholder->getRect();
+ const LLRect& snapshot_rect = mSnapshotPanel->getRect();
const S32 thumbnail_w = previewp->getThumbnailWidth();
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_y = (thumbnail_rect.getHeight() - thumbnail_h) / 2 ; // preview y pos within the preview rect
// calc preview offset within the floater rect
S32 offset_x = thumbnail_rect.mLeft + local_offset_x;
- S32 offset_y = thumbnail_rect.mBottom + local_offset_y;
+ S32 offset_y = thumbnail_rect.mBottom - (snapshot_rect.mTop - thumbnail_rect.mTop);
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();
- LLColor4 color = working ? LLColor4::grey4 : LLColor4::white;
+ LLColor4 color = LLColor4::white;
gl_draw_scaled_image(offset_x, offset_y,
thumbnail_w, thumbnail_h,
previewp->getThumbnailImage(), color % alpha);
previewp->drawPreviewRect(offset_x, offset_y) ;
-
- // Draw some controls on top of the preview thumbnail.
- static const S32 PADDING = 5;
- static const S32 REFRESH_LBL_BG_HEIGHT = 32;
-
- // Reshape and position the posting result message panels at the top of the thumbnail.
- // Do this regardless of current posting status (finished or not) to avoid flicker
- // when the result message is displayed for the first time.
- // if (impl.getStatus() == Impl::STATUS_FINISHED)
- {
- LLRect result_lbl_rect = mSucceessLblPanel->getRect();
- const S32 result_lbl_h = result_lbl_rect.getHeight();
- result_lbl_rect.setLeftTopAndSize(local_offset_x, local_offset_y + thumbnail_h, thumbnail_w - 1, result_lbl_h);
- mSucceessLblPanel->reshape(result_lbl_rect.getWidth(), result_lbl_h);
- mSucceessLblPanel->setRect(result_lbl_rect);
- mFailureLblPanel->reshape(result_lbl_rect.getWidth(), result_lbl_h);
- mFailureLblPanel->setRect(result_lbl_rect);
- }
-
- // Position the refresh button in the bottom left corner of the thumbnail.
- mRefreshBtn->setOrigin(local_offset_x + PADDING, local_offset_y + PADDING);
-
- if (mNeedRefresh)
- {
- // Place the refresh hint text to the right of the refresh button.
- const LLRect& refresh_btn_rect = mRefreshBtn->getRect();
- mRefreshLabel->setOrigin(refresh_btn_rect.mLeft + refresh_btn_rect.getWidth() + PADDING, refresh_btn_rect.mBottom);
-
- // Draw the refresh hint background.
- LLRect refresh_label_bg_rect(offset_x, offset_y + REFRESH_LBL_BG_HEIGHT, offset_x + thumbnail_w - 1, offset_y);
- gl_rect_2d(refresh_label_bg_rect, LLColor4::white % 0.9f, TRUE);
- }
-
- gGL.pushUIMatrix();
- S32 x_pos;
- S32 y_pos;
- mSnapshotPanel->localPointToOtherView(thumbnail_rect.mLeft, thumbnail_rect.mBottom, &x_pos, &y_pos, getParentByType<LLFloater>());
-
- LLUI::translate((F32) x_pos, (F32) y_pos);
- mThumbnailPlaceholder->draw();
- gGL.popUIMatrix();
}
+ LLPanel::draw();
}
LLSnapshotLivePreview* LLSocialPhotoPanel::getPreviewView()
diff --git a/indra/newview/skins/default/xui/en/floater_social.xml b/indra/newview/skins/default/xui/en/floater_social.xml
index 61210135ee..40800c87e6 100644
--- a/indra/newview/skins/default/xui/en/floater_social.xml
+++ b/indra/newview/skins/default/xui/en/floater_social.xml
@@ -25,7 +25,7 @@
<panel
filename="panel_social_status.xml"
class="llsocialstatuspanel"
- background_opaque="true"
+ follows="all"
background_visible="true"
bg_alpha_color="DkGray"
bg_opaque_color="DkGray"
@@ -36,9 +36,6 @@
filename="panel_social_photo.xml"
class="llsocialphotopanel"
follows="all"
- background_visible="true"
- bg_alpha_color="DkGray"
- bg_opaque_color="DkGray"
label="PHOTO"
help_topic="panel_social_photo"
name="panel_social_photo"/>
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 fc86349235..72e5286fe6 100644
--- a/indra/newview/skins/default/xui/en/panel_social_photo.xml
+++ b/indra/newview/skins/default/xui/en/panel_social_photo.xml
@@ -1,15 +1,15 @@
<panel
- height="430"
+ height="395"
width="304"
+ layout="topleft"
name="panel_social_photo">
<layout_stack
layout="topleft"
border_size="0"
- height="422"
- width="304"
- follows="all"
+ height="395"
+ follows="top|left|right"
orientation="vertical"
- name="stack1"
+ name="stack_photo"
top="8">
<layout_panel
name="photo_detail_panel"
@@ -20,9 +20,6 @@
height="295"
width="286"
left="7"
- background_opaque="true"
- background_visible="true"
- bg_opaque_color="DkGray2"
label="snapshot_panel"
help_topic="snapshot_panel"
name="snapshot_panel">
@@ -60,31 +57,28 @@
length="1"
halign="right"
name="file_size_label"
- top="12"
+ top="9"
type="string"
width="50">
[SIZE] KB
</text>
- <ui_ctrl
+ <panel
height="150"
width="250"
+ visible="true"
name="thumbnail_placeholder"
- top_pad="5"
+ top="33"
follows="left|top"
left="9">
<panel
background_visible="true"
bg_alpha_color="0.9 1 0.9 1"
follows="left|top"
- font="SansSerifLarge"
- halign="center"
height="20"
+ width="250"
+ top="0"
left="0"
- length="1"
name="succeeded_panel"
- right="-1"
- top="0"
- type="string"
visible="false">
<text
follows="all"
@@ -106,15 +100,11 @@
background_visible="true"
bg_alpha_color="1 0.9 0.9 1"
follows="left|top"
- font="SansSerifLarge"
- halign="center"
height="20"
- left_delta="0"
- length="1"
- name="failed_panel"
- right="-1"
+ width="250"
top="0"
- type="string"
+ left="0"
+ name="failed_panel"
visible="false">
<text
follows="all"
@@ -134,12 +124,12 @@
</panel>
<loading_indicator
follows="left|top"
- height="48"
+ height="24"
name="working_indicator"
- left="101"
- top="46"
+ left="113"
+ top="59"
visible="false"
- width="48" />
+ width="24" />
<text
follows="left|top|right"
font="SansSerifBold"
@@ -152,17 +142,16 @@
top="98"
translate="false"
type="string"
- visible="false"
- width="130">
+ visible="false">
Working
</text>
<button
follows="left|top"
height="22"
image_overlay="Refresh_Off"
- left="20"
+ left="10"
name="new_snapshot_btn"
- bottom="-20"
+ bottom="-10"
visible="false"
width="22" />
<text
@@ -173,16 +162,15 @@
left_pad="10"
length="1"
name="refresh_lbl"
- right="-5"
text_color="red"
- top_delta="0"
+ top_delta="4"
translate="false"
type="string"
visible="false"
width="130">
- Refresh to save.
+ Refresh to save
</text>
- </ui_ctrl>
+ </panel>
<text
length="1"
follows="top|left|right"
@@ -216,21 +204,10 @@
<layout_panel
name="photo_button_panel"
height="96">
- <panel
- height="96"
- top="0"
- follows="all"
- left="7"
- right="-10"
- background_opaque="true"
- background_visible="true"
- bg_opaque_color="DkGray"
- label="button_container"
- help_topic="button_container"
- name="button_container"/>
<button
follows="left|top"
top="15"
+ left="9"
height="23"
label="Post"
name="post_btn"
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 30b48d9bb1..03068dddc6 100644
--- a/indra/newview/skins/default/xui/en/panel_social_place.xml
+++ b/indra/newview/skins/default/xui/en/panel_social_place.xml
@@ -1,11 +1,12 @@
<panel
- height="430"
- width="304"
+ height="395"
+ width="304"
+ layout="topleft"
name="panel_social_place">
<layout_stack
layout="topleft"
border_size="0"
- height="422"
+ height="395"
follows="all"
orientation="vertical"
name="stack_place"
@@ -20,13 +21,13 @@
height="16"
left="9"
name="place_caption_label"
- top_pad="12"
+ top="1"
type="string">
Say something about where you are:
</text>
<text_editor
follows="top|left|right"
- height="94"
+ height="80"
right="-9"
left="9"
length="1"
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 ae199e7e38..f817a515e7 100644
--- a/indra/newview/skins/default/xui/en/panel_social_status.xml
+++ b/indra/newview/skins/default/xui/en/panel_social_status.xml
@@ -1,42 +1,57 @@
<panel
- height="430"
+ height="395"
width="304"
+ layout="topleft"
name="panel_social_status">
- <text
+ <layout_stack
+ layout="topleft"
+ border_size="0"
+ height="395"
+ follows="all"
+ orientation="vertical"
+ name="stack_status"
+ top="8">
+ <layout_panel
+ name="status_detail_panel"
+ height="255">
+ <text
length="1"
follows="top|left|right"
font="SansSerif"
height="16"
left="9"
- name="caption_label"
- top_pad="18"
+ name="status_caption_label"
+ top="1"
type="string">
What's on your mind?
- </text>
- <text_editor
- follows="left|top"
+ </text>
+ <text_editor
+ follows="left|top|right"
height="80"
- width="280"
+ right="-9"
left="9"
length="1"
max_length="700"
name="status_message"
type="string"
word_wrap="true">
- </text_editor>
- <button
- layout="topleft"
+ </text_editor>
+ </layout_panel>
+ <layout_panel
+ name="status_button_panel"
+ height="96">
+ <button
follows="left|top"
+ top="5"
+ left="9"
height="23"
label="Post"
name="post_status_btn"
- top_pad="18"
width="100">
<button.commit_callback
function="SocialSharing.SendStatus" />
- </button>
- <button
- layout="topleft"
+ </button>
+ <button
follows="left|top"
height="23"
label="Cancel"
@@ -46,5 +61,7 @@
width="100">
<button.commit_callback
function="SocialSharing.Cancel" />
- </button>
+ </button>
+ </layout_panel>
+ </layout_stack>
</panel> \ No newline at end of file