Make the 'thumbnail snap' feature optional
This commit is contained in:
@@ -36,6 +36,8 @@ namespace EveOPreview.Configuration.Omplementation
|
|||||||
this.ThumbnailMinimumSize = new Size(192, 108);
|
this.ThumbnailMinimumSize = new Size(192, 108);
|
||||||
this.ThumbnailMaximumSize = new Size(960, 540);
|
this.ThumbnailMaximumSize = new Size(960, 540);
|
||||||
|
|
||||||
|
this.EnableThumbnailSnap = true;
|
||||||
|
|
||||||
this.ThumbnailZoomEnabled = false;
|
this.ThumbnailZoomEnabled = false;
|
||||||
this.ThumbnailZoomFactor = 2;
|
this.ThumbnailZoomFactor = 2;
|
||||||
this.ThumbnailZoomAnchor = ZoomAnchor.NW;
|
this.ThumbnailZoomAnchor = ZoomAnchor.NW;
|
||||||
@@ -91,6 +93,8 @@ namespace EveOPreview.Configuration.Omplementation
|
|||||||
public Size ThumbnailMaximumSize { get; set; }
|
public Size ThumbnailMaximumSize { get; set; }
|
||||||
public Size ThumbnailMinimumSize { get; set; }
|
public Size ThumbnailMinimumSize { get; set; }
|
||||||
|
|
||||||
|
public bool EnableThumbnailSnap { get; set; }
|
||||||
|
|
||||||
[JsonProperty("EnableThumbnailZoom")]
|
[JsonProperty("EnableThumbnailZoom")]
|
||||||
public bool ThumbnailZoomEnabled { get; set; }
|
public bool ThumbnailZoomEnabled { get; set; }
|
||||||
public int ThumbnailZoomFactor { get; set; }
|
public int ThumbnailZoomFactor { get; set; }
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ namespace EveOPreview.Configuration
|
|||||||
Size ThumbnailMinimumSize { get; set; }
|
Size ThumbnailMinimumSize { get; set; }
|
||||||
Size ThumbnailMaximumSize { get; set; }
|
Size ThumbnailMaximumSize { get; set; }
|
||||||
|
|
||||||
|
bool EnableThumbnailSnap { get; set; }
|
||||||
|
|
||||||
bool ThumbnailZoomEnabled { get; set; }
|
bool ThumbnailZoomEnabled { get; set; }
|
||||||
int ThumbnailZoomFactor { get; set; }
|
int ThumbnailZoomFactor { get; set; }
|
||||||
ZoomAnchor ThumbnailZoomAnchor { get; set; }
|
ZoomAnchor ThumbnailZoomAnchor { get; set; }
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ namespace EveOPreview.Services
|
|||||||
{
|
{
|
||||||
if ((locationChange.ActiveClient == this._activeClient.Title) && this._thumbnailViews.TryGetValue(locationChange.Handle, out var view))
|
if ((locationChange.ActiveClient == this._activeClient.Title) && this._thumbnailViews.TryGetValue(locationChange.Handle, out var view))
|
||||||
{
|
{
|
||||||
this.DockThumbnailView(view);
|
this.SnapThumbnailView(view);
|
||||||
|
|
||||||
this.RaiseThumbnailLocationUpdatedNotification(view.Title, this._activeClient.Title, view.ThumbnailLocation);
|
this.RaiseThumbnailLocationUpdatedNotification(view.Title, this._activeClient.Title, view.ThumbnailLocation);
|
||||||
}
|
}
|
||||||
@@ -472,8 +472,14 @@ namespace EveOPreview.Services
|
|||||||
this.EnableViewEvents();
|
this.EnableViewEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DockThumbnailView(IThumbnailView view)
|
private void SnapThumbnailView(IThumbnailView view)
|
||||||
{
|
{
|
||||||
|
// Check if this feature is enabled
|
||||||
|
if (!this._configuration.EnableThumbnailSnap)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Only borderless thumbnails can be docked
|
// Only borderless thumbnails can be docked
|
||||||
if (this._configuration.ShowThumbnailFrames)
|
if (this._configuration.ShowThumbnailFrames)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user