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
|
else
|
||||||
{
|
{
|
||||||
context.TitlebarAutoHide = true;
|
context.TitlebarAutoHide = true;
|
||||||
|
context.Theme = Themes.Dark;
|
||||||
context.TitlebarBlurVisibility = true;
|
context.TitlebarBlurVisibility = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -90,6 +90,16 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid x:Name="videoControlContainer" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Height="32">
|
<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>
|
<Grid.Resources>
|
||||||
<Storyboard x:Key="ShowControlStoryboard" Completed="AutoHideViedoControlContainer">
|
<Storyboard x:Key="ShowControlStoryboard" Completed="AutoHideViedoControlContainer">
|
||||||
<DoubleAnimation
|
<DoubleAnimation
|
||||||
|
@@ -60,7 +60,7 @@ namespace QuickLook.Plugin.VideoViewer
|
|||||||
// apply global theme
|
// apply global theme
|
||||||
Resources.MergedDictionaries[0].MergedDictionaries.Clear();
|
Resources.MergedDictionaries[0].MergedDictionaries.Clear();
|
||||||
|
|
||||||
ShowViedoControlContainer(null, null);
|
//ShowViedoControlContainer(null, null);
|
||||||
viewerPanel.PreviewMouseMove += ShowViedoControlContainer;
|
viewerPanel.PreviewMouseMove += ShowViedoControlContainer;
|
||||||
|
|
||||||
mediaElement.PropertyChanged += PlayerPropertyChanged;
|
mediaElement.PropertyChanged += PlayerPropertyChanged;
|
||||||
|
@@ -171,7 +171,7 @@ namespace QuickLook
|
|||||||
if (Visibility != Visibility.Visible)
|
if (Visibility != Visibility.Visible)
|
||||||
Show();
|
Show();
|
||||||
|
|
||||||
ShowWindowCaptionContainer(null, null);
|
//ShowWindowCaptionContainer(null, null);
|
||||||
//WindowHelper.SetActivate(new WindowInteropHelper(this), ContextObject.CanFocus);
|
//WindowHelper.SetActivate(new WindowInteropHelper(this), ContextObject.CanFocus);
|
||||||
|
|
||||||
// load plugin, do not block UI
|
// load plugin, do not block UI
|
||||||
@@ -221,7 +221,7 @@ namespace QuickLook
|
|||||||
{
|
{
|
||||||
// limit str length
|
// limit str length
|
||||||
if (replaceWith.Length > 16)
|
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);
|
str = TranslationHelper.Get(str);
|
||||||
var elements = str.Split(new[] {"{0}"}, StringSplitOptions.None).ToList();
|
var elements = str.Split(new[] {"{0}"}, StringSplitOptions.None).ToList();
|
||||||
|
@@ -48,6 +48,16 @@
|
|||||||
<Grid x:Name="windowCaptionContainer" Height="{StaticResource MainWindowCaptionHeight}"
|
<Grid x:Name="windowCaptionContainer" Height="{StaticResource MainWindowCaptionHeight}"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
ZIndex="100">
|
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>
|
<Grid.Resources>
|
||||||
<Storyboard x:Key="ShowCaptionContainerStoryboard" Completed="AutoHideCaptionContainer">
|
<Storyboard x:Key="ShowCaptionContainerStoryboard" Completed="AutoHideCaptionContainer">
|
||||||
<DoubleAnimation
|
<DoubleAnimation
|
||||||
|
Reference in New Issue
Block a user