Skip to content

New theme editor

This pull request contains a new take on the Theme Editor (closes #563)

A new user experience is provided, based on the Media Library side panels, while retaining the step-by-step idea of Theme Wizard. The advantage is the instant preview that updates when any of the parameters are changed. Also, the layout preview is now integrated inside Webview (shown when the Position tab is expanded). A transition preview feature is now present inside the Transitions tab. And, a warning is shown when trying to close the Theme Editor with unsaved changes.

Changes (overview):

  • Webview display.js:
    • Added a method to enable/disable the layout aid borders
    • Added a method to force enable/disable the transitions
  • ThemePreviewRenderer:
    • Added a method to enable/disable the layout aid borders
    • Added a method to force enable/disable the transitions
    • Added a parameter to optionally avoid the 1s delay on generate_preview
    • Added a parameter to add an extra slide on generate_preview, to allow the transition preview to work
  • openlp/core/themes:
    • Created this folder to contain the theme editor files (and theme-related things in the future)
    • Converted all Theme Wizard Pages to be widgets, to be shared between Theme Editor and Theme Wizard
    • Created a shim/wrapper to allow the Theme Wizard Pages to use the widgets while sharing these widgets with the Theme Editor (created a fake grid because for now the ThemeEditor doesn't need the grid)
    • Created a composite widget proxy (on the Theme Wizard, the Alignment and Transition sections are bound together; but on the Theme Editor they are separate things)
    • Connecting signals separately from widget creation
    • Created the Theme Editor Dialog + Form

Pending Tasks (to make this go out of draft):

  • Theme Editor tests
  • Fix Theme Widgets tests

Open Questions:

  • Does we need to preserve the old Theme Wizard implementation (behind a setting)? The proposed shim/proxy wasn't easy to maintain; I've keep only the new code path.

Screenshots:

Show/Hide Images Screenshot_20220610_123120 Screenshot_20220610_123517 2022-06-10_12-35-48
Edited by Daniel Martin

Merge request reports