diff options
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 04ae3e0ec4fa..130efa0b9122 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -4032,7 +4032,9 @@ void ColorListBox::ShowPreview(const NamedColor &rColor) { const Color aW(COL_WHITE); const Color aG(0xef, 0xef, 0xef); - xDevice->DrawCheckered(aRect.TopLeft(), aRect.GetSize(), 8, aW, aG); + int nMinDim = std::min(aImageSize.Width(), aImageSize.Height()) + 1; + int nCheckSize = nMinDim / 3; + xDevice->DrawCheckered(aRect.TopLeft(), aRect.GetSize(), std::min(nCheckSize, 8), aW, aG); xDevice->SetFillColor(); } else |