diff --git a/Eve-O-Preview/Configuration/IThumbnailConfig.cs b/Eve-O-Preview/Configuration/IThumbnailConfig.cs index 0bb27fa..d563629 100644 --- a/Eve-O-Preview/Configuration/IThumbnailConfig.cs +++ b/Eve-O-Preview/Configuration/IThumbnailConfig.cs @@ -32,6 +32,7 @@ namespace EveOPreview.Configuration bool EnableActiveClientHighlight { get; set; } Color ActiveClientHighlightColor { get; set; } + int ActiveClientHighlightThickness { get; set; } Point GetThumbnailLocation(string currentClient, string activeClient, Point defaultLocation); void SetThumbnailLocation(string currentClient, string activeClient, Point location); diff --git a/Eve-O-Preview/Configuration/ThumbnailConfig.cs b/Eve-O-Preview/Configuration/ThumbnailConfig.cs index 1a56251..dd53fbf 100644 --- a/Eve-O-Preview/Configuration/ThumbnailConfig.cs +++ b/Eve-O-Preview/Configuration/ThumbnailConfig.cs @@ -32,7 +32,8 @@ namespace EveOPreview.Configuration this.ShowThumbnailFrames = true; this.EnableActiveClientHighlight = false; - this.ActiveClientHighlightColor = Color.Yellow; + this.ActiveClientHighlightColor = Color.GreenYellow; + this.ActiveClientHighlightThickness = 3; this.PerClientLayout = new Dictionary>(); this.FlatLayout = new Dictionary(); @@ -82,6 +83,8 @@ namespace EveOPreview.Configuration } private Color _activeClientHighlightColor; + public int ActiveClientHighlightThickness { get; set; } + [JsonProperty] private Dictionary> PerClientLayout { get; set; } [JsonProperty] @@ -181,6 +184,7 @@ namespace EveOPreview.Configuration ThumbnailConfig.ApplyRestrictions(this.ThumbnailSize.Height, this.ThumbnailMinimumSize.Height, this.ThumbnailMaximumSize.Height)); this.ThumbnailOpacity = ThumbnailConfig.ApplyRestrictions((int)(this.ThumbnailOpacity * 100.00), 20, 100) / 100.00; this.ThumbnailZoomFactor = ThumbnailConfig.ApplyRestrictions(this.ThumbnailZoomFactor, 2, 10); + this.ActiveClientHighlightThickness = ThumbnailConfig.ApplyRestrictions(this.ActiveClientHighlightThickness, 1, 3); } private static int ApplyRestrictions(int value, int minimum, int maximum) diff --git a/Eve-O-Preview/Presentation/ThumbnailManager.cs b/Eve-O-Preview/Presentation/ThumbnailManager.cs index 5ba49e2..9888953 100644 --- a/Eve-O-Preview/Presentation/ThumbnailManager.cs +++ b/Eve-O-Preview/Presentation/ThumbnailManager.cs @@ -137,7 +137,8 @@ namespace EveOPreview.UI view.IsOverlayEnabled = this._configuration.ShowThumbnailOverlays; - view.SetHighlight(this._configuration.EnableActiveClientHighlight && (view.Id == this._activeClientHandle), this._configuration.ActiveClientHighlightColor, 3); + view.SetHighlight(this._configuration.EnableActiveClientHighlight && (view.Id == this._activeClientHandle), + this._configuration.ActiveClientHighlightColor, this._configuration.ActiveClientHighlightThickness); if (!view.IsActive) { diff --git a/Eve-O-Preview/UI/Implementation/ThumbnailView.cs b/Eve-O-Preview/UI/Implementation/ThumbnailView.cs index cde6534..4c8c2be 100644 --- a/Eve-O-Preview/UI/Implementation/ThumbnailView.cs +++ b/Eve-O-Preview/UI/Implementation/ThumbnailView.cs @@ -329,9 +329,9 @@ namespace EveOPreview.UI int actualHeight = baseHeight - 2 * this._highlightWidth; double desiredWidth = actualHeight * baseAspectRatio; - int actualWidth = (int)Math.Round(desiredWidth); - int highlightWidthLeft = Math.Min(5, (baseWidth - actualWidth) / 2); - int highlightWidthRight = Math.Min(5, baseWidth - actualWidth - highlightWidthLeft); + int actualWidth = (int)Math.Round(desiredWidth, MidpointRounding.AwayFromZero); + int highlightWidthLeft = Math.Min(4, (baseWidth - actualWidth) / 2); + int highlightWidthRight = Math.Min(4, baseWidth - actualWidth - highlightWidthLeft); this._overlay.SetHighlightWidth(highlightWidthLeft, this._highlightWidth, highlightWidthRight, this._highlightWidth); this._thumbnail.rcDestination = new RECT(0 + highlightWidthLeft, 0 + this._highlightWidth, actualWidth + highlightWidthLeft, actualHeight + this._highlightWidth);