Skip to content

Modernize LibreOffice theme and Calc support - #20

Open
OmarAhmed-A wants to merge 1 commit into
dracula:masterfrom
OmarAhmed-A:fix/modern-calc-theme
Open

Modernize LibreOffice theme and Calc support#20
OmarAhmed-A wants to merge 1 commit into
dracula:masterfrom
OmarAhmed-A:fix/modern-calc-theme

Conversation

@OmarAhmed-A

Copy link
Copy Markdown

Summary

  • replace direct registrymodifications.xcu edits with a supported OXT package
  • define all 91 current LibreOffice theme colors, including modern Calc and UI keys
  • bundle and register the Dracula palette through the extension configuration
  • activate the scheme safely and add build, validation, compatibility, and install tooling
  • refresh the documentation and add a current Calc screenshot

Why

The legacy installer spliced a one-line fragment into the user profile. On current LibreOffice releases, that can leave Dracula absent, inactive, or only partially applied because newer Calc and interface keys are missing.

The OXT uses LibreOffice's supported configuration-extension mechanism and targets LibreOffice 25.8 or newer, where the current Color schema is available.

Verification

  • ./test.sh
  • OXT archive and XML validation
  • 91 explicit theme colors and 11 palette colors checked
  • WCAG contrast checks passed
  • installed and activated on LibreOffice 26.2.5.2
  • live UNO verification created a Calc document and confirmed the active scheme, palette path, dark appearance, and expected Calc/UI colors

Screenshots

Before: on affected current releases, Dracula can be missing from Appearance or apply only to the sheet canvas, as reported in #8 and #17.

After:

Dracula running in LibreOffice Calc

Closes #8
Closes #12
Closes #17
Refs #19

Replace direct profile edits with a supported OXT package so current
LibreOffice releases can register and activate the complete theme.

Add all 91 current color keys, Calc coverage, bundled palette
registration, activation helpers, validation, and updated install docs.
@OmarAhmed-A
OmarAhmed-A marked this pull request as ready for review August 20, 2026 03:29
Copilot AI lite review requested due to automatic review settings August 20, 2026 03:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the Dracula LibreOffice theme distribution by moving from direct profile edits (registrymodifications.xcu) to a supported OXT configuration extension, expanding the theme to cover current Calc/UI color keys, and adding build/install/validation tooling to reliably package and activate the scheme.

Changes:

  • Introduces an OXT-based extension layout (config XCU + palette path registration + extension metadata) and an automated build pipeline to generate dist/Dracula-LibreOffice.oxt.
  • Adds installers and activation helpers (install.sh, tools/activate.py) plus static/unit validation scripts under tests/.
  • Updates documentation to reflect the new install/activation flow and LibreOffice version requirements.

Reviewed changes

Copilot reviewed 15 out of 18 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tools/activate.py UNO-based helper to set Dracula as active scheme and force dark appearance, with schema compatibility handling.
tests/validate_extension.py Static checks for packaged files, required color values/visibility, contrast, and palette name normalization.
tests/test_activate.py Unit tests for activation schema compatibility helpers.
tests/query_theme.py Runtime UNO verification script for an isolated LibreOffice instance (manual/CI helper).
test.sh Wrapper to build the OXT and run validation + unit tests.
README.md Updated project overview, install instructions, and development workflow.
install.sh New installer that builds the OXT, installs via unopkg, and optionally activates via UNO.
INSTALL.md Rewritten install/verify/troubleshooting/removal docs aligned with OXT approach.
extension/Paths.xcu Registers the bundled palettes/ directory via %origin% fuse into Palette InternalPaths.
extension/META-INF/manifest.xml Adds initial OXT manifest entries for configuration data files.
extension/description.xml Extension metadata including identifier, version, and LO minimal version dependency.
extension/description.txt Short extension description text referenced by description.xml.
dracula.xcu Updated theme configuration in modern XCU structure with full current key set.
dracula.soc Fixes trailing-space “Yellow ” palette entry name.
build.sh New script to stage and zip the OXT package into dist/.
add-dracula-application-colors.sh Compatibility wrapper that now delegates to the new installer.
.gitignore Ignores build output and Python bytecode caches.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +166 to +175
palette = ElementTree.fromstring(palette_xml)
palette_names = [element.attrib.get("{http://openoffice.org/2000/drawing}name") for element in palette]
if "Yellow " in palette_names or "Yellow" not in palette_names:
raise AssertionError("the palette contains the old trailing-space Yellow name")

print(
f"Validated {package}: {len(actual)} explicit theme colors, "
f"{len(palette_names)} palette colors, WCAG contrast checks passed."
)
return 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Theme only apply to cells Comments are invisible Not showing in Application Colors on Windows

2 participants