diff --git a/AngelLoader/Forms/CustomControls/RichTextBoxCustom/RichTextBoxCustom.cs b/AngelLoader/Forms/CustomControls/RichTextBoxCustom/RichTextBoxCustom.cs index efde84566..605b0e927 100644 --- a/AngelLoader/Forms/CustomControls/RichTextBoxCustom/RichTextBoxCustom.cs +++ b/AngelLoader/Forms/CustomControls/RichTextBoxCustom/RichTextBoxCustom.cs @@ -301,7 +301,7 @@ protected override void OnVScroll(EventArgs e) { Workarounds_OnVScroll(); base.OnVScroll(e); - //Scroll?.Invoke(this, EventArgs.Empty); + Scroll?.Invoke(this, EventArgs.Empty); } protected override void OnVisibleChanged(EventArgs e) diff --git a/AngelLoader/Forms/CustomControls/TabPageCustom.cs b/AngelLoader/Forms/CustomControls/TabPageCustom.cs index 932f52bf3..ea872285a 100644 --- a/AngelLoader/Forms/CustomControls/TabPageCustom.cs +++ b/AngelLoader/Forms/CustomControls/TabPageCustom.cs @@ -78,6 +78,13 @@ protected override void WndProc(ref Message m) base.WndProc(ref m); } break; + case InteropMisc.WM_PAINT: + if (_darkModeEnabled) + { + VisibilityChanged?.Invoke(this, EventArgs.Empty); + } + base.WndProc(ref m); + break; default: base.WndProc(ref m); break; diff --git a/AngelLoader/WinAPI/InteropMisc.cs b/AngelLoader/WinAPI/InteropMisc.cs index 0c43cfdfb..480f60b39 100644 --- a/AngelLoader/WinAPI/InteropMisc.cs +++ b/AngelLoader/WinAPI/InteropMisc.cs @@ -18,6 +18,7 @@ internal static class InteropMisc internal const int WM_SETREDRAW = 11; internal const int WM_NCPAINT = 0x0085; internal const int WM_CTLCOLORSCROLLBAR = 0x0137; + internal const int WM_PAINT = 0x000F; internal const int OCM__BASE = 8192; internal const int OCM_HSCROLL = (OCM__BASE + WM_HSCROLL); diff --git a/DarkUI/Controls/DarkTextBox.cs b/DarkUI/Controls/DarkTextBox.cs index 0221e1dc2..6c58a38b2 100644 --- a/DarkUI/Controls/DarkTextBox.cs +++ b/DarkUI/Controls/DarkTextBox.cs @@ -134,6 +134,15 @@ protected override void WndProc(ref Message m) { switch (m.Msg) { + case Native.WM_PAINT: + case Native.WM_VSCROLL: + base.WndProc(ref m); + if (_darkModeEnabled) + { + VisibilityChanged?.Invoke(this, EventArgs.Empty); + } + break; + case Native.WM_CTLCOLORSCROLLBAR: case Native.WM_NCPAINT: if (_darkModeEnabled) { diff --git a/DarkUI/Win32/Native.cs b/DarkUI/Win32/Native.cs index 4869f7974..7ea8477e5 100644 --- a/DarkUI/Win32/Native.cs +++ b/DarkUI/Win32/Native.cs @@ -63,6 +63,8 @@ internal sealed class Native public const int WM_NCPAINT = 0x0085; public const int WM_CTLCOLORSCROLLBAR = 0x0137; + public const int WM_VSCROLL = 0x115; + public const int WM_PAINT = 0x000F; public struct POINTS {