Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1979 kryptonform temporary fix #1981

Merged
merged 2 commits into from
Dec 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ public KryptonForm()
_useDropShadow = false;
#pragma warning restore CS0618
TransparencyKey = GlobalStaticValues.TRANSPARENCY_KEY_COLOR; // Bug #1749

// #1979 Temporary fix
base.PaletteChanged += (s, e) => _internalKryptonPanel.PaletteMode = PaletteMode;
// END #1979 Temporary fix
}

private float GetDpiFactor()
Expand Down Expand Up @@ -241,8 +245,11 @@ protected override void Dispose(bool disposing)

// Unhook from the global static events
KryptonManager.GlobalPaletteChanged -= OnGlobalPaletteChanged;
KryptonManager.GlobalUseThemeFormChromeBorderWidthChanged -=
OnGlobalUseThemeFormChromeBorderWidthChanged;
KryptonManager.GlobalUseThemeFormChromeBorderWidthChanged -= OnGlobalUseThemeFormChromeBorderWidthChanged;

// #1979 Temporary fix
base.PaletteChanged -= (s, e) => _internalKryptonPanel.PaletteMode = PaletteMode;
// END #1979 Temporary fix

// Clear down the cached bitmap
if (_cacheBitmap != null)
Expand Down Expand Up @@ -1988,5 +1995,9 @@ public static bool GetIsInAdministratorMode()
return form.IsInAdministratorMode;
}
#endregion

#region #1979 Temporary Fix
public KryptonPanel InternalPanel => _internalKryptonPanel;
#endregion #1979 Temporary Fix
}
}