From f9e9735d5f09d94cfbedb5954da5e28baaf1d7b4 Mon Sep 17 00:00:00 2001 From: Le Tan Date: Sun, 25 Nov 2018 11:19:41 +0800 Subject: [PATCH] Preview: fix glitchy PlantUML preview when no background is specified --- src/utils/vutils.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/vutils.cpp b/src/utils/vutils.cpp index 65cfeaba..bd71caac 100644 --- a/src/utils/vutils.cpp +++ b/src/utils/vutils.cpp @@ -1748,7 +1748,10 @@ QPixmap VUtils::svgToPixmap(const QByteArray &p_content, } QPixmap pm(deSz); - if (!p_background.isEmpty()) { + if (p_background.isEmpty()) { + // Fill a transparent background to avoid glitchy preview. + pm.fill(QColor(255, 255, 255, 0)); + } else { pm.fill(p_background); }