Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

work for #4944 Survey Themes - Separate Question Title and Question Content Colors #4945

Merged

Conversation

OlgaLarina
Copy link
Contributor

@OlgaLarina OlgaLarina commented Nov 30, 2023

    .sd-table__cell--header,
    .sd-matrix__cell:first-of-type {
      color: var(--sjs-font-matrix-title-color, var(--sjs-font-questiontitle-color, var(--sjs-general-forecolor, #161616)));
      font-family: var(--sjs-font-matrix-title-family, var(--sjs-font-questiontitle-family, var(--sjs-font-family, var(--font-family))));
      font-size: var(--sjs-font-matrix-title-size, var(--sjs-font-questiontitle-size, var(--sjs-font-size, 16px)));
      font-weight: var(--sjs-font-matrix-title-weight, var(--sjs-font-questiontitle-weight, 600));
    }

    .sd-title.sd-element__title {
      color: var(--sjs-font-custom-question-title-color, var(--sjs-font-questiontitle-color, var(--sjs-general-forecolor, #161616)));
      font-family: var(--sjs-font-custom-question-title-family, var(--sjs-font-questiontitle-family, var(--sjs-font-family, var(--font-family))));
      font-size: var(--sjs-font-custom-question-title-size, var(--sjs-font-questiontitle-size, var(--sjs-font-size, 16px)));
      font-weight: var(--sjs-font-custom-question-title-weight, var(--sjs-font-questiontitle-weight, 600));
    }
  creator.themeEditor.onPropertyGridSurveyCreated.add((sender, options) => {
    const defaultValueElement = options.survey.findQuestionByName("questionTitle").defaultValue;
    
    const newFontSettings = Survey.Serializer.createClass("fontsettings", { name: "custom-question-title" });
    options.model.addPropertyGridEditor({ element: newFontSettings, insertBefore: "questionTitle" });
    newFontSettings.title = "Question title font";
    newFontSettings.value = defaultValueElement;
    
    const newMatrixFontSettings = Survey.Serializer.createClass("fontsettings", { name: "matrix-title" });
    options.model.addPropertyGridEditor({ element: newMatrixFontSettings, insertAfter: "questionTitle" });
    newMatrixFontSettings.title = "Matrix title font";
    newMatrixFontSettings.value = defaultValueElement;
    
    options.model.removePropertyGridEditor("questionTitle");
  });

@OlgaLarina OlgaLarina marked this pull request as draft November 30, 2023 14:58
@OlgaLarina OlgaLarina linked an issue Nov 30, 2023 that may be closed by this pull request
OlgaLarina added 4 commits December 20, 2023 13:16
…e/4944-customization-theme-builder-property-grid

# Conflicts:
#	packages/survey-creator-core/src/components/tabs/theme-plugin.ts
#	packages/survey-creator-core/tests/tabs/theme-builder.tests.ts
…e/4944-customization-theme-builder-property-grid

# Conflicts:
# packages/survey-creator-core/src/components/tabs/theme-plugin.ts
OlgaLarina and others added 8 commits January 10, 2024 11:28
…e/4944-customization-theme-builder-property-grid

# Conflicts:
#	packages/survey-creator-core/src/components/tabs/theme-builder.ts
…e/4944-customization-theme-builder-property-grid

# Conflicts:
#	packages/survey-creator-core/src/components/tabs/theme-builder.ts
#	packages/survey-creator-core/src/property-grid/matrices.ts
…e/4944-customization-theme-builder-property-grid
…e/4944-customization-theme-builder-property-grid

# Conflicts:
#	packages/survey-creator-core/src/property-grid/matrices.ts
#	packages/survey-creator-core/tests/tabs/theme-builder.tests.ts
…e/4944-customization-theme-builder-property-grid
@OlgaLarina OlgaLarina marked this pull request as ready for review February 22, 2024 07:22
@OlgaLarina OlgaLarina merged commit 877d054 into master Feb 22, 2024
15 checks passed
@OlgaLarina OlgaLarina deleted the issue/4944-customization-theme-builder-property-grid branch February 22, 2024 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Survey Themes - Separate Question Title and Question Content Colors
3 participants