[Sugar-devel] [PATCH] Cartoon Builder: make interface screen resolution independent

Esteban Bordón ebordon at plan.ceibal.edu.uy
Wed Jun 22 07:24:07 EDT 2011


Thank you Rafael!

cheers,
Esteban.



2011/6/21 Rafael Ortiz <rafael at activitycentral.com>

> Hi Esteban.
>
> On Mon, Jun 20, 2011 at 8:31 AM, Esteban Bordón <
> ebordon at plan.ceibal.edu.uy> wrote:
>
>> Related to http://bugs.sugarlabs.org/ticket/2900
>>
>> Index: CartoonBuilder.activity/theme.py
>> ===================================================================
>> --- CartoonBuilder.activity.orig/theme.py
>> +++ CartoonBuilder.activity/theme.py
>> @@ -25,23 +25,23 @@ SOUND_SPEAKER = 'images/sounds/speaker.p
>>  SOUND_MUTE    = 'images/sounds/mute.png'
>>  SOUND_CUSTOM  = 'images/sounds/custom.png'
>>
>> -LOGO_WIDTH = 275
>> +LOGO_WIDTH = style.zoom(275)
>>  TAPE_COUNT = 11
>>  FRAME_COUNT = 14
>>
>>  DESKTOP_WIDTH = gtk.gdk.screen_width()
>>  DESKTOP_HEIGHT = gtk.gdk.screen_height() - style.LARGE_ICON_SIZE
>>
>> -THUMB_SIZE = min(100, DESKTOP_WIDTH / (TAPE_COUNT+1))
>> +THUMB_SIZE = style.zoom(min(100, DESKTOP_WIDTH / (TAPE_COUNT+1)))
>>
>> -FRAME_COLS = max(1, ((DESKTOP_WIDTH-LOGO_WIDTH) -
>> +FRAME_COLS = style.zoom(max(1, ((DESKTOP_WIDTH-LOGO_WIDTH) -
>>          min(DESKTOP_HEIGHT-THUMB_SIZE-THUMB_SIZE/2,
>> DESKTOP_WIDTH-LOGO_WIDTH))
>> -        / THUMB_SIZE)
>> +        / THUMB_SIZE))
>>
>>  FRAME_ROWS = max((DESKTOP_HEIGHT - THUMB_SIZE*3) / THUMB_SIZE,
>>          int(ceil(float(FRAME_COUNT) / FRAME_COLS)))
>>
>> -BORDER_WIDTH = 10
>> +BORDER_WIDTH = style.zoom(10)
>>
>>  # Colors from the Rich's UI design
>>
>>
>> _______________________________________________
>>
>> Sugar-devel mailing list
>> Sugar-devel at lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>>
> I had to apply your patch manually because it was corrupted on line 23, I
> tried git apply and git am and variations with the same results.. but now it
> is pushed
>
>
> http://git.sugarlabs.org/cartoon-builder/mainline/commit/cab483f1d08fefe111646e74b9286ad487583ea1
>
> Should be in next version of cartoon-builder.
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20110622/109af9e4/attachment.html>


More information about the Sugar-devel mailing list