diff options
Diffstat (limited to 'vcl/source/control/combobox.cxx')
-rw-r--r-- | vcl/source/control/combobox.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 2a979b70b0..82520cc765 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -1152,6 +1152,7 @@ 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 ); @@ -1167,7 +1168,7 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, SystemTextColorFlags bool bBackground = IsControlBackground(); if ( bBorder || bBackground ) { - tools::Rectangle aRect( rPos, aSize ); + tools::Rectangle aRect( aPos, aSize ); // aRect.Top() += nEditHeight; if ( bBorder ) { @@ -1191,7 +1192,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, rPos, nFlags ); + m_pImpl->m_pSubEdit->Draw( pDev, aPos, nFlags ); m_pImpl->m_pSubEdit->SetSizePixel(aOrigSize); // Second, draw the listbox @@ -1219,14 +1220,14 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, SystemTextColorFlags } } - tools::Rectangle aClip( rPos, aSize ); + tools::Rectangle aClip( aPos, 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( rPos, aSize ); + tools::Rectangle aTextRect( aPos, aSize ); aTextRect.AdjustLeft(3*nOnePixel ); aTextRect.AdjustRight( -(3*nOnePixel) ); |