summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2020-11-19 10:44:21 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2020-11-19 18:10:05 +0100
commit70d2d1945a06dc6ec4f605e7462369a2f4937975 (patch)
tree9548cbbc813d2e5c02dfa8254dae2853b6a2cf62
parent60b568714eebcdfd53b3da5c23664909e64c42dc (diff)
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.weghorn@posteo.de>
-rw-r--r--vcl/source/window/decoview.cxx2
1 files changed, 1 insertions, 1 deletions
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;