From eeaf51704988bcc771c950128ce4c011e1dc7d91 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Sat, 27 Jan 2007 02:45:09 +0100 Subject: [PATCH] We was no more scaling icons depending on screen resolution, fix it --- shell/view/stylesheet.py | 12 ++++++++---- sugar/graphics/style.py | 10 +++++----- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/shell/view/stylesheet.py b/shell/view/stylesheet.py index 088875c7..83ea9dd5 100644 --- a/shell/view/stylesheet.py +++ b/shell/view/stylesheet.py @@ -25,22 +25,26 @@ grid = Grid() frame_ActivityIcon = { 'color' : IconColor('white'), - 'box-width' : grid.dimension(1) + 'box-width' : grid.dimension(1), + 'scale' : style.standard_icon_scale } frame_OverlayIcon = { 'box-width' : grid.dimension(1), - 'box-height' : grid.dimension(1) + 'box-height' : grid.dimension(1), + 'scale' : style.standard_icon_scale } frame_ZoomIcon = { 'box-width' : grid.dimension(1), - 'box-height' : grid.dimension(1) + 'box-height' : grid.dimension(1), + 'scale' : style.standard_icon_scale } frame_BuddyIcon = { 'box-width' : grid.dimension(1), - 'box-height' : grid.dimension(1) + 'box-height' : grid.dimension(1), + 'scale' : style.standard_icon_scale } home_MyIcon = { diff --git a/sugar/graphics/style.py b/sugar/graphics/style.py index 07eb1cc4..779605c1 100644 --- a/sugar/graphics/style.py +++ b/sugar/graphics/style.py @@ -24,11 +24,11 @@ _screen_factor = gtk.gdk.screen_width() / 1200.0 space_unit = 9 * _screen_factor separator_thickness = 3 * _screen_factor -standard_icon_scale = 1.0 -small_icon_scale = 0.5 -medium_icon_scale = 1.5 -large_icon_scale = 2.0 -xlarge_icon_scale = 3.0 +standard_icon_scale = 1.0 * _screen_factor +small_icon_scale = 0.5 * _screen_factor +medium_icon_scale = 1.5 * _screen_factor +large_icon_scale = 2.0 * _screen_factor +xlarge_icon_scale = 3.0 * _screen_factor def load_stylesheet(module): for objname in dir(module):