mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-11 17:59:17 +00:00
Modify Loop icon; add tooltips; and save option on window close
This commit is contained in:
@@ -132,7 +132,7 @@
|
|||||||
</glassLayer:GlassLayer.Style>
|
</glassLayer:GlassLayer.Style>
|
||||||
</glassLayer:GlassLayer>
|
</glassLayer:GlassLayer>
|
||||||
<DockPanel Margin="8,0,8,0">
|
<DockPanel Margin="8,0,8,0">
|
||||||
<Button x:Name="buttonPlayPause" DockPanel.Dock="Left">
|
<Button x:Name="buttonPlayPause" ToolTip="Play/Pause" DockPanel.Dock="Left">
|
||||||
<Button.Style>
|
<Button.Style>
|
||||||
<Style TargetType="Button" BasedOn="{StaticResource ControlButtonStyle}">
|
<Style TargetType="Button" BasedOn="{StaticResource ControlButtonStyle}">
|
||||||
<Setter Property="Content" Value="" />
|
<Setter Property="Content" Value="" />
|
||||||
@@ -145,10 +145,10 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Button.Style>
|
</Button.Style>
|
||||||
</Button>
|
</Button>
|
||||||
<Button x:Name="buttonLoop" DockPanel.Dock="Left">
|
<Button x:Name="buttonLoop" ToolTip="Loop" DockPanel.Dock="Left">
|
||||||
<Button.Style>
|
<Button.Style>
|
||||||
<Style TargetType="Button" BasedOn="{StaticResource ControlButtonStyle}">
|
<Style TargetType="Button" BasedOn="{StaticResource ControlButtonStyle}">
|
||||||
<Setter Property="Content" Value="" />
|
<Setter Property="Content" Value="" />
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
<DataTrigger Binding="{Binding ShouldLoop, ElementName=viewerPanel}"
|
<DataTrigger Binding="{Binding ShouldLoop, ElementName=viewerPanel}"
|
||||||
Value="True">
|
Value="True">
|
||||||
@@ -158,7 +158,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Button.Style>
|
</Button.Style>
|
||||||
</Button>
|
</Button>
|
||||||
<Button x:Name="buttonMute" DockPanel.Dock="Right">
|
<Button x:Name="buttonMute" ToolTip="Volume" DockPanel.Dock="Right">
|
||||||
<Button.Style>
|
<Button.Style>
|
||||||
<Style TargetType="Button" BasedOn="{StaticResource ControlButtonStyle}">
|
<Style TargetType="Button" BasedOn="{StaticResource ControlButtonStyle}">
|
||||||
<Setter Property="Content"
|
<Setter Property="Content"
|
||||||
@@ -167,6 +167,7 @@
|
|||||||
</Button.Style>
|
</Button.Style>
|
||||||
</Button>
|
</Button>
|
||||||
<Button x:Name="buttonTime" Width="37" Style="{StaticResource ControlButtonStyle}"
|
<Button x:Name="buttonTime" Width="37" Style="{StaticResource ControlButtonStyle}"
|
||||||
|
ToolTip="Time Elapsed/Remaining"
|
||||||
DockPanel.Dock="Right" Tag="Time">
|
DockPanel.Dock="Right" Tag="Time">
|
||||||
<TextBlock VerticalAlignment="Center" FontSize="11"
|
<TextBlock VerticalAlignment="Center" FontSize="11"
|
||||||
FontFamily="{Binding ElementName=viewerPanel, Path=FontFamily}"
|
FontFamily="{Binding ElementName=viewerPanel, Path=FontFamily}"
|
||||||
|
@@ -70,6 +70,8 @@ namespace QuickLook.Plugin.VideoViewer
|
|||||||
mediaElement.MediaEnded += MediaEnded;
|
mediaElement.MediaEnded += MediaEnded;
|
||||||
mediaElement.MediaFailed += MediaFailed;
|
mediaElement.MediaFailed += MediaFailed;
|
||||||
|
|
||||||
|
ShouldLoop = SettingHelper.Get("ShouldLoop", false);
|
||||||
|
|
||||||
buttonPlayPause.Click += TogglePlayPause;
|
buttonPlayPause.Click += TogglePlayPause;
|
||||||
buttonLoop.Click += ToggleShouldLoop;
|
buttonLoop.Click += ToggleShouldLoop;
|
||||||
buttonTime.Click += (sender, e) => buttonTime.Tag = (string) buttonTime.Tag == "Time" ? "Length" : "Time";
|
buttonTime.Click += (sender, e) => buttonTime.Tag = (string) buttonTime.Tag == "Time" ? "Length" : "Time";
|
||||||
@@ -144,6 +146,7 @@ namespace QuickLook.Plugin.VideoViewer
|
|||||||
{
|
{
|
||||||
// old plugin use an int-typed "Volume" config key ranged from 0 to 100. Let's use a new one here.
|
// old plugin use an int-typed "Volume" config key ranged from 0 to 100. Let's use a new one here.
|
||||||
SettingHelper.Set("VolumeDouble", mediaElement.Volume);
|
SettingHelper.Set("VolumeDouble", mediaElement.Volume);
|
||||||
|
SettingHelper.Set("ShouldLoop", ShouldLoop);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user