summaryrefslogtreecommitdiff
path: root/vcl/source/control
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-07-04 14:58:03 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-07-04 20:18:38 +0200
commita2dacae0c8acfad8a5e5a16c766ee740ec202c5e (patch)
treeccbade7520a778748edf11a5c016707e551d127d /vcl/source/control
parentc1dcffceb14cd35c7168ba2108b2f2e9aa875b56 (diff)
unnecessary LogicToPixel in ComboBox::Draw
we are already using logical pixels here, and Draw wants logical pixels Change-Id: I5409abccef4473cbca4d38654a27a677e68d82f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153968 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/control')
-rw-r--r--vcl/source/control/combobox.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 2fa7913c5148..0edd309ba7f2 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -1152,7 +1152,6 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, SystemTextColorFlags
{
GetMainWindow()->ApplySettings(*pDev);
- Point aPos = pDev->LogicToPixel( rPos );
Size aSize = GetSizePixel();
vcl::Font aFont = GetMainWindow()->GetDrawPixelFont( pDev );
@@ -1168,7 +1167,7 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, SystemTextColorFlags
bool bBackground = IsControlBackground();
if ( bBorder || bBackground )
{
- tools::Rectangle aRect( aPos, aSize );
+ tools::Rectangle aRect( rPos, aSize );
// aRect.Top() += nEditHeight;
if ( bBorder )
{
@@ -1192,7 +1191,7 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, SystemTextColorFlags
// First, draw the edit part
Size aOrigSize(m_pImpl->m_pSubEdit->GetSizePixel());
m_pImpl->m_pSubEdit->SetSizePixel(Size(aSize.Width(), nEditHeight));
- m_pImpl->m_pSubEdit->Draw( pDev, aPos, nFlags );
+ m_pImpl->m_pSubEdit->Draw( pDev, rPos, nFlags );
m_pImpl->m_pSubEdit->SetSizePixel(aOrigSize);
// Second, draw the listbox
@@ -1220,14 +1219,14 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, SystemTextColorFlags
}
}
- tools::Rectangle aClip( aPos, aSize );
+ tools::Rectangle aClip( rPos, aSize );
pDev->IntersectClipRegion( aClip );
sal_Int32 nLines = static_cast<sal_Int32>( nTextHeight > 0 ? (aSize.Height()-nEditHeight)/nTextHeight : 1 );
if ( !nLines )
nLines = 1;
const sal_Int32 nTEntry = IsReallyVisible() ? m_pImpl->m_pImplLB->GetTopEntry() : 0;
- tools::Rectangle aTextRect( aPos, aSize );
+ tools::Rectangle aTextRect( rPos, aSize );
aTextRect.AdjustLeft(3*nOnePixel );
aTextRect.AdjustRight( -(3*nOnePixel) );