From 501da5c20a73e99887c3e7c330aeaca6cfe1cc7f Mon Sep 17 00:00:00 2001 From: NiranV Date: Fri, 1 Aug 2014 18:49:42 +0200 Subject: STORM-2051: Changed: Converted button panels to real tabs, removed the buttons and moved the Send and Cancel buttons to the main postcard panel. --- indra/newview/llpanelsnapshotpostcard.cpp | 26 ------- .../default/xui/de/panel_snapshot_postcard.xml | 4 ++ .../default/xui/en/panel_postcard_message.xml | 57 +++------------ .../default/xui/en/panel_postcard_settings.xml | 14 ++-- .../default/xui/en/panel_snapshot_postcard.xml | 84 +++++++++++----------- 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("image_quality_slider")->setCommitCallback(boost::bind(&LLPanelSnapshotPostcard::onQualitySliderCommit, this, _1)); - getChild("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("message_btn"), - getChild("settings_btn"), - }; - - // Switch between Message and Settings tabs. - LLButton* clicked_btn = buttons[btn_idx]; - LLButton* other_btn = buttons[!btn_idx]; - LLSideTrayPanelContainer* container = - getChild("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 @@ E-Mail + + + + 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 @@ @@ -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" /> From: @@ -47,7 +47,7 @@ left_pad="10" max_length_bytes="100" name="name_form" - right="-5" + right="-3" top_delta="-4" /> Subject: @@ -65,61 +65,24 @@ - - Message: - Type your message here. - - 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"> + width="190" /> 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" /> E-mail - - - + halign="center" + use_highlighting_on_hover="true"> - + + + \ No newline at end of file -- cgit v1.2.3