Ver código fonte

Preview: fix glitchy PlantUML preview when no background is specified

Le Tan 7 anos atrás
pai
commit
f9e9735d5f
1 arquivos alterados com 4 adições e 1 exclusões
  1. 4 1
      src/utils/vutils.cpp

+ 4 - 1
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);
     }