Feature Request: Add a stop button to MOAP hover controls
Also raise up the speaker button two pixels so it doesn't look so bad.
This commit is contained in:
@@ -118,6 +118,7 @@ LLPanelPrimMediaControls::LLPanelPrimMediaControls() :
|
|||||||
mCommitCallbackRegistrar.add("MediaCtrl.CommitVolumeDown", boost::bind(&LLPanelPrimMediaControls::onCommitVolumeDown, this));
|
mCommitCallbackRegistrar.add("MediaCtrl.CommitVolumeDown", boost::bind(&LLPanelPrimMediaControls::onCommitVolumeDown, this));
|
||||||
mCommitCallbackRegistrar.add("MediaCtrl.Volume", boost::bind(&LLPanelPrimMediaControls::onCommitVolumeSlider, this));
|
mCommitCallbackRegistrar.add("MediaCtrl.Volume", boost::bind(&LLPanelPrimMediaControls::onCommitVolumeSlider, this));
|
||||||
mCommitCallbackRegistrar.add("MediaCtrl.ToggleMute", boost::bind(&LLPanelPrimMediaControls::onToggleMute, this));
|
mCommitCallbackRegistrar.add("MediaCtrl.ToggleMute", boost::bind(&LLPanelPrimMediaControls::onToggleMute, this));
|
||||||
|
mCommitCallbackRegistrar.add("MediaCtrl.MOAPStop", std::bind([this]() { getTargetMediaImpl()->setDisabled(true); }));
|
||||||
mCommitCallbackRegistrar.add("MediaCtrl.ShowVolumeSlider", boost::bind(&LLPanelPrimMediaControls::showVolumeSlider, this));
|
mCommitCallbackRegistrar.add("MediaCtrl.ShowVolumeSlider", boost::bind(&LLPanelPrimMediaControls::showVolumeSlider, this));
|
||||||
mCommitCallbackRegistrar.add("MediaCtrl.HideVolumeSlider", boost::bind(&LLPanelPrimMediaControls::hideVolumeSlider, this));
|
mCommitCallbackRegistrar.add("MediaCtrl.HideVolumeSlider", boost::bind(&LLPanelPrimMediaControls::hideVolumeSlider, this));
|
||||||
mCommitCallbackRegistrar.add("MediaCtrl.SkipBack", boost::bind(&LLPanelPrimMediaControls::onClickSkipBack, this));
|
mCommitCallbackRegistrar.add("MediaCtrl.SkipBack", boost::bind(&LLPanelPrimMediaControls::onClickSkipBack, this));
|
||||||
@@ -150,6 +151,7 @@ BOOL LLPanelPrimMediaControls::postBuild()
|
|||||||
mPauseCtrl = getChild<LLUICtrl>("pause");
|
mPauseCtrl = getChild<LLUICtrl>("pause");
|
||||||
mStopCtrl = getChild<LLUICtrl>("stop");
|
mStopCtrl = getChild<LLUICtrl>("stop");
|
||||||
mMediaStopCtrl = getChild<LLUICtrl>("media_stop");
|
mMediaStopCtrl = getChild<LLUICtrl>("media_stop");
|
||||||
|
mMOAPStopCtrl = getChild<LLUICtrl>("moap_stop");
|
||||||
mHomeCtrl = getChild<LLUICtrl>("home");
|
mHomeCtrl = getChild<LLUICtrl>("home");
|
||||||
mUnzoomCtrl = getChild<LLUICtrl>("close"); // This is actually "unzoom"
|
mUnzoomCtrl = getChild<LLUICtrl>("close"); // This is actually "unzoom"
|
||||||
mOpenCtrl = getChild<LLUICtrl>("new_window");
|
mOpenCtrl = getChild<LLUICtrl>("new_window");
|
||||||
@@ -368,6 +370,7 @@ void LLPanelPrimMediaControls::updateShape()
|
|||||||
mReloadCtrl->setEnabled(false);
|
mReloadCtrl->setEnabled(false);
|
||||||
mReloadCtrl->setVisible(false);
|
mReloadCtrl->setVisible(false);
|
||||||
mMediaStopCtrl->setVisible(has_focus);
|
mMediaStopCtrl->setVisible(has_focus);
|
||||||
|
mMOAPStopCtrl->setVisible(false);
|
||||||
mHomeCtrl->setVisible(has_focus);
|
mHomeCtrl->setVisible(has_focus);
|
||||||
mBackCtrl->setVisible(false);
|
mBackCtrl->setVisible(false);
|
||||||
mFwdCtrl->setVisible(false);
|
mFwdCtrl->setVisible(false);
|
||||||
@@ -466,6 +469,7 @@ void LLPanelPrimMediaControls::updateShape()
|
|||||||
mPlayCtrl->setVisible(FALSE);
|
mPlayCtrl->setVisible(FALSE);
|
||||||
mPauseCtrl->setVisible(FALSE);
|
mPauseCtrl->setVisible(FALSE);
|
||||||
mMediaStopCtrl->setVisible(FALSE);
|
mMediaStopCtrl->setVisible(FALSE);
|
||||||
|
mMOAPStopCtrl->setVisible(!!media_plugin);
|
||||||
mMediaAddressCtrl->setVisible(has_focus && !mini_controls);
|
mMediaAddressCtrl->setVisible(has_focus && !mini_controls);
|
||||||
mMediaAddressCtrl->setEnabled(has_focus && !mini_controls);
|
mMediaAddressCtrl->setEnabled(has_focus && !mini_controls);
|
||||||
mMediaPlaySliderPanel->setVisible(FALSE);
|
mMediaPlaySliderPanel->setVisible(FALSE);
|
||||||
|
|||||||
@@ -155,6 +155,7 @@ private:
|
|||||||
LLUICtrl *mPauseCtrl;
|
LLUICtrl *mPauseCtrl;
|
||||||
LLUICtrl *mStopCtrl;
|
LLUICtrl *mStopCtrl;
|
||||||
LLUICtrl *mMediaStopCtrl;
|
LLUICtrl *mMediaStopCtrl;
|
||||||
|
LLUICtrl *mMOAPStopCtrl;
|
||||||
LLUICtrl *mHomeCtrl;
|
LLUICtrl *mHomeCtrl;
|
||||||
LLUICtrl *mUnzoomCtrl;
|
LLUICtrl *mUnzoomCtrl;
|
||||||
LLUICtrl *mOpenCtrl;
|
LLUICtrl *mOpenCtrl;
|
||||||
|
|||||||
@@ -398,7 +398,7 @@
|
|||||||
scale_image="false"
|
scale_image="false"
|
||||||
tool_tip="Mute This Media"
|
tool_tip="Mute This Media"
|
||||||
left_delta="5"
|
left_delta="5"
|
||||||
bottom="-22"
|
bottom="-20"
|
||||||
draw_border="true"
|
draw_border="true"
|
||||||
height="20"
|
height="20"
|
||||||
width="22" >
|
width="22" >
|
||||||
@@ -429,6 +429,26 @@
|
|||||||
function="MediaCtrl.HideVolumeSlider" />
|
function="MediaCtrl.HideVolumeSlider" />
|
||||||
</slider>
|
</slider>
|
||||||
</layout_panel>
|
</layout_panel>
|
||||||
|
<layout_panel
|
||||||
|
name="moap_stop"
|
||||||
|
mouse_opaque="false"
|
||||||
|
auto_resize="false"
|
||||||
|
user_resize="false"
|
||||||
|
height="28"
|
||||||
|
min_width="22"
|
||||||
|
width="22">
|
||||||
|
<button
|
||||||
|
name="stop_btn"
|
||||||
|
follows="top"
|
||||||
|
image_overlay="go-media-stop.png"
|
||||||
|
label=""
|
||||||
|
bottom="-22"
|
||||||
|
height="22"
|
||||||
|
tool_tip="Stop media"
|
||||||
|
width="22">
|
||||||
|
<button.commit_callback function="MediaCtrl.MOAPStop" />
|
||||||
|
</button>
|
||||||
|
</layout_panel>
|
||||||
<layout_panel
|
<layout_panel
|
||||||
name="zoom_frame"
|
name="zoom_frame"
|
||||||
mouse_opaque="false"
|
mouse_opaque="false"
|
||||||
|
|||||||
Reference in New Issue
Block a user