From acfbf19b3369a48d769521ffd226ca9bfbc9da68 Mon Sep 17 00:00:00 2001 From: Michael Prager Date: Thu, 17 Nov 2011 23:55:40 +0100 Subject: [PATCH] improved font scaling (resolves text overflow on Symbian Belle devices which use a different system font) --- Readme.txt | 2 ++ comingNext/index.html | 21 +++++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Readme.txt b/Readme.txt index 4d4607e..5853ea2 100644 --- a/Readme.txt +++ b/Readme.txt @@ -286,3 +286,5 @@ Changelog: 1.34 () by Michael Prager - fixed 12h time format not being used anymore on Anna devices - fixed weekday display (for real this time) on Symbian Anna and Belle devices + - improved font scaling (resolves text overflow on Symbian Belle devices which + use a different system font) diff --git a/comingNext/index.html b/comingNext/index.html index a5f531d..8241fe9 100644 --- a/comingNext/index.html +++ b/comingNext/index.html @@ -719,23 +719,26 @@ function updateData() var entryDate = ''; var dateArr = []; var fontsize = 'normal'; + var lineheight = 'normal'; if (mode == 0) { + fontsize = parseInt(72 / config['eventsPerWidget'].Value) + 'px'; + lineheight = parseInt(82 / config['eventsPerWidget'].Value) + 'px'; + if (config['eventsPerWidget'].Value == 3) { - fontsize = '17pt'; changeCssClass('.icon', 'width:20px; height:20px'); } else if (config['eventsPerWidget'].Value == 5) { - fontsize = '10pt'; changeCssClass('.icon', 'width:10px; height:10px'); } else if (config['eventsPerWidget'].Value == 6) { - fontsize = '8pt'; changeCssClass('.icon', 'width:8px; height:8px'); } } else changeCssClass('.icon', config['cssStyle_icon'].Value); - var entriesHtml = ''; + var entriesHtml = '
'; + if (mode == 0) + entriesHtml = '
' + entriesHtml; // this is needed to center the actual content vertically var eventIds = []; var max; if (mode == 0) @@ -917,6 +920,8 @@ function updateData() } } entriesHtml += '
'; + if (mode == 0) + entriesHtml = entriesHtml + ''; if (config['showNothingText'].Value && entriesHtml == '
') { var text = config['nothingText'].Value.replace(/%d/, config['monthRange'].Value); entriesHtml = '
' + text + '
'; @@ -1711,15 +1716,15 @@ function log(message)