sfx2/source/dialog/infobar.cxx |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 06d8c1e9d8ba1d04914d1c48c94732cdb5c68846
Author:     Heiko Tietze <tietze.he...@gmail.com>
AuthorDate: Wed Mar 6 10:35:53 2024 +0100
Commit:     Heiko Tietze <heiko.tie...@documentfoundation.org>
CommitDate: Wed Mar 6 11:58:07 2024 +0100

    Resolves tdf#159486 - Larger hitbox for close button on infobar
    
    Change-Id: I83582c0c1ec7dd5e8f82bdf327e68ce88122ad03
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164450
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org>

diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx
index ca848813f09e..38a510a2589c 100644
--- a/sfx2/source/dialog/infobar.cxx
+++ b/sfx2/source/dialog/infobar.cxx
@@ -103,9 +103,12 @@ void SfxInfoBarWindow::SetCloseButtonImage()
     aSize = Size(aSize.Width() * 1.5, aSize.Height() * 1.5);
 
     ScopedVclPtr<VirtualDevice> xDevice(m_xCloseBtn->create_virtual_device());
-    xDevice->SetOutputSizePixel(aSize);
+    xDevice->SetOutputSizePixel(Size(24, 24));
+    xDevice->SetBackground(Color(m_aBackgroundColor));
+    xDevice->Erase();
 
-    Point aBtnPos(0, 0);
+    const int nPos = (24 - aSize.getWidth()) / 2;
+    Point aBtnPos(nPos, nPos);
 
     const ViewInformation2D aNewViewInfos;
     const std::unique_ptr<BaseProcessor2D> pProcessor(

Reply via email to