mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-11 09:49:07 +00:00
Fix windows timer resolution
This commit is contained in:
@@ -31,7 +31,7 @@ namespace QuickLook.Common.Plugin
|
|||||||
{
|
{
|
||||||
private bool _canResize = true;
|
private bool _canResize = true;
|
||||||
private bool _fullWindowDragging;
|
private bool _fullWindowDragging;
|
||||||
private bool _isBusy = true;
|
private bool _isBusy;
|
||||||
private string _title = string.Empty;
|
private string _title = string.Empty;
|
||||||
private bool _titlebarAutoHide;
|
private bool _titlebarAutoHide;
|
||||||
private bool _titlebarBlurVisibility;
|
private bool _titlebarBlurVisibility;
|
||||||
@@ -207,7 +207,8 @@ namespace QuickLook.Common.Plugin
|
|||||||
public void Reset()
|
public void Reset()
|
||||||
{
|
{
|
||||||
Title = string.Empty;
|
Title = string.Empty;
|
||||||
IsBusy = true;
|
// set to False to prevent showing loading icon
|
||||||
|
IsBusy = false;
|
||||||
PreferredSize = new Size();
|
PreferredSize = new Size();
|
||||||
CanResize = true;
|
CanResize = true;
|
||||||
FullWindowDragging = false;
|
FullWindowDragging = false;
|
||||||
|
@@ -70,7 +70,7 @@ namespace QuickLook.Controls.BusyDecorator
|
|||||||
{
|
{
|
||||||
GC.SuppressFinalize(this);
|
GC.SuppressFinalize(this);
|
||||||
|
|
||||||
_busyHost.ThreadedHelper.Exit();
|
_busyHost.ThreadedHelper?.Exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Visual GetVisualChild(int index)
|
protected override Visual GetVisualChild(int index)
|
||||||
|
@@ -152,35 +152,12 @@
|
|||||||
<ContentControl x:Name="container"
|
<ContentControl x:Name="container"
|
||||||
Foreground="{DynamicResource WindowTextForeground}"
|
Foreground="{DynamicResource WindowTextForeground}"
|
||||||
Content="{Binding ContextObject.ViewerContent, ElementName=mainWindow}" />
|
Content="{Binding ContextObject.ViewerContent, ElementName=mainWindow}" />
|
||||||
<DockPanel.Style>
|
|
||||||
<Style TargetType="{x:Type DockPanel}">
|
|
||||||
<Setter Property="Visibility" Value="Visible" />
|
|
||||||
<Style.Triggers>
|
|
||||||
<DataTrigger
|
|
||||||
Binding="{Binding ContextObject.IsBusy, ElementName=mainWindow}"
|
|
||||||
Value="True">
|
|
||||||
<Setter Property="Visibility" Value="Hidden" />
|
|
||||||
</DataTrigger>
|
|
||||||
</Style.Triggers>
|
|
||||||
</Style>
|
|
||||||
</DockPanel.Style>
|
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid x:Name="busyIndicatorLayer" ZIndex="200">
|
<Grid x:Name="busyIndicatorLayer" ZIndex="200"
|
||||||
<Grid.Style>
|
Visibility="{Binding ElementName=mainWindow, Path=ContextObject.IsBusy, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||||
<Style TargetType="{x:Type Grid}">
|
|
||||||
<Setter Property="Visibility" Value="Collapsed" />
|
|
||||||
<Style.Triggers>
|
|
||||||
<DataTrigger
|
|
||||||
Binding="{Binding ContextObject.IsBusy, ElementName=mainWindow}"
|
|
||||||
Value="True">
|
|
||||||
<Setter Property="Visibility" Value="Visible" />
|
|
||||||
</DataTrigger>
|
|
||||||
</Style.Triggers>
|
|
||||||
</Style>
|
|
||||||
</Grid.Style>
|
|
||||||
<busyDecorator:BusyDecorator x:Name="busyDecorator"
|
<busyDecorator:BusyDecorator x:Name="busyDecorator"
|
||||||
IsBusyIndicatorShowing="True"
|
IsBusyIndicatorShowing="{Binding ElementName=mainWindow, Path=ContextObject.IsBusy}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
HorizontalAlignment="Center" />
|
HorizontalAlignment="Center" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
Reference in New Issue
Block a user