Skip to content

Commit

Permalink
Fixed that again
Browse files Browse the repository at this point in the history
  • Loading branch information
FenPhoenix committed Feb 21, 2021
1 parent dc50136 commit 827186a
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions AngelLoader/Forms/CustomControls/TabPageCustom.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions AngelLoader/WinAPI/InteropMisc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
9 changes: 9 additions & 0 deletions DarkUI/Controls/DarkTextBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 2 additions & 0 deletions DarkUI/Win32/Native.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit 827186a

Please sign in to comment.