From ec1dfb2e0c0d8731e574da09795da7df2b3fd69e Mon Sep 17 00:00:00 2001 From: Alx Sa Date: Mon, 9 Feb 2026 16:18:01 +0000 Subject: [PATCH] script-fu: Fix background color in Round Corners When we call (gimp-context-set-defaults) in the Round Corners script, we reset the background color in addition to temporarily clearing out the other context settings. This results in us always using the default white background color for the "Add background" toggle. This patch saves the background color beforehand and restores it before creating the background layer, so we still use the user's preferred color for this layer. --- plug-ins/script-fu/scripts/round-corners.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plug-ins/script-fu/scripts/round-corners.scm b/plug-ins/script-fu/scripts/round-corners.scm index 4ea7fc3c9e..ac4891b37f 100644 --- a/plug-ins/script-fu/scripts/round-corners.scm +++ b/plug-ins/script-fu/scripts/round-corners.scm @@ -59,10 +59,12 @@ ; active drawable is not necessarily the active layer (pic-layer (vector-ref (car (gimp-image-get-selected-layers image)) 0)) (type (car (gimp-drawable-type-with-alpha pic-layer))) + (background-color (car (gimp-context-get-background))) ) (gimp-context-push) (gimp-context-set-defaults) + (gimp-context-set-background background-color) (if (= work-on-copy TRUE) (gimp-image-undo-disable image)