Make the thumbnail location for the login page configurable

This commit is contained in:
Aura Asuna
2022-05-10 18:12:30 +10:00
parent 1a2a43c301
commit 533a208bff
4 changed files with 10 additions and 12 deletions

View File

@@ -78,6 +78,8 @@ namespace EveOPreview.Configuration.Implementation
this.EnableActiveClientHighlight = false; this.EnableActiveClientHighlight = false;
this.ActiveClientHighlightColor = Color.GreenYellow; this.ActiveClientHighlightColor = Color.GreenYellow;
this.ActiveClientHighlightThickness = 3; this.ActiveClientHighlightThickness = 3;
this.LoginThumbnailLocation = new Point(5, 5);
} }
[JsonProperty("CycleGroup1ForwardHotkeys")] [JsonProperty("CycleGroup1ForwardHotkeys")]
@@ -165,6 +167,9 @@ namespace EveOPreview.Configuration.Implementation
public int ActiveClientHighlightThickness { get; set; } public int ActiveClientHighlightThickness { get; set; }
[JsonProperty("LoginThumbnailLocation")]
public Point LoginThumbnailLocation { get; set; }
[JsonProperty] [JsonProperty]
private Dictionary<string, Dictionary<string, Point>> PerClientLayout { get; set; } private Dictionary<string, Dictionary<string, Point>> PerClientLayout { get; set; }
[JsonProperty] [JsonProperty]
@@ -178,14 +183,6 @@ namespace EveOPreview.Configuration.Implementation
[JsonProperty] [JsonProperty]
private List<string> PriorityClients { get; set; } private List<string> PriorityClients { get; set; }
public Point GetDefaultThumbnailLocation()
{
// Returns default thumbnail location
// This location can be used for f.e. EVE clients sitting on the login screen
// Can be made configurable later (that's why it was moved out here)
return new Point(5, 5);
}
public Point GetThumbnailLocation(string currentClient, string activeClient, Point defaultLocation) public Point GetThumbnailLocation(string currentClient, string activeClient, Point defaultLocation)
{ {
Point location; Point location;

View File

@@ -49,7 +49,8 @@ namespace EveOPreview.Configuration
Color ActiveClientHighlightColor { get; set; } Color ActiveClientHighlightColor { get; set; }
int ActiveClientHighlightThickness { get; set; } int ActiveClientHighlightThickness { get; set; }
Point GetDefaultThumbnailLocation(); Point LoginThumbnailLocation { get; set; }
Point GetThumbnailLocation(string currentClient, string activeClient, Point defaultLocation); Point GetThumbnailLocation(string currentClient, string activeClient, Point defaultLocation);
void SetThumbnailLocation(string currentClient, string activeClient, Point location); void SetThumbnailLocation(string currentClient, string activeClient, Point location);

View File

@@ -12,7 +12,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
[assembly: ComVisible(false)] [assembly: ComVisible(false)]
[assembly: Guid("04f08f8d-9e98-423b-acdb-4effb31c0d35")] [assembly: Guid("04f08f8d-9e98-423b-acdb-4effb31c0d35")]
[assembly: AssemblyVersion("6.0.0.0")] [assembly: AssemblyVersion("6.0.0.2")]
[assembly: AssemblyFileVersion("6.0.0.0")] [assembly: AssemblyFileVersion("6.0.0.2")]
[assembly: CLSCompliant(false)] [assembly: CLSCompliant(false)]

View File

@@ -217,7 +217,7 @@ namespace EveOPreview.Services
view.ThumbnailLocation = this.IsManageableThumbnail(view) view.ThumbnailLocation = this.IsManageableThumbnail(view)
? this._configuration.GetThumbnailLocation(view.Title, this._activeClient.Title, view.ThumbnailLocation) ? this._configuration.GetThumbnailLocation(view.Title, this._activeClient.Title, view.ThumbnailLocation)
: this._configuration.GetDefaultThumbnailLocation(); : this._configuration.LoginThumbnailLocation;
this._thumbnailViews.Add(view.Id, view); this._thumbnailViews.Add(view.Id, view);