From 8d8b7f28f5176a0841282eb156c7951d207b25c6 Mon Sep 17 00:00:00 2001 From: Djack Donovan Date: Thu, 19 Jan 2023 23:09:37 +0100 Subject: [PATCH] fix content_width/height on higher zoom values When the zoom is not at 1, content_width and content_height end up being pre-multiplied, which can mess up some scripts (for example, the card type line in the Cajun templates) --- src/render/value/choice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/render/value/choice.cpp b/src/render/value/choice.cpp index 998d32294..2af4bf9ba 100644 --- a/src/render/value/choice.cpp +++ b/src/render/value/choice.cpp @@ -50,8 +50,8 @@ bool prepare_choice_viewer(RotatedDC& dc, ValueViewer& viewer, ChoiceStyle& styl img.generateCached(img_options, &style.mask, &combine, &bitmap, &image, &size); // store content properties if (style.content_width != size.width || style.content_height != size.height) { - style.content_width = size.width; - style.content_height = size.height; + style.content_width = size.width / dc.getZoom(); + style.content_height = size.height / dc.getZoom(); return true; } }