From 99e0e14d2441c44b554608da416f3cd3b2207521 Mon Sep 17 00:00:00 2001 From: Samuel Mehrbrodt Date: Mon, 18 Nov 2019 13:33:31 +0100 Subject: tdf#84183 Give infobar close btn some 'clicked' state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Slightly smaller cross when the button is clicked on to have some feedback for the user Change-Id: If0486319e9816378b2011bbb366b4c577c1ad84a Reviewed-on: https://gerrit.libreoffice.org/83087 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt (cherry picked from commit 60c0874227201310c099fb717c0a665dbcf5bb33) Reviewed-on: https://gerrit.libreoffice.org/83190 Reviewed-by: Xisco FaulĂ­ --- sfx2/source/dialog/infobar.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sfx2') diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx index 84ab3d85f8d0..8fc9f6c32fe1 100644 --- a/sfx2/source/dialog/infobar.cxx +++ b/sfx2/source/dialog/infobar.cxx @@ -23,6 +23,7 @@ #include #include #include +#include using namespace std; using namespace drawinglayer::geometry; @@ -113,11 +114,15 @@ public: void SfxCloseButton::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&) { + Point aBtnPos(0, 0); + if (GetButtonState() & DrawButtonFlags::Pressed) + aBtnPos.Move(Size(1, 1)); + const ViewInformation2D aNewViewInfos; const unique_ptr pProcessor( createBaseProcessor2DFromOutputDevice(rRenderContext, aNewViewInfos)); - const ::tools::Rectangle aRect(Point(0, 0), PixelToLogic(GetSizePixel())); + const ::tools::Rectangle aRect(aBtnPos, PixelToLogic(GetSizePixel())); drawinglayer::primitive2d::Primitive2DContainer aSeq(2); -- cgit v1.2.3