include/vcl/rendercontext/DrawImageFlags.hxx | 2 +- vcl/source/image/Image.cxx | 4 ++-- vcl/source/window/toolbox.cxx | 26 -------------------------- 3 files changed, 3 insertions(+), 29 deletions(-)
New commits: commit 8eb1026d0cd4bcfaeca8e8798044381290674160 Author: Dan Williams <[email protected]> AuthorDate: Mon Jan 5 09:22:05 2026 -0600 Commit: Dan Williams <[email protected]> CommitDate: Tue Jan 13 07:01:34 2026 +0100 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 <[email protected]> diff --git a/include/vcl/rendercontext/DrawImageFlags.hxx b/include/vcl/rendercontext/DrawImageFlags.hxx index 014b552dec15..535ba74162b1 100644 --- a/include/vcl/rendercontext/DrawImageFlags.hxx +++ b/include/vcl/rendercontext/DrawImageFlags.hxx @@ -28,7 +28,7 @@ enum class DrawImageFlags Disable = 0x0001, Highlight = 0x0002, Deactive = 0x0004, - ColorTransform = 0x0008, + // 0x0008 is unused, SemiTransparent = 0x0010, }; namespace o3tl diff --git a/vcl/source/image/Image.cxx b/vcl/source/image/Image.cxx index ebabef440a9b..28506ecf459b 100644 --- a/vcl/source/image/Image.cxx +++ b/vcl/source/image/Image.cxx @@ -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)) { diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 88ba1239ef53..0cf0197f1f2f 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -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); } commit f1e496d968b4a5e53e63dd265e7f5f80a9b62ffb Author: Dan Williams <[email protected]> AuthorDate: Mon Jan 5 09:18:30 2026 -0600 Commit: Dan Williams <[email protected]> CommitDate: Tue Jan 13 07:01:24 2026 +0100 toolbox: remove unused code in ImplDrawItem() nStyle isn't used anywhere. Change-Id: I0f287fa3a2ba36d6ac95e2b7afbcd59dd693f264 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196583 Tested-by: Jenkins Reviewed-by: Dan Williams <[email protected]> diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 2b8c9d21161a..88ba1239ef53 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -2565,7 +2565,6 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si tools::Long nOffY = SMALLBUTTON_OFF_NORMAL_Y; tools::Long nImageOffX = 0; tools::Long nImageOffY = 0; - DrawButtonFlags nStyle = DrawButtonFlags::NONE; // draw separators if ( (pItem->meType == ToolBoxItemType::SEPARATOR) && nPos > 0 ) @@ -2577,19 +2576,6 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si if ( (pItem->meType != ToolBoxItemType::BUTTON) || pItem->mbShowWindow ) return; - if ( pItem->meState == TRISTATE_TRUE ) - { - nStyle |= DrawButtonFlags::Checked; - } - else if ( pItem->meState == TRISTATE_INDET ) - { - nStyle |= DrawButtonFlags::DontKnow; - } - if ( nHighlight == 1 ) - { - nStyle |= DrawButtonFlags::Pressed; - } - ImplErase(rRenderContext, pItem->maRect, nHighlight != 0, bHasOpenPopup ); nOffX += pItem->maRect.Left();
