Make Torch UI remember its last screen size/position. Fixes #260
(this is Jim's fault)
This commit is contained in:
@@ -63,8 +63,8 @@ namespace Torch.Server
|
|||||||
public bool EnableWhitelist { get; set; } = false;
|
public bool EnableWhitelist { get; set; } = false;
|
||||||
public HashSet<ulong> Whitelist { get; set; } = new HashSet<ulong>();
|
public HashSet<ulong> Whitelist { get; set; } = new HashSet<ulong>();
|
||||||
|
|
||||||
internal Point WindowSize { get; set; } = new Point(800, 600);
|
public Point WindowSize { get; set; } = new Point(800, 600);
|
||||||
internal Point WindowPosition { get; set; } = new Point();
|
public Point WindowPosition { get; set; } = new Point();
|
||||||
|
|
||||||
public string LastUsedTheme { get; set; } = "Torch Theme";
|
public string LastUsedTheme { get; set; } = "Torch Theme";
|
||||||
|
|
||||||
|
@@ -102,6 +102,8 @@ namespace Torch.Server
|
|||||||
var newPos = new Point((int)Left, (int)Top);
|
var newPos = new Point((int)Left, (int)Top);
|
||||||
_config.WindowPosition = newPos;
|
_config.WindowPosition = newPos;
|
||||||
|
|
||||||
|
_config.Save(); //you idiot
|
||||||
|
|
||||||
if (_server?.State == ServerState.Running)
|
if (_server?.State == ServerState.Running)
|
||||||
_server.Stop();
|
_server.Stop();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user