wallpapers/image: Respect URL fragment for dark mode detection in MediaProxy

Original commit message(s)

  • wallpapers/image: Prevent unnecessary wallpaper reload when fragment forces variant

When the source URL fragment contains "#light" or "#dark" (set by ImageBackend for "Always use light variant" / "Always use dark variant"), skip the color-scheme-change wallpaper reload in slotPlasmaThemeChanged(). This prevents flicker when the user has explicitly chosen a variant.

  • wallpapers/image: Add test for SVG dark/light variant handling

Add a test to verify that the wallpaper image correctly handles "#dark" and "#light" URL fragments, which are used by "Always use dark variant" and "Always use light variant" dynamic modes respectively.

  • wallpapers/image: Respect URL fragment for dark mode detection in MediaProxy

When an image URL contains a "#dark" or "#light" fragment, respect that over the system color scheme when determining the darkMode query parameter.

Reason for the change

Test plan

Screenshots or screen recordings

Bugs fixed

BUG: 519168

Merge request reports

Loading