summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRick Pasetto <rick@lindenlab.com>2009-11-06 13:07:50 -0800
committerRick Pasetto <rick@lindenlab.com>2009-11-06 13:07:50 -0800
commitd4f790f72866b43956ce4216bf6471c85f4afc6c (patch)
tree6b0906e09303a2efc999c636ec086718baf762ba /indra
parent113c7edf60b65a68510f75fdda69ba5b22dc23f0 (diff)
FIX: zoom/unzoom should appear to be one icon
this was a fairly trivial UI change....
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelprimmediacontrols.cpp7
-rw-r--r--indra/newview/skins/default/xui/en/panel_prim_media_controls.xml40
2 files changed, 25 insertions, 22 deletions
diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp
index 0b2a7e8756..73e19b3b2a 100644
--- a/indra/newview/llpanelprimmediacontrols.cpp
+++ b/indra/newview/llpanelprimmediacontrols.cpp
@@ -228,6 +228,7 @@ void LLPanelPrimMediaControls::updateShape()
bool can_navigate = parcel->getMediaAllowNavigate();
bool enabled = false;
+ bool is_zoomed = (mCurrentZoom != ZOOM_NONE);
// There is no such thing as "has_focus" being different from normal controls set
// anymore (as of user feedback from bri 10/09). So we cheat here and force 'has_focus'
// to 'true' (or, actually, we use a setting)
@@ -256,7 +257,7 @@ void LLPanelPrimMediaControls::updateShape()
LLUICtrl* stop_ctrl = getChild<LLUICtrl>("stop");
LLUICtrl* media_stop_ctrl = getChild<LLUICtrl>("media_stop");
LLUICtrl* home_ctrl = getChild<LLUICtrl>("home");
- LLUICtrl* close_ctrl = getChild<LLUICtrl>("close");
+ LLUICtrl* unzoom_ctrl = getChild<LLUICtrl>("close"); // This is actually "unzoom"
LLUICtrl* open_ctrl = getChild<LLUICtrl>("new_window");
LLUICtrl* zoom_ctrl = getChild<LLUICtrl>("zoom_frame");
LLPanel* media_loading_panel = getChild<LLPanel>("media_progress_indicator");
@@ -283,7 +284,8 @@ void LLPanelPrimMediaControls::updateShape()
reload_ctrl->setVisible(has_focus);
stop_ctrl->setVisible(false);
home_ctrl->setVisible(has_focus);
- close_ctrl->setVisible(has_focus);
+ zoom_ctrl->setVisible(!is_zoomed);
+ unzoom_ctrl->setVisible(has_focus && is_zoomed);
open_ctrl->setVisible(true);
media_address_ctrl->setVisible(has_focus && !mini_controls);
media_play_slider_panel->setVisible(has_focus && !mini_controls);
@@ -294,6 +296,7 @@ void LLPanelPrimMediaControls::updateShape()
whitelist_icon->setVisible(!mini_controls && (media_data)?media_data->getWhiteListEnable():false);
// Disable zoom if HUD
zoom_ctrl->setEnabled(!objectp->isHUDAttachment());
+ unzoom_ctrl->setEnabled(!objectp->isHUDAttachment());
secure_lock_icon->setVisible(false);
mCurrentURL = media_impl->getCurrentMediaURL();
diff --git a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
index fc5ccdb63e..3bdd7114ee 100644
--- a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
+++ b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
@@ -494,13 +494,32 @@ disabled
image_selected="media_btn_optimalzoom.png"
image_unselected="media_btn_optimalzoom.png"
layout="topleft"
- tool_tip="Zoom"
+ tool_tip="Zoom into media"
min_width="22"
width="22">
<button.commit_callback
function="MediaCtrl.Zoom" />
</button>
</layout_panel>
+ <layout_panel
+ name="close"
+ auto_resize="false"
+ user_resize="false"
+ layout="topleft"
+ min_width="21"
+ width="21" >
+ <button
+ height="22"
+ image_selected="media_btn_done.png"
+ image_unselected="media_btn_done.png"
+ layout="topleft"
+ tool_tip ="Zoom Back"
+ top_delta="-4"
+ width="21" >
+ <button.commit_callback
+ function="MediaCtrl.Close" />
+ </button>
+ </layout_panel>
<!--
<panel
height="22"
@@ -554,25 +573,6 @@ disabled
</panel>
-->
<layout_panel
- name="close"
- auto_resize="false"
- user_resize="false"
- layout="topleft"
- min_width="21"
- width="21" >
- <button
- height="22"
- image_selected="media_btn_done.png"
- image_unselected="media_btn_done.png"
- layout="topleft"
- tool_tip ="Close media control"
- top_delta="-4"
- width="21" >
- <button.commit_callback
- function="MediaCtrl.Close" />
- </button>
- </layout_panel>
- <layout_panel
width="0"
layout="topleft"
user_resize="false" />