mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-11 17:59:17 +00:00
Hide meta icon in Pdf viewing
This commit is contained in:
@@ -48,6 +48,7 @@ namespace QuickLook.Plugin.ImageViewer
|
||||
private DateTime _lastZoomTime = DateTime.MinValue;
|
||||
private double _maxZoomFactor = 3d;
|
||||
private Meta _meta;
|
||||
private Visibility _metaIconVisibility = Visibility.Visible;
|
||||
private double _minZoomFactor = 0.1d;
|
||||
private BitmapScalingMode _renderMode = BitmapScalingMode.HighQuality;
|
||||
private bool _showZoomLevelInfo = true;
|
||||
@@ -91,26 +92,6 @@ namespace QuickLook.Plugin.ImageViewer
|
||||
ShowMeta();
|
||||
}
|
||||
|
||||
private void ShowMeta()
|
||||
{
|
||||
textMeta.Inlines.Clear();
|
||||
Meta.GetSummary().ForEach(m =>
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(m.Key) || string.IsNullOrWhiteSpace(m.Value))
|
||||
return;
|
||||
|
||||
if (m.Key == "File name" || m.Key == "File size" || m.Key == "MIME type" || m.Key == "Exif comment"
|
||||
|| m.Key == "Thumbnail" || m.Key == "Exif comment")
|
||||
return;
|
||||
|
||||
textMeta.Inlines.Add(new Run(m.Key) {FontWeight = FontWeights.SemiBold});
|
||||
textMeta.Inlines.Add(": ");
|
||||
textMeta.Inlines.Add(m.Value);
|
||||
textMeta.Inlines.Add("\r\n");
|
||||
});
|
||||
textMeta.Inlines.Remove(textMeta.Inlines.LastInline);
|
||||
}
|
||||
|
||||
public bool ShowZoomLevelInfo
|
||||
{
|
||||
get => _showZoomLevelInfo;
|
||||
@@ -142,6 +123,16 @@ namespace QuickLook.Plugin.ImageViewer
|
||||
}
|
||||
}
|
||||
|
||||
public Visibility MetaIconVisibility
|
||||
{
|
||||
get => _metaIconVisibility;
|
||||
set
|
||||
{
|
||||
_metaIconVisibility = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public Visibility BackgroundVisibility
|
||||
{
|
||||
get => _backgroundVisibility;
|
||||
@@ -242,6 +233,26 @@ namespace QuickLook.Plugin.ImageViewer
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
private void ShowMeta()
|
||||
{
|
||||
textMeta.Inlines.Clear();
|
||||
Meta.GetSummary().ForEach(m =>
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(m.Key) || string.IsNullOrWhiteSpace(m.Value))
|
||||
return;
|
||||
|
||||
if (m.Key == "File name" || m.Key == "File size" || m.Key == "MIME type" || m.Key == "Exif comment"
|
||||
|| m.Key == "Thumbnail" || m.Key == "Exif comment")
|
||||
return;
|
||||
|
||||
textMeta.Inlines.Add(new Run(m.Key) {FontWeight = FontWeights.SemiBold});
|
||||
textMeta.Inlines.Add(": ");
|
||||
textMeta.Inlines.Add(m.Value);
|
||||
textMeta.Inlines.Add("\r\n");
|
||||
});
|
||||
textMeta.Inlines.Remove(textMeta.Inlines.LastInline);
|
||||
}
|
||||
|
||||
public event EventHandler<int> ImageScrolled;
|
||||
public event EventHandler DelayedReRender;
|
||||
|
||||
@@ -352,7 +363,7 @@ namespace QuickLook.Plugin.ImageViewer
|
||||
public void DoZoomToFit()
|
||||
{
|
||||
UpdateZoomToFitFactor();
|
||||
|
||||
|
||||
Zoom(ZoomToFitFactor, false, true);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user