add window width and height to config
MODIFY
WalletWasabi.Fluent/UiConfig.cs
WalletWasabi.Fluent/UiConfig.cs
@@ -24,6 +24,8 @@ public class UiConfig : ConfigBase
private bool _autoPaste;
private int _feeTarget;
private bool _sendAmountConversionReversed;
+ private double? _windowWidth;
+ private double? _windowHeight;
public UiConfig() : base()
{
@@ -55,6 +57,14 @@ public class UiConfig : ConfigBase
.Skip(1) // Won't save on UiConfig creation.
.ObserveOn(RxApp.MainThreadScheduler)
.Subscribe(_ => ToFile());
+
+ this.WhenAnyValue(
+ x => x.WindowWidth,
+ x => x.WindowHeight)
+ .Throttle(TimeSpan.FromMilliseconds(500))
+ .Skip(1) // Won't save on UiConfig creation.
+ .ObserveOn(RxApp.TaskpoolScheduler)
+ .Subscribe(_ => ToFile());
}
[JsonProperty(PropertyName = "Oobe", DefaultValueHandling = DefaultValueHandling.Populate)]
@@ -160,4 +170,18 @@ public class UiConfig : ConfigBase
get => _sendAmountConversionReversed;
internal set => RaiseAndSetIfChanged(ref _sendAmountConversionReversed, value);
}
+
+ [JsonProperty(PropertyName = "WindowWidth")]
+ public double? WindowWidth
+ {
+ get => _windowWidth;
+ internal set => RaiseAndSetIfChanged(ref _windowWidth, value);
+ }
+
+ [JsonProperty(PropertyName = "WindowHeight")]
+ public double? WindowHeight
+ {
+ get => _windowHeight;
+ internal set => RaiseAndSetIfChanged(ref _windowHeight, value);
+ }
}

add window width and height to config