--- a/browserui/browser/BrowserAppSrc/BrowserShortcutKeyMap.cpp Fri Jul 03 15:46:41 2009 +0100
+++ b/browserui/browser/BrowserAppSrc/BrowserShortcutKeyMap.cpp Thu Aug 27 07:42:55 2009 +0300
@@ -67,9 +67,8 @@
#define KKeymapVScrollbarSize 4
// sizing for entire keymap (not counting scrollbar)
-// as a percentage of vertical screen size, and an aspect ratio width/height
+// as a percentage of vertical and horizontal screen size
#define KKeymapVSize 0.90
-#define KKeymapHVAspectRatio 0.88
#define KKeymapHSize 0.90
// margins for each cell
@@ -273,14 +272,15 @@
// resize it to account for scrollbar width/height
iTargetRect.Resize(-TSize(KKeymapHScrollbarSize,KKeymapVScrollbarSize));
+
+ TBool landscape = iTargetRect.Size().iWidth > iTargetRect.Size().iHeight ;
//
// derive shrink amounts based on keymap size constants and shrink the rect
//
TInt newHeight = (KKeymapVSize * iTargetRect.Size().iHeight);
- //TInt newWidth = (KKeymapHSize * iTargetRect.Size().iWidth);
- TInt newWidth = newHeight * KKeymapHVAspectRatio;
-
+ TInt newWidth = (KKeymapHSize * iTargetRect.Size().iWidth);
+
if(newWidth > KKeymapHSize * iTargetRect.Size().iWidth)
{
newWidth = (KKeymapHSize * iTargetRect.Size().iWidth);
@@ -306,7 +306,15 @@
// Set font types
iLineFont = LatinPlain12();
- iKeyFont = LatinBold16();
+
+ if (landscape)
+ { // in landscape need to shrink the font or else it gets clipped
+ iKeyFont = LatinBold13();
+ }
+ else
+ {
+ iKeyFont = LatinBold16();
+ }
// init cell data
InitCellDataL();