• Would like to move the entire row of widgets to the left side, but I understand that widgets have their own positioning, is it possible to have a global override to move the entire bar to either side of the screen?

  • Agreed, maybe even Block them? I am working on a fullscreen LCARS watchface that just does not look good with the widgets. Alternatively if i could at least chose what Y the widgets were at I might be able to integrate them somewhat.

  • there is an App that let you hide/unhide the widgets, maybe it could help

  • Oh I hadn't seen that - I must study the API docs more

  • You can also chose not to draw the widgets on your watch face.

  • well I read that from the docs as well but the widgets get drawn by some external process regardless. So I removed all of them for now.
    The watchface will integrate the function of the most important ones anyway.

  • Agreed, maybe even Block them?

    Just don't call Bangle.loadWidgets in your clock and you won't get them.

    In terms of moving them, the biggest issue is whether the app itself is aware that they have moved, but if you're writing the app then there's no problem :)

    So... This is what the current drawWidgets function looks like: https://github.com/espruino/Espruino/blo­b/master/libs/js/banglejs/Bangle_drawWid­gets_Q3.js

    If you want to render them all down the left-hand side of the watch screen you can just add this to your watch face:

    Bangle.drawWidgets = (function() {
      if (global.WIDGETS) {
        var y=0, maxw=0;
        for (var wd of WIDGETS) {
      	  wd.x = 0;
      	  wd.y = y;
      	  y += 24;
          maxw = Math.max(wd.width, maxw);
        try { for (wd of WIDGETS) wd.draw(wd); } catch(e) {print(e);}

    I guess there's also the question of widget width since they can all be varying widths, and it is possible to rotate all the widgets too - you just have to override each widget's draw function so it renders to a buffer which you then rotate.

    Bangle.drawWidgets = (function() {
      if (global.WIDGETS) {
        var y=0;
        for (var wd of WIDGETS) {
      	  wd.x = 0;
      	  wd.y = y;
      	  y += wd.width;
        try { for (wd of WIDGETS) wd.draw(wd); } catch(e) {print(e);}
    Object.keys(WIDGETS).forEach(k => {
      var wd = WIDGETS[k];
      wd._draw = wd.draw;
      wd.draw = function() {
        if (!wd.width) return;
        var og = g, oy=wd.y;
        g = Graphics.createArrayBuffer(24,wd.width,1­6,{msb:true});
        g._reset = g.reset;
        g.reset = () => g._reset().setColor(og.theme.fg).setBgCo­lor(og.theme.bg);
        wd.y = 0;
        wd.y = oy;
        g = og;
  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Is there any way to change the position of the widget bar?

Posted by Avatar for Bolo @Bolo