Menu

#655 Onscreen Volume-Bar step 99 to 100 is ugly

open
5
2007-03-23
2007-03-23
Anonymous
No

When changing the volume from 99 to 100, the Volume-bar is a bit too short. It looks not very nice. Please fix :-)

(tvtime 1.0.1 on Ubuntu 6.10 Edgy Eft)

Discussion

  • Nobody/Anonymous

    Logged In: NO

    It's because the font is not-monospace and a "%3d" (what should be there, too) at the string-setup hardly makes a difference.

     
  • argon

    argon - 2008-08-25

    Logged In: YES
    user_id=1233141
    Originator: NO

    Here an cheap (but best effort?) workaround:

     
  • argon

    argon - 2008-08-25

    Logged In: YES
    user_id=1233141
    Originator: NO

    (dammit)

    --- tvtimeosd.c 2008-08-25 22:35:46.069938797 +0200
    +++ tvtimeosd.c.old 2005-09-08 03:05:18.000000000 +0200
    @@ -731,18 +731,14 @@
    sprintf( bar, "%s", barname );
    osd_string_show_text( osd->strings[ OSD_MESSAGE1_BAR ].string, bar, osd->delay );
    osd_string_set_timeout( osd->strings[ OSD_MESSAGE2_BAR ].string, 0 );
    - osd->databar_xstart = osd->strings[ OSD_MESSAGE2_BAR ].xpos;
    - osd->databar_ypos = osd->strings[ OSD_MESSAGE2_BAR ].ypos + 4;
    -
    - osd_string_show_text( osd->strings[ OSD_DATA_VALUE ].string, " 100", 0 );
    -
    - maxwidth = osd->databar_xend
    - - osd_string_get_width( osd->strings[ OSD_DATA_VALUE ].string )
    - - osd->databar_xstart;

    sprintf( bar, " %d", percentage );
    osd_string_show_text( osd->strings[ OSD_DATA_VALUE ].string, bar, osd->delay );

    + osd->databar_xstart = osd->strings[ OSD_MESSAGE2_BAR ].xpos;
    + osd->databar_ypos = osd->strings[ OSD_MESSAGE2_BAR ].ypos + 4;
    + maxwidth = osd->databar_xend
    + - osd_string_get_width( osd->strings[ OSD_DATA_VALUE ].string ) - osd->databar_xstart;
    osd_rect_set_colour( osd->databar, 255, 255, 128, 128 );
    osd_rect_set_size( osd->databar, (maxwidth * percentage) / 100, 18 );
    osd_rect_set_timeout( osd->databar, osd->delay );

     

Log in to post a comment.