Skip to content

feat: Add dark-mode compatibility for note color themes on non-elementary OS environments - #150

Closed
codemedic wants to merge 3 commits into
elly-code:mainfrom
codemedic:feat/dark-mode-compat
Closed

feat: Add dark-mode compatibility for note color themes on non-elementary OS environments#150
codemedic wants to merge 3 commits into
elly-code:mainfrom
codemedic:feat/dark-mode-compat

Conversation

@codemedic

@codemedic codemedic commented Aug 18, 2026

Copy link
Copy Markdown

Implements dark-mode support for Jorts note themes in environments lacking the native elementary OS stylesheet (such as standard GNOME/Adwaita setups via Flathub). Also fixes a window finalization memory leak.

Key Changes

  • Theme Inversion: Appended overrides in Themes.css (window.themed.dark) to swap note colors (dark background, light text) and scroll view undershoots when the window has the dark class.
  • Window Class Sync: Updated StickyNoteWindow.vala to dynamically toggle the dark CSS class based on the system's gtk-application-prefer-dark-theme setting.
  • Environment Overrides: Added FORCE_DARK and FORCE_LIGHT variables in Application.vala to override appearance preferences during development/testing.
  • Memory Leak Fix: Replaced the anonymous lambda connected to the global gtk_settings notifier with a named callback, and disconnected it in the window's close_request signal handler to prevent a reference cycle.

Contributor & Agent Onboarding

We have compiled an onboarding and architectural mapping guide (AGENTS.md) detailing Jorts' codebase structure and compilation workflows. We are happy to include this in the Pull Request if the maintainers would find it valuable.


Related Issues

Closes #149


🤖 AI-Assisted Development Disclaimer

This patch was prepared, audited, and verified using Google Antigravity powered by Gemini:

  • Authoring: Gemini was used to write and structure the theme overrides and synchronization logic.
  • Review: An autonomous code-reviewer agent audited the diff and identified the global settings memory leak, which was subsequently resolved.
  • Testing: Compiled and validated locally using a sandboxed Flatpak environment (org.flatpak.Builder) to guarantee build correctness.

@codemedic
codemedic marked this pull request as ready for review August 18, 2026 00:51
@teamcons teamcons closed this Aug 18, 2026
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.

feat: Add dark-mode compatibility for note color themes on non-elementary OS environments

2 participants