diff --git a/packages/survey-core/src/survey.ts b/packages/survey-core/src/survey.ts index 369bb13350..ec7f94336b 100644 --- a/packages/survey-core/src/survey.ts +++ b/packages/survey-core/src/survey.ts @@ -2246,10 +2246,9 @@ export class SurveyModel extends SurveyElementCore /** * A logo width in CSS-accepted values. * - * Default value: `300px` + * Default value: `auto` (the width is calculated automatically based on the [`logoHeight`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#logoHeight) value to keep the original aspect ratio) * * [View Demo](https://surveyjs.io/form-library/examples/survey-logo/ (linkStyle)) - * @see logoHeight * @see logo * @see logoPosition * @see logoFit @@ -2271,10 +2270,10 @@ export class SurveyModel extends SurveyElementCore /** * A logo height in CSS-accepted values. * - * Default value: `200px` + * Default value: `40px` * * [View Demo](https://surveyjs.io/form-library/examples/survey-logo/ (linkStyle)) - * @see logoHeight + * @see logoWidth * @see logo * @see logoPosition * @see logoFit @@ -8302,8 +8301,8 @@ Serializer.addClass("survey", [ dependsOn: "locale", }, { name: "logo:file", serializationProperty: "locLogo" }, - { name: "logoWidth", default: "300px", minValue: 0 }, - { name: "logoHeight", default: "200px", minValue: 0 }, + { name: "logoWidth", default: "auto", minValue: 0 }, + { name: "logoHeight", default: "40px", minValue: 0 }, { name: "logoFit", default: "contain", diff --git a/packages/survey-core/tests/surveytests.ts b/packages/survey-core/tests/surveytests.ts index 2a926e9217..ca7d5594d9 100644 --- a/packages/survey-core/tests/surveytests.ts +++ b/packages/survey-core/tests/surveytests.ts @@ -14953,11 +14953,11 @@ QUnit.test("getSize", function (assert) { }); QUnit.test("survey logo size", function (assert) { var survey = new SurveyModel(); - assert.equal(survey.logoWidth, "300px", "300px"); - assert.equal(survey.logoHeight, "200px", "200px"); - assert.equal(survey.renderedLogoWidth, 300); - assert.equal(survey.renderedLogoHeight, 200); - assert.equal(survey.renderedStyleLogoWidth, undefined); + assert.equal(survey.logoWidth, "auto", "auto"); + assert.equal(survey.logoHeight, "40px", "40px"); + assert.equal(survey.renderedLogoWidth, undefined); + assert.equal(survey.renderedLogoHeight, 40); + assert.equal(survey.renderedStyleLogoWidth, "auto"); assert.equal(survey.renderedStyleLogoHeight, undefined); survey.logoWidth = "100%"; survey.logoHeight = "auto"; diff --git a/visualRegressionTests/tests/defaultV2/etalons/survey-advanced-header-default.png b/visualRegressionTests/tests/defaultV2/etalons/survey-advanced-header-default.png index feea68ae68..6fabe5ebb0 100644 Binary files a/visualRegressionTests/tests/defaultV2/etalons/survey-advanced-header-default.png and b/visualRegressionTests/tests/defaultV2/etalons/survey-advanced-header-default.png differ diff --git a/visualRegressionTests/tests/defaultV2/etalons/survey-advanced-header-mobile-background.png b/visualRegressionTests/tests/defaultV2/etalons/survey-advanced-header-mobile-background.png index 442484d7f9..645f2d0b30 100644 Binary files a/visualRegressionTests/tests/defaultV2/etalons/survey-advanced-header-mobile-background.png and b/visualRegressionTests/tests/defaultV2/etalons/survey-advanced-header-mobile-background.png differ diff --git a/visualRegressionTests/tests/defaultV2/etalons/survey-advanced-header-mobile-default.png b/visualRegressionTests/tests/defaultV2/etalons/survey-advanced-header-mobile-default.png index 91160aa7f2..9bf497296f 100644 Binary files a/visualRegressionTests/tests/defaultV2/etalons/survey-advanced-header-mobile-default.png and b/visualRegressionTests/tests/defaultV2/etalons/survey-advanced-header-mobile-default.png differ diff --git a/visualRegressionTests/tests/defaultV2/etalons/survey-advanced-header-mobile-with-overlap.png b/visualRegressionTests/tests/defaultV2/etalons/survey-advanced-header-mobile-with-overlap.png index ef97cd7c2a..0b9e9944ef 100644 Binary files a/visualRegressionTests/tests/defaultV2/etalons/survey-advanced-header-mobile-with-overlap.png and b/visualRegressionTests/tests/defaultV2/etalons/survey-advanced-header-mobile-with-overlap.png differ diff --git a/visualRegressionTests/tests/defaultV2/etalons/survey-advanced-header-width-by-survey.png b/visualRegressionTests/tests/defaultV2/etalons/survey-advanced-header-width-by-survey.png index fd29d6c06d..4bcc82452e 100644 Binary files a/visualRegressionTests/tests/defaultV2/etalons/survey-advanced-header-width-by-survey.png and b/visualRegressionTests/tests/defaultV2/etalons/survey-advanced-header-width-by-survey.png differ diff --git a/visualRegressionTests/tests/defaultV2/etalons/survey-advanced-header-with-overlap.png b/visualRegressionTests/tests/defaultV2/etalons/survey-advanced-header-with-overlap.png index 71dd51d7af..63d3c37549 100644 Binary files a/visualRegressionTests/tests/defaultV2/etalons/survey-advanced-header-with-overlap.png and b/visualRegressionTests/tests/defaultV2/etalons/survey-advanced-header-with-overlap.png differ diff --git a/visualRegressionTests/tests/defaultV2/etalons/survey-logo-right-without-title.png b/visualRegressionTests/tests/defaultV2/etalons/survey-logo-right-without-title.png index 3435f2854c..6d6189a28c 100644 Binary files a/visualRegressionTests/tests/defaultV2/etalons/survey-logo-right-without-title.png and b/visualRegressionTests/tests/defaultV2/etalons/survey-logo-right-without-title.png differ diff --git a/visualRegressionTests/tests/defaultV2/etalons/survey-title-with-logo.png b/visualRegressionTests/tests/defaultV2/etalons/survey-title-with-logo.png index 49eda1314c..8d9783398f 100644 Binary files a/visualRegressionTests/tests/defaultV2/etalons/survey-title-with-logo.png and b/visualRegressionTests/tests/defaultV2/etalons/survey-title-with-logo.png differ diff --git a/visualRegressionTests/tests/defaultV2/etalons/survey-toc-advanced-header-mobile-with-overlap.png b/visualRegressionTests/tests/defaultV2/etalons/survey-toc-advanced-header-mobile-with-overlap.png index 4ecd047633..8eaeac8319 100644 Binary files a/visualRegressionTests/tests/defaultV2/etalons/survey-toc-advanced-header-mobile-with-overlap.png and b/visualRegressionTests/tests/defaultV2/etalons/survey-toc-advanced-header-mobile-with-overlap.png differ diff --git a/visualRegressionTests/tests/defaultV2/etalons/survey-toc-advanced-header-with-overlap.png b/visualRegressionTests/tests/defaultV2/etalons/survey-toc-advanced-header-with-overlap.png index 534fb301dc..611de691cf 100644 Binary files a/visualRegressionTests/tests/defaultV2/etalons/survey-toc-advanced-header-with-overlap.png and b/visualRegressionTests/tests/defaultV2/etalons/survey-toc-advanced-header-with-overlap.png differ