https://git.reactos.org/?p=reactos.git;a=commitdiff;h=611d89eb8bf30edd09a1b3b41f3044fdb969093e

commit 611d89eb8bf30edd09a1b3b41f3044fdb969093e
Author:     Katayama Hirofumi MZ <katayama.hirofumi...@gmail.com>
AuthorDate: Mon Oct 9 08:37:31 2023 +0900
Commit:     GitHub <nore...@github.com>
CommitDate: Mon Oct 9 08:37:31 2023 +0900

    [MSPAINT] Add border width to tool box (#5780)
    
    Make tool box pixel-perfect. Add two border widths to the tool box.
    CORE-19217
---
 base/applications/mspaint/toolbox.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/base/applications/mspaint/toolbox.cpp 
b/base/applications/mspaint/toolbox.cpp
index 54d5bd8c2a4..891093f3f77 100644
--- a/base/applications/mspaint/toolbox.cpp
+++ b/base/applications/mspaint/toolbox.cpp
@@ -34,7 +34,12 @@ CPaintToolBar::ToolBarWndProc(HWND hwnd, UINT uMsg, WPARAM 
wParam, LPARAM lParam
 BOOL CPaintToolBar::DoCreate(HWND hwndParent)
 {
     // NOTE: The horizontal line above the toolbar is hidden by CCS_NODIVIDER 
style.
-    RECT toolbarPos = { 0, 0, CX_TOOLBAR, CY_TOOLBAR };
+    RECT toolbarPos =
+    {
+        0, 0,
+        CX_TOOLBAR + 2 * GetSystemMetrics(SM_CXBORDER),
+        CY_TOOLBAR + 2 * GetSystemMetrics(SM_CYBORDER)
+    };
     DWORD style = WS_CHILD | WS_VISIBLE | CCS_NOPARENTALIGN | CCS_VERT | 
CCS_NORESIZE |
                   TBSTYLE_TOOLTIPS | TBSTYLE_FLAT;
     if (!CWindow::Create(TOOLBARCLASSNAME, hwndParent, toolbarPos, NULL, 
style))

Reply via email to