vcl: remove unused DrawImageFlags::ColorTransform
There's a note in the enum definition for DrawImageFlags that they need to be kept in-sync with com/sun/star/awt/ImageDrawMode but that doesn't have ColorTransform. Furthermore the flag has no effect in Image::Draw() anyway. Change-Id: I7cb3f7061051b8691211bd3a78aaf99b7bb82bd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196584 Tested-by: Jenkins Reviewed-by: Dan Williams <dcbw@libreoffice.org>
This commit is contained in:
@@ -28,7 +28,7 @@ enum class DrawImageFlags
|
||||
Disable = 0x0001,
|
||||
Highlight = 0x0002,
|
||||
Deactive = 0x0004,
|
||||
ColorTransform = 0x0008,
|
||||
// 0x0008 is unused,
|
||||
SemiTransparent = 0x0010,
|
||||
};
|
||||
namespace o3tl
|
||||
|
||||
@@ -134,8 +134,8 @@ void Image::Draw(OutputDevice* pOutDev, const Point& rPos, DrawImageFlags nStyle
|
||||
Bitmap aRenderBmp = mpImplData->getBitmapForHiDPI(bool(nStyle & DrawImageFlags::Disable), pOutDev->GetGraphics());
|
||||
|
||||
if (!(nStyle & DrawImageFlags::Disable) &&
|
||||
(nStyle & (DrawImageFlags::ColorTransform | DrawImageFlags::Highlight |
|
||||
DrawImageFlags::Deactive | DrawImageFlags::SemiTransparent)))
|
||||
(nStyle & (DrawImageFlags::Highlight | DrawImageFlags::Deactive |
|
||||
DrawImageFlags::SemiTransparent)))
|
||||
{
|
||||
if (nStyle & (DrawImageFlags::Highlight | DrawImageFlags::Deactive))
|
||||
{
|
||||
|
||||
@@ -2549,12 +2549,6 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si
|
||||
// no gradient background for items that have a popup open
|
||||
bool bHasOpenPopup = mpFloatWin && (mnDownItemId==pItem->mnId);
|
||||
|
||||
bool bHighContrastWhite = false;
|
||||
// check the face color as highcontrast indicator
|
||||
// because the toolbox itself might have a gradient
|
||||
if (rStyleSettings.GetFaceColor() == COL_WHITE)
|
||||
bHighContrastWhite = true;
|
||||
|
||||
// Compute buttons area.
|
||||
Size aBtnSize = pItem->maRect.GetSize();
|
||||
|
||||
@@ -2636,12 +2630,6 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si
|
||||
else
|
||||
ImplDrawButton(rRenderContext, aButtonRect, nHighlight, pItem->meState == TRISTATE_TRUE,
|
||||
pItem->mbEnabled && IsEnabled(), pItem->mbShowWindow);
|
||||
|
||||
if( nHighlight != 0 )
|
||||
{
|
||||
if( bHighContrastWhite )
|
||||
nImageStyle |= DrawImageFlags::ColorTransform;
|
||||
}
|
||||
}
|
||||
rRenderContext.DrawImage(Point( nImageOffX, nImageOffY ), *pImage, nImageStyle);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user