diff options
author | Neil <nyamatongwe@gmail.com> | 2025-03-12 09:30:49 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2025-03-12 09:30:49 +1100 |
commit | f73a19c810ff40d004f4c0e154de98bf4a52c010 (patch) | |
tree | 0b8bbd783db3aaaee1a29bc68bdbf9e5d74e2cad /win32/PlatWin.cxx | |
parent | fba60a84ae848ce661fefa7e7bb31754fe889b7b (diff) | |
download | scintilla-mirror-f73a19c810ff40d004f4c0e154de98bf4a52c010.tar.gz |
Hoist RECT to PRectangle conversions into a function.
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r-- | win32/PlatWin.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 7598f9447..930c0fa8b 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -2765,7 +2765,7 @@ void Window::Destroy() noexcept { PRectangle Window::GetPosition() const { RECT rc; ::GetWindowRect(HwndFromWindowID(wid), &rc); - return PRectangle::FromInts(rc.left, rc.top, rc.right, rc.bottom); + return PRectangleFromRECT(rc); } void Window::SetPosition(PRectangle rc) { @@ -2829,7 +2829,7 @@ PRectangle Window::GetClientPosition() const { RECT rc={0,0,0,0}; if (wid) ::GetClientRect(HwndFromWindowID(wid), &rc); - return PRectangle::FromInts(rc.left, rc.top, rc.right, rc.bottom); + return PRectangleFromRECT(rc); } void Window::Show(bool show) { @@ -3637,7 +3637,7 @@ void ListBoxX::AdjustWindowRect(PRectangle *rc, UINT dpiAdjust) const noexcept { } else { ::AdjustWindowRectEx(&rcw, frameStyle, false, WS_EX_WINDOWEDGE); } - *rc = PRectangle::FromInts(rcw.left, rcw.top, rcw.right, rcw.bottom); + *rc = PRectangleFromRECT(rcw); } int ListBoxX::ItemHeight() const noexcept { |