From 787f8f16812acb55615947e3376f2d877ac4e8d8 Mon Sep 17 00:00:00 2001 From: Oliver Giles Date: Fri, 12 Oct 2018 12:56:16 +0300 Subject: [PATCH] badge svg: define root element dimensions This prevents default 300x150 sizing --- src/laminar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/laminar.cpp b/src/laminar.cpp index 5d39f41..fa5a8cf 100644 --- a/src/laminar.cpp +++ b/src/laminar.cpp @@ -815,7 +815,7 @@ bool Laminar::handleBadgeRequest(std::string job, std::string &badge) { char* svg = NULL; asprintf(&svg, R"x( - + @@ -833,7 +833,7 @@ R"x( %s -)x", jobNameWidth+statusWidth, gradient1, gradient2, jobNameWidth, jobNameWidth/2+1, job.data(), jobNameWidth, statusWidth, jobNameWidth+statusWidth/2, status.data()); +)x", jobNameWidth+statusWidth, jobNameWidth+statusWidth, gradient1, gradient2, jobNameWidth, jobNameWidth/2+1, job.data(), jobNameWidth, statusWidth, jobNameWidth+statusWidth/2, status.data()); badge = svg; return true; }