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

New commits:
commit 70d2d1945a06dc6ec4f605e7462369a2f4937975
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Thu Nov 19 10:44:21 2020 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu Nov 19 18:10:05 2020 +0100

    tdf#138010 (I) Pass bounding rect when natively drawing frame
    
    Pass the bounding rectangle instead of the content rectangle
    in the call to 'DrawNativeControl' when natively drawing a frame
    here.
    
    Passing the content rect instead would result in the
    actual frame/border getting drawn into the area that is
    supposed to be used by the actual content if
    the content rect were different from the bounding rect.
    
    As far as I can see, this commit should not make any practical
    difference by itself for now, since Windows doesn't draw
    'ControlType::Frame' natively, macOS's
    'AquaSalGraphics::getNativeControlRegion' always returns the
    same value for the bounding and the content rect and
    gtk3 ('GtkSalGraphics::getNativeControlRegion') and
    qt5 ('Qt5Graphics_Controls::getNativeControlRegion')
    currently only take the border/frame width
    into account to calculate the actual content rect when
    the 'DrawFrameFlags::NoDraw' flag is passed, but
    then the actual drawing is skipped here anyway.
    
    This will be changed in follow-up commits to be
    able to take the actual frame width into account
    when rendering the actual content.
    
    Change-Id: I57c29794c0a06ed7d6fd9be211dc427791554048
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106154
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index 3d9044b1890f..34c534e746ab 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -623,7 +623,7 @@ void ImplDrawFrame( OutputDevice *const pDev, 
tools::Rectangle& rRect,
             // if bNoDraw is true then don't call the drawing routine
             // but just update the target rectangle
             if( bNoDraw ||
-                pWin->DrawNativeControl( ControlType::Frame, 
ControlPart::Border, aContent, ControlState::ENABLED,
+                pWin->DrawNativeControl( ControlType::Frame, 
ControlPart::Border, aBound, ControlState::ENABLED,
                                          aControlValue, OUString()) )
             {
                 rRect = aContent;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to