Skip to content

Add SYS_COLOUR_CHANGED event type - #187

Open
trypsynth wants to merge 1 commit into
AllenDang:mainfrom
trypsynth:sys-colour-changed-event
Open

Add SYS_COLOUR_CHANGED event type#187
trypsynth wants to merge 1 commit into
AllenDang:mainfrom
trypsynth:sys-colour-changed-event

Conversation

@trypsynth

Copy link
Copy Markdown
Contributor

Summary

  • Adds WXD_EVENT_TYPE_SYS_COLOUR_CHANGED, mapped to wxEVT_SYS_COLOUR_CHANGED, following the same pattern as the other window-level event types (KEY_DOWN, MAGNIFY, and so on).
  • Adds the corresponding EventType::SYS_COLOUR_CHANGED constant on the Rust side.

Motivation

wxDragon already exposes a one shot query for the current system appearance (light or dark), but nothing fires when the OS-level appearance changes while the app is running, for example the user switching between light and dark mode in System Settings on macOS, or the equivalent on Windows. Any app doing custom painting based on the current appearance needs to react live to that change rather than only reading it once at startup. wxWidgets already emits wxEVT_SYS_COLOUR_CHANGED for this, it was just not wired up in the C or Rust binding layers yet. This is a small, generic addition, not platform gated, since the underlying wx event exists on all supported platforms.

Test plan

  • cargo build -p wxdragon succeeds locally.

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.

1 participant