mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-11 09:49:07 +00:00
Fix #166: hide controls from beginning
This commit is contained in:
@@ -80,6 +80,7 @@ namespace QuickLook.Plugin.VideoViewer
|
||||
else
|
||||
{
|
||||
context.TitlebarAutoHide = true;
|
||||
context.Theme = Themes.Dark;
|
||||
context.TitlebarBlurVisibility = true;
|
||||
}
|
||||
}
|
||||
|
@@ -90,6 +90,16 @@
|
||||
</Grid>
|
||||
|
||||
<Grid x:Name="videoControlContainer" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Height="32">
|
||||
<Grid.Style>
|
||||
<Style TargetType="Grid">
|
||||
<Setter Property="Opacity" Value="1" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding HasVideo, ElementName=viewerPanel}" Value="True">
|
||||
<Setter Property="Opacity" Value="0" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Grid.Style>
|
||||
<Grid.Resources>
|
||||
<Storyboard x:Key="ShowControlStoryboard" Completed="AutoHideViedoControlContainer">
|
||||
<DoubleAnimation
|
||||
|
@@ -60,7 +60,7 @@ namespace QuickLook.Plugin.VideoViewer
|
||||
// apply global theme
|
||||
Resources.MergedDictionaries[0].MergedDictionaries.Clear();
|
||||
|
||||
ShowViedoControlContainer(null, null);
|
||||
//ShowViedoControlContainer(null, null);
|
||||
viewerPanel.PreviewMouseMove += ShowViedoControlContainer;
|
||||
|
||||
mediaElement.PropertyChanged += PlayerPropertyChanged;
|
||||
|
@@ -171,7 +171,7 @@ namespace QuickLook
|
||||
if (Visibility != Visibility.Visible)
|
||||
Show();
|
||||
|
||||
ShowWindowCaptionContainer(null, null);
|
||||
//ShowWindowCaptionContainer(null, null);
|
||||
//WindowHelper.SetActivate(new WindowInteropHelper(this), ContextObject.CanFocus);
|
||||
|
||||
// load plugin, do not block UI
|
||||
@@ -221,7 +221,7 @@ namespace QuickLook
|
||||
{
|
||||
// limit str length
|
||||
if (replaceWith.Length > 16)
|
||||
replaceWith = replaceWith.Substring(0, 14) + "…" + replaceWith.Substring(replaceWith.Length - 2);
|
||||
replaceWith = replaceWith.Substring(0, 8) + "…" + replaceWith.Substring(replaceWith.Length - 8);
|
||||
|
||||
str = TranslationHelper.Get(str);
|
||||
var elements = str.Split(new[] {"{0}"}, StringSplitOptions.None).ToList();
|
||||
|
@@ -48,6 +48,16 @@
|
||||
<Grid x:Name="windowCaptionContainer" Height="{StaticResource MainWindowCaptionHeight}"
|
||||
VerticalAlignment="Top"
|
||||
ZIndex="100">
|
||||
<Grid.Style>
|
||||
<Style TargetType="Grid">
|
||||
<Setter Property="Opacity" Value="1" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ContextObject.TitlebarAutoHide, ElementName=mainWindow}" Value="True">
|
||||
<Setter Property="Opacity" Value="0" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Grid.Style>
|
||||
<Grid.Resources>
|
||||
<Storyboard x:Key="ShowCaptionContainerStoryboard" Completed="AutoHideCaptionContainer">
|
||||
<DoubleAnimation
|
||||
|
Reference in New Issue
Block a user