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>
|
||||
<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>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource ControlButtonStyle}">
|
||||
<Setter Property="Content" Value="" />
|
||||
@@ -145,10 +145,10 @@
|
||||
</Style>
|
||||
</Button.Style>
|
||||
</Button>
|
||||
<Button x:Name="buttonLoop" DockPanel.Dock="Left">
|
||||
<Button x:Name="buttonLoop" ToolTip="Loop" DockPanel.Dock="Left">
|
||||
<Button.Style>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource ControlButtonStyle}">
|
||||
<Setter Property="Content" Value="" />
|
||||
<Setter Property="Content" Value="" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ShouldLoop, ElementName=viewerPanel}"
|
||||
Value="True">
|
||||
@@ -158,7 +158,7 @@
|
||||
</Style>
|
||||
</Button.Style>
|
||||
</Button>
|
||||
<Button x:Name="buttonMute" DockPanel.Dock="Right">
|
||||
<Button x:Name="buttonMute" ToolTip="Volume" DockPanel.Dock="Right">
|
||||
<Button.Style>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource ControlButtonStyle}">
|
||||
<Setter Property="Content"
|
||||
@@ -167,6 +167,7 @@
|
||||
</Button.Style>
|
||||
</Button>
|
||||
<Button x:Name="buttonTime" Width="37" Style="{StaticResource ControlButtonStyle}"
|
||||
ToolTip="Time Elapsed/Remaining"
|
||||
DockPanel.Dock="Right" Tag="Time">
|
||||
<TextBlock VerticalAlignment="Center" FontSize="11"
|
||||
FontFamily="{Binding ElementName=viewerPanel, Path=FontFamily}"
|
||||
|
@@ -70,6 +70,8 @@ namespace QuickLook.Plugin.VideoViewer
|
||||
mediaElement.MediaEnded += MediaEnded;
|
||||
mediaElement.MediaFailed += MediaFailed;
|
||||
|
||||
ShouldLoop = SettingHelper.Get("ShouldLoop", false);
|
||||
|
||||
buttonPlayPause.Click += TogglePlayPause;
|
||||
buttonLoop.Click += ToggleShouldLoop;
|
||||
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.
|
||||
SettingHelper.Set("VolumeDouble", mediaElement.Volume);
|
||||
SettingHelper.Set("ShouldLoop", ShouldLoop);
|
||||
|
||||
try
|
||||
{
|
||||
|
Reference in New Issue
Block a user