From d8369e5f75d2df6d336a933cea8439c72581284a Mon Sep 17 00:00:00 2001 From: SoftFever Date: Tue, 19 May 2026 01:38:37 +0800 Subject: [PATCH] Fix faint toolbar icons on Wayland (#13723) Use glBlendFuncSeparate in GLTexture::render_sub_texture so destination alpha stays at 1.0. The Wayland compositor honors framebuffer alpha for window compositing; the previous straight-alpha blend reduced dst alpha at anti-aliased icon edges, making them semi-transparent against the desktop. RGB blending is unchanged, so X11/Windows/macOS are unaffected. --- src/slic3r/GUI/GLTexture.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/GLTexture.cpp b/src/slic3r/GUI/GLTexture.cpp index 7bf4d008d4..d670181b1b 100644 --- a/src/slic3r/GUI/GLTexture.cpp +++ b/src/slic3r/GUI/GLTexture.cpp @@ -663,7 +663,9 @@ void GLTexture::render_texture(unsigned int tex_id, float left, float right, flo void GLTexture::render_sub_texture(unsigned int tex_id, float left, float right, float bottom, float top, const GLTexture::Quad_UVs& uvs) { glsafe(::glEnable(GL_BLEND)); - glsafe(::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)); + // Orca: fix washed-out toolbar icons on Wayland: keep destination alpha at 1.0 so the compositor + // does not treat anti-aliased icon edges as window transparency. + glsafe(::glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA)); glsafe(::glEnable(GL_TEXTURE_2D)); glsafe(::glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE));