mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-11 20:34:07 +02:00
Remove UserConfig.ZoomMultiplier and old migration code
This commit is contained in:
parent
6f1afb94fb
commit
be08fd4445
@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using TweetDuck.Core.Controls;
|
||||
@ -11,16 +10,7 @@
|
||||
|
||||
namespace TweetDuck.Configuration{
|
||||
sealed class UserConfig{
|
||||
private static readonly FileSerializer<UserConfig> Serializer = new FileSerializer<UserConfig>{ HandleUnknownProperties = HandleUnknownProperties };
|
||||
|
||||
private static void HandleUnknownProperties(UserConfig obj, Dictionary<string, string> data){
|
||||
data.Remove("EnableBrowserGCReload");
|
||||
data.Remove("BrowserMemoryThreshold");
|
||||
|
||||
if (data.Count == 0){
|
||||
obj.Save();
|
||||
}
|
||||
}
|
||||
private static readonly FileSerializer<UserConfig> Serializer = new FileSerializer<UserConfig>();
|
||||
|
||||
static UserConfig(){
|
||||
Serializer.RegisterTypeConverter(typeof(WindowState), WindowState.Converter);
|
||||
@ -56,7 +46,7 @@ static UserConfig(){
|
||||
public bool BestImageQuality { get; set; } = true;
|
||||
public bool EnableSpellCheck { get; set; } = false;
|
||||
public int VideoPlayerVolume { get; set; } = 50;
|
||||
private int _zoomLevel = 100;
|
||||
private int _zoomLevel = 100;
|
||||
private bool _muteNotifications;
|
||||
|
||||
private TrayIcon.Behavior _trayBehavior = TrayIcon.Behavior.Disabled;
|
||||
@ -124,9 +114,7 @@ public int ZoomLevel{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public double ZoomMultiplier => _zoomLevel/100.0;
|
||||
|
||||
|
||||
public TrayIcon.Behavior TrayBehavior{
|
||||
get => _trayBehavior;
|
||||
|
||||
|
@ -93,7 +93,7 @@ protected virtual FormBorderStyle NotificationBorderStyle{
|
||||
protected override bool ShowWithoutActivation => true;
|
||||
|
||||
protected float DpiScale { get; }
|
||||
protected double SizeScale => DpiScale*Program.UserConfig.ZoomMultiplier;
|
||||
protected double SizeScale => DpiScale*Program.UserConfig.ZoomLevel/100.0;
|
||||
|
||||
protected readonly FormBrowser owner;
|
||||
protected readonly ChromiumWebBrowser browser;
|
||||
|
Loading…
Reference in New Issue
Block a user