Ticket #2900: indep_resolution.patch

File indep_resolution.patch, 1.1 KB (added by ebordon, 13 years ago)

Make interface resolution independent

  • CartoonBuilder.activity

    old new SOUND_SPEAKER = 'images/sounds/speaker.p 
    2525SOUND_MUTE    = 'images/sounds/mute.png'
    2626SOUND_CUSTOM  = 'images/sounds/custom.png'
    2727
    28 LOGO_WIDTH = 275
     28LOGO_WIDTH = style.zoom(275)
    2929TAPE_COUNT = 11
    3030FRAME_COUNT = 14
    3131
    3232DESKTOP_WIDTH = gtk.gdk.screen_width()
    3333DESKTOP_HEIGHT = gtk.gdk.screen_height() - style.LARGE_ICON_SIZE
    3434
    35 THUMB_SIZE = min(100, DESKTOP_WIDTH / (TAPE_COUNT+1))
     35THUMB_SIZE = style.zoom(min(100, DESKTOP_WIDTH / (TAPE_COUNT+1)))
    3636
    37 FRAME_COLS = max(1, ((DESKTOP_WIDTH-LOGO_WIDTH) -
     37FRAME_COLS = style.zoom(max(1, ((DESKTOP_WIDTH-LOGO_WIDTH) -
    3838        min(DESKTOP_HEIGHT-THUMB_SIZE-THUMB_SIZE/2, DESKTOP_WIDTH-LOGO_WIDTH))
    39         / THUMB_SIZE)
     39        / THUMB_SIZE))
    4040
    4141FRAME_ROWS = max((DESKTOP_HEIGHT - THUMB_SIZE*3) / THUMB_SIZE,
    4242        int(ceil(float(FRAME_COUNT) / FRAME_COLS)))
    4343
    44 BORDER_WIDTH = 10
     44BORDER_WIDTH = style.zoom(10)
    4545
    4646# Colors from the Rich's UI design
    4747