mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
[AlwaysOnTop] Inaccurate border position fix (#16206)
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
#include "WindowBorder.h"
|
||||
|
||||
#include <dwmapi.h>
|
||||
#include "winrt/Windows.Foundation.h"
|
||||
|
||||
#include <FrameDrawer.h>
|
||||
#include <Settings.h>
|
||||
#include "winrt/Windows.Foundation.h"
|
||||
|
||||
// Non-Localizable strings
|
||||
namespace NonLocalizable
|
||||
@@ -21,7 +21,7 @@ std::optional<RECT> GetFrameRect(HWND window)
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
int border = static_cast<int>(AlwaysOnTopSettings::settings().frameThickness / 2);
|
||||
int border = AlwaysOnTopSettings::settings().frameThickness;
|
||||
rect.top -= border;
|
||||
rect.left -= border;
|
||||
rect.right += border;
|
||||
@@ -122,8 +122,8 @@ bool WindowBorder::Init(HINSTANCE hinstance)
|
||||
, m_window
|
||||
, windowRect.left
|
||||
, windowRect.top
|
||||
, windowRect.right - windowRect.left - static_cast<int>(AlwaysOnTopSettings::settings().frameThickness)
|
||||
, windowRect.bottom - windowRect.top - static_cast<int>(AlwaysOnTopSettings::settings().frameThickness)
|
||||
, windowRect.right - windowRect.left
|
||||
, windowRect.bottom - windowRect.top
|
||||
, SWP_NOMOVE | SWP_NOSIZE);
|
||||
|
||||
m_frameDrawer = FrameDrawer::Create(m_window);
|
||||
|
||||
Reference in New Issue
Block a user