aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/sonix/BootlogoCanvas.qml
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/modules/sonix/BootlogoCanvas.qml')
-rw-r--r--desktop/modules/sonix/BootlogoCanvas.qml16
1 files changed, 9 insertions, 7 deletions
diff --git a/desktop/modules/sonix/BootlogoCanvas.qml b/desktop/modules/sonix/BootlogoCanvas.qml
index 309e9ad..6915dfc 100644
--- a/desktop/modules/sonix/BootlogoCanvas.qml
+++ b/desktop/modules/sonix/BootlogoCanvas.qml
@@ -74,7 +74,9 @@ Item {
x: canvas.cfg.x - width / 2
y: canvas.cfg.y - height / 2
- // The second colour: an offset copy behind, or Bungee Inline on top.
+ // The second colour: an offset copy behind the fill. For Bungee it is
+ // the Regular layer underneath, showing through the stripe Bungee
+ // Inline cuts out of each letter; the Inline layer on top is the fill.
Text {
visible: !label.layered
x: label.off.x
@@ -87,13 +89,13 @@ Item {
id: fillText
text: canvas.text
font { family: label.fam; pixelSize: canvas.cfg.size }
- color: canvas.colour(canvas.cfg.fill)
+ color: canvas.colour(label.layered ? canvas.cfg.second : canvas.cfg.fill)
}
Text {
visible: label.layered
text: canvas.text
font { family: fInline.name; pixelSize: canvas.cfg.size }
- color: canvas.colour(canvas.cfg.second)
+ color: canvas.colour(canvas.cfg.fill)
}
}
@@ -126,14 +128,14 @@ Item {
// Writes base + ".png" (the logo) and base + "-mask.png" (the text on
// transparency). cb(ok, error).
function save(base, cb) {
- canvas.grabToImage(r => {
+ if (!canvas.grabToImage(r => {
if (!r.saveToFile(base + ".png")) { cb(false, `Cannot write ${base}.png`); return; }
canvas.maskOnly = true;
- canvas.grabToImage(m => {
+ if (!canvas.grabToImage(m => {
canvas.maskOnly = false;
const ok = m.saveToFile(base + "-mask.png");
cb(ok, ok ? "" : `Cannot write ${base}-mask.png`);
- }, Qt.size(480, 800));
- }, Qt.size(480, 800));
+ }, Qt.size(480, 800))) { canvas.maskOnly = false; cb(false, "Cannot grab the mask"); }
+ }, Qt.size(480, 800))) cb(false, "Cannot grab the canvas");
}
}