From 296b50bb77ea6471a40d442dc24a853a1adcd289 Mon Sep 17 00:00:00 2001 From: Sergey Linev Date: Fri, 5 Jun 2026 10:58:40 +0200 Subject: [PATCH] [gpad] transparent canvas color on Mac When transparent style is specified, canvas must be filled with 1001 fill style to properly clear all previous drawings. Logic was previosely implemented in TPad::PaintBox and was not properly moved to TPad::PaintBorder (cherry picked from commit aeefe7cab09f175b90b7c8788a794c3bfa03709e) --- graf2d/gpad/src/TPad.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/graf2d/gpad/src/TPad.cxx b/graf2d/gpad/src/TPad.cxx index c73d996d5e070..856384ddf6018 100644 --- a/graf2d/gpad/src/TPad.cxx +++ b/graf2d/gpad/src/TPad.cxx @@ -3680,7 +3680,9 @@ void TPad::PaintBorder(Color_t color, Bool_t /* tops */) pp->SetAttFill({color, 1001}); // use fill color producing opacity pp->SetOpacity(style - 4000); } - } else if ((color == 10) && (style > 3000) && (style < 3100)) + } else if ((style >= 4000) && (style <= 4100) && pp->IsCocoa() && (this == fMother)) + style = 1001; + else if ((color == 10) && (style > 3000) && (style < 3100)) color = 1; if (do_paint_box) {