Skip to content
代码片段 群组 项目
提交 db2ecdc3 编辑于 作者: Paddy Xu's avatar Paddy Xu
浏览文件

Modify Loop icon; add tooltips; and save option on window close

上级 401976e2
No related branches found
No related tags found
无相关合并请求
......@@ -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="&#xE769;" />
......@@ -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="&#xE72C;" />
<Setter Property="Content" Value="&#xE8D8;" />
<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
{
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册