Skip to main content

COUNTERPART_EXTENSION

Constant COUNTERPART_EXTENSION 

Source
pub const COUNTERPART_EXTENSION: &str = "org.egui-pop.counterpart";
Expand description

The root $extensions key carrying a theme’s counterpart inside its file: a light and dark pair saved as one file (the theme editor’s). Its value names the counterpart and gives its token file, an ordinary one with its own stamp:

{ "$extends": "pop-dark",
  "$extensions": {
    "org.egui-pop.variant-of": "ocean-light",
    "org.egui-pop.counterpart": {
      "name": "ocean-light",
      "file": { "$extends": "pop-light",
                "$extensions": { "org.egui-pop.variant-of": "ocean" } } } } }

Themes::add_text and Themes::add_path add the counterpart too, under its name; a reader that does not know the key loads the file’s own variant alone.