Skip to content

Commit

Permalink
config: EnableImageFocus -> EnableImageFocus
Browse files Browse the repository at this point in the history
  • Loading branch information
d2phap committed May 14, 2022
1 parent 2270956 commit 2e3de3a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions v9/Components/ImageGlass.Settings/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ public static class Config
/// <summary>
/// Gets, sets value indicates that the Image focus tool should be enable
/// </summary>
public static bool EnableImageFocus { get; set; } = false;
public static bool EnableImageFocusMode { get; set; } = false;

#endregion

Expand Down Expand Up @@ -465,13 +465,13 @@ public static class Config
public static int FrmMainHeight { get; set; } = 800;

/// <summary>
/// Gets, sets the panning speed when <see cref="EnableImageFocus"/> is on.
/// Gets, sets the panning speed when <see cref="EnableImageFocusMode"/> is on.
/// Value range is from 0 to 100.
/// </summary>
public static float PanSpeed { get; set; } = 20f;

/// <summary>
/// Gets, sets the zooming speed when <see cref="EnableImageFocus"/> is on.
/// Gets, sets the zooming speed when <see cref="EnableImageFocusMode"/> is on.
/// Value range is from -500 to 500.
/// </summary>
public static float ZoomSpeed { get; set; } = 0;
Expand Down Expand Up @@ -813,7 +813,7 @@ public static void Load()
UseRawThumbnail = items.GetValue(nameof(UseRawThumbnail), UseRawThumbnail);
//IsHideToolbarInFullscreen = items.GetValue(nameof(IsHideToolbarInFullscreen), IsHideToolbarInFullscreen);
//IsHideThumbnailBarInFullscreen = items.GetValue(nameof(IsHideThumbnailBarInFullscreen), IsHideThumbnailBarInFullscreen);
EnableImageFocus = items.GetValue(nameof(EnableImageFocus), EnableImageFocus);
EnableImageFocusMode = items.GetValue(nameof(EnableImageFocusMode), EnableImageFocusMode);

#endregion

Expand Down Expand Up @@ -1153,7 +1153,7 @@ private static dynamic PrepareJsonSettingObjects()
settings.TryAdd(nameof(UseRawThumbnail), UseRawThumbnail);
//settings.TryAdd(nameof(IsHideToolbarInFullscreen), IsHideToolbarInFullscreen);
//settings.TryAdd(nameof(IsHideThumbnailBarInFullscreen), IsHideThumbnailBarInFullscreen);
settings.TryAdd(nameof(EnableImageFocus), EnableImageFocus);
settings.TryAdd(nameof(EnableImageFocusMode), EnableImageFocusMode);

#endregion

Expand Down
2 changes: 1 addition & 1 deletion v9/ImageGlass/FrmMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1241,7 +1241,7 @@ private async void PicMain_DragDrop(object sender, DragEventArgs e)

private void PicMain_Click(object sender, EventArgs e)
{
if (Config.EnableImageFocus)
if (Config.EnableImageFocusMode)
{
PicMain.Focus();
}
Expand Down
2 changes: 1 addition & 1 deletion v9/ImageGlass/FrmMain/FrmMain.Configs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ private void FrmMainConfig_Load(object? sender, EventArgs e)
IG_ToggleTopMost(Config.EnableWindowAlwaysOnTop);

// EnableImageFocus
IG_ToggleImageFocus(Config.EnableImageFocus, showInAppMessage: false);
IG_ToggleImageFocus(Config.EnableImageFocusMode, showInAppMessage: false);

// load language pack
Local.UpdateFrmMain(ForceUpdateAction.Language);
Expand Down
8 changes: 4 additions & 4 deletions v9/ImageGlass/FrmMain/FrmMain.IGMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -661,8 +661,8 @@ private void IG_OpenWith()
/// <returns></returns>
private bool IG_ToggleImageFocus(bool? enable = null, bool showInAppMessage = true)
{
enable ??= !Config.EnableImageFocus;
Config.EnableImageFocus = enable.Value;
enable ??= !Config.EnableImageFocusMode;
Config.EnableImageFocusMode = enable.Value;

if (enable.Value)
{
Expand Down Expand Up @@ -692,12 +692,12 @@ private bool IG_ToggleImageFocus(bool? enable = null, bool showInAppMessage = tr

if (showInAppMessage)
{
var msgKey = Config.EnableImageFocus ? "_Enable" : "_Disable";
var msgKey = Config.EnableImageFocusMode ? "_Enable" : "_Disable";
PicMain.ShowMessage(Config.Language[$"{Name}.{nameof(MnuToggleImageFocus)}.{msgKey}"],
Config.InAppMessageDuration);
}

return Config.EnableImageFocus;
return Config.EnableImageFocusMode;
}


Expand Down

0 comments on commit 2e3de3a

Please sign in to comment.