Nick - 2013-11-13

A patch to implement to start the scroller at the start of the string, for all scrollers (h,v,m). It starts (for a marquee scroller) at the right with the first char. I've considered displaying the first widget-width characters of the string, but that means the text will start to scroll off immediately.

Hope this is of any use.

~~~~~~
Index: server/render.c
===================================================================
--- server/render.c (revision 14474)
+++ server/render.c (working copy)
@@ -469,6 +469,10 @@
debug(RPT_DEBUG, "%s(w=%p, left=%d, top=%d, right=%d, bottom=%d, timer=%ld)",
FUNCTION, w, left, top, right, bottom, timer);

  • if ((w->offset == 0))
  • w->offset = timer;
  • timer -= w->offset;
    +
    if ((w->text != NULL) && (w->right >= w->left)) {
    char str[BUFSIZE];
    int length;
    Index: server/widget.c
    ===================================================================
    --- server/widget.c (revision 14474)
    +++ server/widget.c (working copy)
    @@ -111,6 +111,7 @@
    w->length = 1;
    w->speed = 1;
    w->text = NULL;
  • w->offset = 0;
    //w->kids = NULL;

    if (w->type == WID_FRAME) {
    Index: server/widget.h
    ===================================================================
    --- server/widget.h (revision 14474)
    +++ server/widget.h (working copy)
    @@ -41,6 +41,7 @@
    int left, top, right, bottom; /< bounding rectangle */
    int length; /
    < size or direction /
    int speed; /< For scroller... */
    + long offset; /
    < Initial offset for scroller
    /
    char text; /< text or binary data /
    struct Screen
    frame_screen; /
    < frame widget get an associated screen
    /
    //LinkedList kids; / Frames can contain more widgets...*/
    ~~~~~~~