mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-10-19 01:54:08 +00:00
Support VideoViewer error text wrapping
This commit is contained in:
@@ -204,8 +204,12 @@ public partial class ViewerPanel : UserControl, IDisposable, INotifyPropertyChan
|
|||||||
{
|
{
|
||||||
((MediaUriElement)sender).Dispatcher.BeginInvoke(new Action(() =>
|
((MediaUriElement)sender).Dispatcher.BeginInvoke(new Action(() =>
|
||||||
{
|
{
|
||||||
_context.ViewerContent =
|
_context.ViewerContent = new TextBlock()
|
||||||
new Label { Content = e.Exception, VerticalAlignment = VerticalAlignment.Center };
|
{
|
||||||
|
Text = e.Exception.ToString(),
|
||||||
|
TextWrapping = TextWrapping.Wrap,
|
||||||
|
VerticalAlignment = VerticalAlignment.Center,
|
||||||
|
};
|
||||||
_context.IsBusy = false;
|
_context.IsBusy = false;
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@@ -215,7 +219,7 @@ public partial class ViewerPanel : UserControl, IDisposable, INotifyPropertyChan
|
|||||||
if (mediaElement == null)
|
if (mediaElement == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mediaElement.MediaPosition = 0;
|
mediaElement.MediaPosition = 0L;
|
||||||
if (ShouldLoop)
|
if (ShouldLoop)
|
||||||
{
|
{
|
||||||
IsPlaying = true;
|
IsPlaying = true;
|
||||||
@@ -233,7 +237,7 @@ public partial class ViewerPanel : UserControl, IDisposable, INotifyPropertyChan
|
|||||||
private void ShowViedoControlContainer(object sender, MouseEventArgs e)
|
private void ShowViedoControlContainer(object sender, MouseEventArgs e)
|
||||||
{
|
{
|
||||||
var show = (Storyboard)videoControlContainer.FindResource("ShowControlStoryboard");
|
var show = (Storyboard)videoControlContainer.FindResource("ShowControlStoryboard");
|
||||||
if (videoControlContainer.Opacity == 0 || videoControlContainer.Opacity == 1)
|
if (videoControlContainer.Opacity == 0d || videoControlContainer.Opacity == 1d)
|
||||||
show.Begin();
|
show.Begin();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user