Changeset 9c6ab21


Ignore:
Timestamp:
01/07/11 13:43:05 (4 years ago)
Author:
xkolman2 <xkolman2@…>
Branches:
master
Children:
3f7bf10
Parents:
2420996
git-author:
xkolman2 <xkolman2@…> (01/07/11 13:43:05)
git-committer:
xkolman2 <xkolman2@…> (01/07/11 13:43:05)
Message:

center text on buttons

git-svn-id: https://nlp.fi.muni.cz/svn/gps_navigace/trunk@264 0858a4d0-ffff-46e5-938e-62b5ecb34222

Location:
modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • modules/mod_menu.py

    r3f4b3d8 r9c6ab21  
    289289    # Draw text 
    290290    cr.set_font_size(test_fontsize / ratio) 
    291     cr.move_to(x, y + h) 
     291    # Update the text extents info 
     292    _s1, _s2, textwidth, textheight, _s3, _s4 = cr.text_extents(text) 
     293    # _s3 contans the real width of the text 
     294    cr.move_to(x+(w-_s3)/2.0, y + h) 
    292295    cr.show_text(text) 
    293296 
  • modules/mod_turnByTurn.py

    r2420996 r9c6ab21  
    166166          # * show button 
    167167          showButtonWidth = bw * 0.2 
    168           menus.drawButton(cr, bx, by, showButtonWidth, buttonStripOffset, "#turn info", 'generic', "turnByTurn:toggleBoxHiding") 
     168          menus.drawButton(cr, bx, by, showButtonWidth, buttonStripOffset, "#show", 'generic', "turnByTurn:toggleBoxHiding") 
    169169        else: 
    170170          # background 
     
    213213          switchButtonWidth = bw * 0.4 
    214214          # * hide button 
    215           menus.drawButton(cr, bx, by, hideButtonWidth, buttonStripOffset, "#   hide", 'generic', "turnByTurn:toggleBoxHiding") 
     215          menus.drawButton(cr, bx, by, hideButtonWidth, buttonStripOffset, "#hide", 'generic', "turnByTurn:toggleBoxHiding") 
    216216          # * previous turn button 
    217217          menus.drawButton(cr, bx+hideButtonWidth, by, switchButtonWidth, buttonStripOffset, "#previous turn", 'generic', "turnByTurn:switchToPreviousTurn") 
Note: See TracChangeset for help on using the changeset viewer.