Skip to content

Commit

Permalink
fix: reduce layout shadow padding
Browse files Browse the repository at this point in the history
  • Loading branch information
blurfx committed Jul 4, 2021
1 parent 067835c commit c04067c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ static bool EnumWindow(IntPtr Handle, IntPtr Parameter)

const int UPDATE_RATE = 100;

const int LAYOUT_SHADOW_PADDING = 2;

const int MAINVIEW_PADDING = 31;

static uint WM_CLOSE = 0x10;
#endregion

Expand Down Expand Up @@ -283,8 +287,8 @@ private static void HideLockScreenAdArea(StringBuilder windowCaption, IntPtr wnd
{
if (windowCaption.ToString().StartsWith("LockModeView") && GetParent(childHwnd) == wnd)
{
var width = rectKakaoTalk.Right - rectKakaoTalk.Left;
var height = (rectKakaoTalk.Bottom - rectKakaoTalk.Top); // 38; there might be dragon. don't touch it.
var width = rectKakaoTalk.Right - rectKakaoTalk.Left - LAYOUT_SHADOW_PADDING;
var height = rectKakaoTalk.Bottom - rectKakaoTalk.Top;
UpdateWindow(wnd);
SetWindowPos(childHwnd, IntPtr.Zero, 0, 0, width, height, SetWindowPosFlags.SWP_NOMOVE);
}
Expand All @@ -294,8 +298,8 @@ private static void HideMainViewAdArea(StringBuilder windowCaption, IntPtr wnd,
{
if (windowCaption.ToString().StartsWith("OnlineMainView") && GetParent(childHwnd) == wnd)
{
var width = rectKakaoTalk.Right - rectKakaoTalk.Left - 2;
var height = (rectKakaoTalk.Bottom - rectKakaoTalk.Top) - 31; // 31; there might be dragon. don't touch it.
var width = rectKakaoTalk.Right - rectKakaoTalk.Left - LAYOUT_SHADOW_PADDING;
var height = rectKakaoTalk.Bottom - rectKakaoTalk.Top - MAINVIEW_PADDING;
UpdateWindow(wnd);
SetWindowPos(childHwnd, IntPtr.Zero, 0, 0, width, height, SetWindowPosFlags.SWP_NOMOVE);
}
Expand Down

0 comments on commit c04067c

Please sign in to comment.