summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorNiranV <NiranV.Dean@googlemail.com>2014-08-01 18:49:42 +0200
committerNiranV <NiranV.Dean@googlemail.com>2014-08-01 18:49:42 +0200
commit501da5c20a73e99887c3e7c330aeaca6cfe1cc7f (patch)
treef788bf36042d77fb6438f98fe79039f29fae463f /indra
parentb5ac12d7b94a09c6835e1f9b5b8921c359751115 (diff)
STORM-2051: Changed: Converted button panels to real tabs, removed the buttons and moved the Send and Cancel buttons to the main postcard panel.
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llpanelsnapshotpostcard.cpp26
-rwxr-xr-xindra/newview/skins/default/xui/de/panel_snapshot_postcard.xml4
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_postcard_message.xml57
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_postcard_settings.xml14
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_snapshot_postcard.xml84
5 files changed, 63 insertions, 122 deletions
diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp
index 703ac25f97..8e37b1418c 100755
--- a/indra/newview/llpanelsnapshotpostcard.cpp
+++ b/indra/newview/llpanelsnapshotpostcard.cpp
@@ -72,7 +72,6 @@ private:
void onMsgFormFocusRecieved();
void onFormatComboCommit(LLUICtrl* ctrl);
void onQualitySliderCommit(LLUICtrl* ctrl);
- void onTabButtonPress(S32 btn_idx);
void onSend();
bool mHasFirstMsgFocus;
@@ -86,8 +85,6 @@ LLPanelSnapshotPostcard::LLPanelSnapshotPostcard()
{
mCommitCallbackRegistrar.add("Postcard.Send", boost::bind(&LLPanelSnapshotPostcard::onSend, this));
mCommitCallbackRegistrar.add("Postcard.Cancel", boost::bind(&LLPanelSnapshotPostcard::cancel, this));
- mCommitCallbackRegistrar.add("Postcard.Message", boost::bind(&LLPanelSnapshotPostcard::onTabButtonPress, this, 0));
- mCommitCallbackRegistrar.add("Postcard.Settings", boost::bind(&LLPanelSnapshotPostcard::onTabButtonPress, this, 1));
}
@@ -108,8 +105,6 @@ BOOL LLPanelSnapshotPostcard::postBuild()
getChild<LLUICtrl>("image_quality_slider")->setCommitCallback(boost::bind(&LLPanelSnapshotPostcard::onQualitySliderCommit, this, _1));
- getChild<LLButton>("message_btn")->setToggleState(TRUE);
-
return LLPanelSnapshot::postBuild();
}
@@ -218,27 +213,6 @@ void LLPanelSnapshotPostcard::onQualitySliderCommit(LLUICtrl* ctrl)
LLFloaterSnapshot::getInstance()->notify(info); // updates the "SnapshotQuality" setting
}
-void LLPanelSnapshotPostcard::onTabButtonPress(S32 btn_idx)
-{
- LLButton* buttons[2] = {
- getChild<LLButton>("message_btn"),
- getChild<LLButton>("settings_btn"),
- };
-
- // Switch between Message and Settings tabs.
- LLButton* clicked_btn = buttons[btn_idx];
- LLButton* other_btn = buttons[!btn_idx];
- LLSideTrayPanelContainer* container =
- getChild<LLSideTrayPanelContainer>("postcard_panel_container");
-
- container->selectTab(clicked_btn->getToggleState() ? btn_idx : !btn_idx);
- clicked_btn->setEnabled(FALSE);
- other_btn->toggleState();
- other_btn->setEnabled(TRUE);
-
- LL_DEBUGS() << "Button #" << btn_idx << " (" << clicked_btn->getName() << ") clicked" << LL_ENDL;
-}
-
void LLPanelSnapshotPostcard::onSend()
{
// Validate input.
diff --git a/indra/newview/skins/default/xui/de/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/de/panel_snapshot_postcard.xml
index e0fc60621e..6c8670a4c8 100755
--- a/indra/newview/skins/default/xui/de/panel_snapshot_postcard.xml
+++ b/indra/newview/skins/default/xui/de/panel_snapshot_postcard.xml
@@ -12,4 +12,8 @@
<text name="title">
E-Mail
</text>
+ <tab_container name="postcard_tabs">
+ <panel name="panel_postcard_message" label="Nachricht"/>
+ <panel name="panel_postcard_settings" label="Einstellungen"/>
+ </tab_container>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_postcard_message.xml b/indra/newview/skins/default/xui/en/panel_postcard_message.xml
index 56601da2fd..331a08b4bb 100755
--- a/indra/newview/skins/default/xui/en/panel_postcard_message.xml
+++ b/indra/newview/skins/default/xui/en/panel_postcard_message.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
- height="380"
+ height="319"
layout="topleft"
name="panel_postcard_message"
width="490">
@@ -12,7 +12,7 @@
font="SansSerif"
height="16"
layout="topleft"
- left="12"
+ left="5"
name="to_label"
top="10"
width="60">
@@ -25,7 +25,7 @@
layout="topleft"
left_pad="10"
name="to_form"
- right="-5"
+ right="-3"
top_delta="-4" />
<text
type="string"
@@ -35,7 +35,7 @@
font="SansSerif"
height="16"
layout="topleft"
- left="12"
+ left="5"
name="name_label"
width="60">
From:
@@ -47,7 +47,7 @@
left_pad="10"
max_length_bytes="100"
name="name_form"
- right="-5"
+ right="-3"
top_delta="-4" />
<text
type="string"
@@ -57,7 +57,7 @@
font="SansSerif"
height="16"
layout="topleft"
- left="12"
+ left="5"
name="subject_label"
width="60">
Subject:
@@ -65,61 +65,24 @@
<line_editor
follows="left|top|right"
height="20"
- label="Type your subject here."
layout="topleft"
left_pad="10"
max_length_bytes="100"
name="subject_form"
- right="-5"
+ right="-3"
top_delta="-4" />
- <text
- type="string"
- length="1"
- bottom_delta="23"
- follows="top|left"
- font="SansSerif"
- height="16"
- layout="topleft"
- left="12"
- name="msg_label">
- Message:
- </text>
<text_editor
type="string"
length="1"
follows="left|top|right"
- height="45"
+ height="48"
layout="topleft"
- left_delta="0"
+ left="5"
max_length="700"
name="msg_form"
- right="-5"
+ right="-4"
top_pad="5"
word_wrap="true">
Type your message here.
</text_editor>
- <button
- follows="right|bottom"
- height="23"
- label="Cancel"
- layout="topleft"
- name="cancel_btn"
- right="-5"
- top="345"
- width="90">
- <button.commit_callback
- function="Postcard.Cancel" />
- </button>
- <button
- follows="left|bottom"
- height="23"
- label="Send"
- layout="topleft"
- left="10"
- name="send_btn"
- top_delta="0"
- width="95">
- <button.commit_callback
- function="Postcard.Send" />
- </button>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_postcard_settings.xml b/indra/newview/skins/default/xui/en/panel_postcard_settings.xml
index f6397fe7a2..907751280f 100755
--- a/indra/newview/skins/default/xui/en/panel_postcard_settings.xml
+++ b/indra/newview/skins/default/xui/en/panel_postcard_settings.xml
@@ -9,9 +9,9 @@
height="23"
label="Resolution"
layout="topleft"
- left="10"
+ left="5"
name="postcard_size_combo"
- right="-5"
+ right="-3"
top_pad="5">
<combo_box.item
label="Current Window"
@@ -43,11 +43,11 @@
label="Width x Height"
label_width="80"
layout="topleft"
- left="10"
+ left="5"
max_val="6016"
min_val="32"
name="postcard_snapshot_width"
- top_pad="3"
+ top_pad="5"
width="132" />
<spinner
allow_text_entry="false"
@@ -69,7 +69,7 @@
follows="left|top"
label="Constrain proportions"
layout="topleft"
- left="10"
+ left="5"
name="postcard_keep_aspect_check" />
<slider
decimal_digits="0"
@@ -80,9 +80,9 @@
label="Quality:"
label_width="45"
layout="topleft"
- left="10"
+ left="5"
max_val="100"
name="image_quality_slider"
top_pad="6"
- width="195" />
+ width="190" />
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml
index 2622ccb4c4..01265523ea 100755
--- a/indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml
+++ b/indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml
@@ -24,7 +24,7 @@
left="12"
mouse_opaque="true"
name="title_icon"
- top="8"
+ top="7"
width="18" />
<text
follows="top|left|right"
@@ -40,64 +40,64 @@
top_delta="2">
E-mail
</text>
- <button
- follows="right|top"
- height="23"
- is_toggle="true"
- label=""
- image_overlay="Command_Chat_Icon"
- image_disabled_selected="PushButton_Disabled"
- layout="topleft"
- name="message_btn"
- right="-35"
- top_delta="-3"
- width="25">
- <button.commit_callback
- function="Postcard.Message" />
- </button>
- <button
- follows="right|top"
- height="23"
- is_toggle="true"
- label=""
- image_overlay="OptionsMenu_Off"
- image_disabled_selected="PushButton_Disabled"
- layout="topleft"
- name="settings_btn"
- top_delta="0"
- left_pad="5"
- width="25">
- <button.commit_callback
- function="Postcard.Settings" />
- </button>
<view_border
bevel_style="in"
follows="left|top|right"
height="1"
- left="10"
+ left="9"
layout="topleft"
name="hr"
right="-5"
- top_pad="2"
+ top_pad="5"
/>
- <panel_container
+ <tab_container
+ name="postcard_tabs"
+ tab_group="1"
+ tab_min_width="92"
+ tab_height="21"
+ tab_position="top"
+ top_pad="7"
+ left="5"
+ right="-2"
+ height="319"
follows="all"
- height="340"
- layout="topleft"
- left="0"
- name="postcard_panel_container"
- default_panel_name="panel_postcard_message"
- top_pad="0"
- width="490">
+ halign="center"
+ use_highlighting_on_hover="true">
<panel
follows="all"
layout="topleft"
+ label="Message"
name="panel_postcard_message"
filename="panel_postcard_message.xml" />
<panel
follows="all"
layout="topleft"
+ label="Settings"
name="panel_postcard_settings"
filename="panel_postcard_settings.xml" />
- </panel_container>
+ </tab_container>
+ <button
+ follows="right|bottom"
+ height="23"
+ label="Cancel"
+ layout="topleft"
+ name="cancel_btn"
+ right="-6"
+ bottom="-20"
+ width="90">
+ <button.commit_callback
+ function="Postcard.Cancel" />
+ </button>
+ <button
+ follows="left|bottom"
+ height="23"
+ label="Send"
+ layout="topleft"
+ left="10"
+ name="send_btn"
+ top_delta="0"
+ width="95">
+ <button.commit_callback
+ function="Postcard.Send" />
+ </button>
</panel> \ No newline at end of file