From ec3952237f34b24f9e423890a3d870ed10bd615c Mon Sep 17 00:00:00 2001 From: plc-user <74435298+plc-user@users.noreply.github.com> Date: Thu, 28 Mar 2024 09:32:55 +0100 Subject: [PATCH] simplify setting of alpha-value for SVG-background --- sources/exportdialog.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sources/exportdialog.cpp b/sources/exportdialog.cpp index 9b4322540..8ffe36d37 100644 --- a/sources/exportdialog.cpp +++ b/sources/exportdialog.cpp @@ -401,15 +401,10 @@ void ExportDialog::generateSvg( saveReloadDiagramParameters(diagram, true); // set the transparency for the SVG-Background: - int iRed = 254; - int iGreen = 253; - int iBlue = 252; - int iAlpha = 251; - diagram->background_color.getRgb(&iRed, &iGreen, &iBlue, &iAlpha); if (epw->exportProperties().draw_bg_transparent == true) { - diagram->background_color = QColor(iRed, iGreen, iBlue, 0); + diagram->background_color.setAlpha(0); } else { - diagram->background_color = QColor(iRed, iGreen, iBlue, iAlpha); + diagram->background_color.setAlpha(255); } // genere une QPicture a partir du schema