vcl/source/window/menu.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4e76c3ab5f029a4a4bb1042ad225edc1116e4b44
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Tue Mar 8 12:08:34 2022 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Wed Mar 9 10:50:55 2022 +0100

    Related: tdf#146551 Make image and native checkmark same size in menu
    
    Commit 1be170d0629cf761f0ee4173007a3c021966546e tweaked the checked
    background rectangle to be 1 pixel shorter, to address the asymmetric
    vertical position of the rectangle on Windows, where toolbox button
    draw (used for the checked image state on menu) has 1 pixel smaller
    height than requested; but that seems incorrect. The native checkmark
    is drawn on e.g. 22 pixel high rectangle, while image background was
    20 pixel high after the abovementioned change.
    
    So instead of making top a bit lower, keep it as it was (aligned with
    the top of the menu item), and move its bottom 1 pixel down, to align
    with menu item's bottom.
    
    Change-Id: Ie1846061bf16fb8bb3ccf2ae1651c8b83b5b1283
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131174
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 6af85523f8a1..e06438828016 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1628,7 +1628,7 @@ static void ImplPaintCheckBackground(vcl::RenderContext & 
rRenderContext, vcl::W
         ImplControlValue    aControlValue;
         aControlValue.setTristateVal(ButtonValue::On);
         tools::Rectangle r = i_rRect;
-        r.AdjustTop(1);
+        r.AdjustBottom(1);
 
         bNativeOk = rRenderContext.DrawNativeControl(ControlType::Toolbar, 
ControlPart::Button,
                                                      r,

Reply via email to