You are reading a single comment by @HughB and its replies. Click here to read the full conversation.
  • See the example at the bottom of the waveclk.

    // Clear the screen once, at startup
    g.setTheme({bg:"#f0f",fg:"#fff",dark:tru­e}).clear();
    // draw immediately at first, queue update
    
  • I guess you refer to the line

    g.setTheme({bg:"#f0f",fg:"#fff",dark:tru­e}).clear();
    

    This is actually an variant I tried before - and it is not working!

    If background is globally set to green, f.e., it remains green even after that line!

    In order to give you some steps to reproduce the problem (in the REPL):

    Try

      let customTheme = {
        fg:g.toColor(0,0,0), fg2:g.toColor(0,0,1), fgH:g.toColor(0,0,0),
        bg:g.toColor(0,1,0), bg2:g.toColor(0,1,0), bgH:g.toColor(1,1,0)
      };
      let globalSettings = Object.assign(
        require('Storage').readJSON('setting.jso­n', true) || {},
        { theme:customTheme }
      );
      require('Storage').writeJSON('setting.js­on', globalSettings);
    

    first, then try

    g.setTheme({ bg:'#000' });
    g.clear(false);
    

    (tested on a real device with firmware 2v11)

About

Avatar for HughB @HughB started