diff --git a/src/dist/js/qrcode-style-tools.js b/src/dist/js/qrcode-style-tools.js index 7efc934..39abe1f 100644 --- a/src/dist/js/qrcode-style-tools.js +++ b/src/dist/js/qrcode-style-tools.js @@ -95,9 +95,18 @@ }); document.querySelectorAll('#foreground, #background').forEach(function (input) { - input.addEventListener('change', function () { - updateStylePreview(scopeOf(input)); - }); + // bootstrap-colorpicker sets the value and fires 'change' via jQuery's + // synthetic .trigger(), which a native addEventListener never sees - so the + // preview only updates via jQuery's event binding, not the native one below. + if (window.jQuery) { + jQuery(input).on('change', function () { + updateStylePreview(scopeOf(input)); + }); + } else { + input.addEventListener('change', function () { + updateStylePreview(scopeOf(input)); + }); + } }); document.querySelectorAll('select[name="level"]').forEach(function (select) { diff --git a/src/forms/qrcode_options.php b/src/forms/qrcode_options.php index 7f1507e..7c69790 100644 --- a/src/forms/qrcode_options.php +++ b/src/forms/qrcode_options.php @@ -58,7 +58,7 @@ if (QRCODE_GENERATOR === "internal-chillerlan.qrcode") {
- + diff --git a/src/index.php b/src/index.php index 50dcbe9..da61637 100644 --- a/src/index.php +++ b/src/index.php @@ -120,29 +120,33 @@ foreach ($createdQrcode_static as $row) {
diff --git a/src/lib/Qrcode/Qrcode-intchil.php b/src/lib/Qrcode/Qrcode-intchil.php index dfd942a..9b0d62b 100644 --- a/src/lib/Qrcode/Qrcode-intchil.php +++ b/src/lib/Qrcode/Qrcode-intchil.php @@ -174,7 +174,7 @@ class Qrcode { $iconWidth = imagesx($icon); $iconHeight = imagesy($icon); - $maxIconHeight = (int) ($height * 0.25); + $maxIconHeight = (int) ($height * 0.625); $scale = min($maxIconHeight / $iconHeight, ($width * 0.6) / $iconWidth, 1); $targetWidth = max(1, (int) ($iconWidth * $scale)); $targetHeight = max(1, (int) ($iconHeight * $scale)); diff --git a/src/lib/Qrcode/Qrcode.php b/src/lib/Qrcode/Qrcode.php index b338414..d49e447 100644 --- a/src/lib/Qrcode/Qrcode.php +++ b/src/lib/Qrcode/Qrcode.php @@ -159,7 +159,7 @@ class Qrcode { $iconWidth = imagesx($icon); $iconHeight = imagesy($icon); - $maxIconHeight = (int) ($height * 0.25); + $maxIconHeight = (int) ($height * 0.625); $scale = min($maxIconHeight / $iconHeight, ($width * 0.6) / $iconWidth, 1); $targetWidth = max(1, (int) ($iconWidth * $scale)); $targetHeight = max(1, (int) ($iconHeight * $scale));