diff options
author | Aleksey Lim <alsroot@member.fsf.org> | 2009-02-03 00:01:01 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@member.fsf.org> | 2009-02-03 00:01:01 (GMT) |
commit | a7dbc53a6657ad1e115f096e3072dc927847d853 (patch) | |
tree | 1ceea572568d9bd116f7ff4e142b9960861038d3 /theme.py | |
parent | 6bf19eae5239760be2c11fc39b56e11cd40c3efc (diff) |
Mix in Char with OOP
Diffstat (limited to 'theme.py')
-rw-r--r-- | theme.py | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -15,6 +15,7 @@ import os import gtk import shutil +from math import ceil from sugar.activity.activity import get_bundle_path, get_activity_root from sugar.graphics import style @@ -23,6 +24,7 @@ PREINSTALLED = 0 CUSTOM = 1 JOURNAL = 2 RESTORED = 3 +EMPTY = 4 SOUND_SPEAKER = 'images/sounds/speaker.png' SOUND_MUTE = 'images/sounds/custom.png' @@ -41,6 +43,9 @@ FRAME_COLS = max(1, ((DESKTOP_WIDTH-LOGO_WIDTH) - min(DESKTOP_HEIGHT-THUMB_SIZE-THUMB_SIZE/2, DESKTOP_WIDTH-LOGO_WIDTH)) / THUMB_SIZE) +FRAME_ROWS = max((DESKTOP_HEIGHT - THUMB_SIZE*3) / THUMB_SIZE, + int(ceil(float(FRAME_COUNT) / FRAME_COLS))) + BORDER_WIDTH = 10 # Colors from the Rich's UI design @@ -102,6 +107,11 @@ EMPTY_FILENAME = 'images/pics/empty.png' EMPTY_ORIG = pixbuf(EMPTY_FILENAME) EMPTY_THUMB = scale(EMPTY_ORIG) +#CUSTOM_GROUND EMPTY_FILENAME = 'images/pics/empty.png' + +CUSTOM_FRAME_ORIG = pixbuf('images/pics/custom.png') +CUSTOM_FRAME_THUMB = scale(CUSTOM_FRAME_ORIG) + def choose(out_fun): from sugar.graphics.objectchooser import ObjectChooser |