Kaydet (Commit) b18e2d80 authored tarafından Caolán McNamara's avatar Caolán McNamara

color picker behaviour changed

since...

commit db42098d
Date:   Fri Feb 9 10:47:48 2018 +0200

    use VirtualDevice in ColorFieldControl

    as part of moving use of BitmapWriteAccess inside of vcl/

changing the radiobutton selected used to change the
contents of the color picker widget, after that point it
got locked to the original contents.

Change-Id: I94c730f1868efc388cba7720364bc04a666d4fbd
Reviewed-on: https://gerrit.libreoffice.org/50969Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 598cf9f7
...@@ -265,16 +265,17 @@ void ColorFieldControl::UpdateBitmap() ...@@ -265,16 +265,17 @@ void ColorFieldControl::UpdateBitmap()
{ {
const Size aSize(GetOutputSizePixel()); const Size aSize(GetOutputSizePixel());
if (mxBitmap && mxBitmap->GetOutputSizePixel() != aSize)
mxBitmap.disposeAndClear();
const sal_Int32 nWidth = aSize.Width(); const sal_Int32 nWidth = aSize.Width();
const sal_Int32 nHeight = aSize.Height(); const sal_Int32 nHeight = aSize.Height();
if (nWidth == 0 || nHeight == 0) if (nWidth == 0 || nHeight == 0)
return; return;
if (mxBitmap && mxBitmap->GetOutputSizePixel() == aSize) if (!mxBitmap)
return; {
mxBitmap.disposeAndClear();
mxBitmap = VclPtr<VirtualDevice>::Create(); mxBitmap = VclPtr<VirtualDevice>::Create();
mxBitmap->SetOutputSizePixel(aSize); mxBitmap->SetOutputSizePixel(aSize);
...@@ -299,7 +300,6 @@ void ColorFieldControl::UpdateBitmap() ...@@ -299,7 +300,6 @@ void ColorFieldControl::UpdateBitmap()
pRGB = maRGB_Vert.data(); pRGB = maRGB_Vert.data();
pPercent = maPercent_Vert.data(); pPercent = maPercent_Vert.data();
{
sal_Int32 y = nHeight; sal_Int32 y = nHeight;
while (y--) while (y--)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment