emailuis/emailui/inc/FreestyleEmailUiLayoutData.h
branchRCL_3
changeset 25 3533d4323edc
equal deleted inserted replaced
24:d189ee25cf9d 25:3533d4323edc
       
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Layout data of the application.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 /////////////////////////////////////////////////////////////////////////////
       
    20 // THIS IS A LAYOUT DATA FILE FOR FREESTYLE. 
       
    21 // RESOLUTIONS ARE:
       
    22 //
       
    23 // LOW RESOLUTION PORTRAIT  	178x208
       
    24 // LOW RESOLUTION LANDSCAPE 	208x178
       
    25 // QVGA RESOLUTION PORTRAIT 	240x320
       
    26 // QVGA RESOLUTION LANDSCAPE 	320x240
       
    27 // DOUBLE RESOLUTION PORTRAIT	352x416
       
    28 // DOUBLE RESOLUTION LANDSCAPE	416x352
       
    29 // VGA RESOLUTION PORTRAIT		480x640
       
    30 // VGA RESOLUTION LANDSCAPE		640x480
       
    31 // HVGA RESOLUTION PORTRAIT		320x480
       
    32 // HVGA RESOLUTION LANDSCAPE	480x320
       
    33 // WIDE RESOLUTION LANDSCAPE	800x352
       
    34 //
       
    35 ////////////////////////////////////////////////////////////////////////////
       
    36 
       
    37 #ifndef __FREESTYLEEMAILUI_LAYOUTDATA_H__
       
    38 #define __FREESTYLEEMAILUI_LAYOUTDATA_H__
       
    39 
       
    40 #include <avkon.hrh>
       
    41 //<cmail>
       
    42 #include "fstreelistconstants.h"
       
    43 //</cmail>
       
    44 
       
    45 // SCREEN RESOLUTIONS
       
    46 enum TScreenResolution
       
    47 	{
       
    48 	ELowResPortrait,
       
    49 	ELowResLandscape,
       
    50 	EQvgaPortrait,
       
    51 	EQvgaLandscape,
       
    52 	EDrPortrait,	
       
    53 	EDrLandscape,
       
    54 	EVgaPortrait,
       
    55 	EVgaLandscape,
       
    56 	EHvgaPortrait,
       
    57 	EHvgaLandscape,
       
    58 	EWideLandscape 
       
    59 	};
       
    60 
       
    61 // SCREEN ORIENTATIONS
       
    62 enum TScreenOrientation 
       
    63     {
       
    64     EPortrait,
       
    65     ELandscape
       
    66     };
       
    67 
       
    68 enum TFSEmailFont
       
    69 	{
       
    70 	EFSFontTypeSmall = 0,
       
    71 	EFSFontTypeSmallBold,
       
    72 	EFSFontTypeSmallItalic,
       
    73 	EFSFontTypeSmallUnderlined,
       
    74 	EFSFontTypeNormal,
       
    75 	EFSFontTypeNormalBold,
       
    76 	EFSFontTypeNormalItalic,
       
    77 	EFSFontTypeNormalUnderlined,
       
    78 	EFSFontTypeLarge,
       
    79 	EFSFontTypeLargeBold,
       
    80 	EFSFontTypeLargeItalic,
       
    81 	EFSFontTypeLargeUnderlined,	
       
    82 	};
       
    83 
       
    84 // Transition effect times
       
    85 static const TInt KListFadeInEffectTime = 270;
       
    86 static const TInt KListFadeOutEffectTime = KListFadeInEffectTime + 100;
       
    87 static const TInt KListSlideEffectTime = 270;
       
    88 static const TBool KListSlideEffectActive = EFalse; 
       
    89 static const TBool KListFadeEffectActive = EFalse;
       
    90 
       
    91 static const TInt KStatusIndicatorFadeEffectTime = 350;
       
    92 static const TInt KCtrlBarListFadeEffectTime = 400;
       
    93 
       
    94 static const TInt KViewChangeDelay = 100;
       
    95 static const TInt KListScrollingTime = 300;
       
    96 static const TInt KListItemExpansionDelay = 300;
       
    97 
       
    98 // Different resolution screen widths
       
    99 static const TInt KLowResPortraitWidth = 176;		
       
   100 static const TInt KLowResLandscapeWidth = 208;
       
   101 static const TInt KQvgaPortraitWidth = 240;
       
   102 static const TInt KQvgaLandscapeWidth = 320;
       
   103 static const TInt KDrPortraitWidth = 352;
       
   104 static const TInt KDrLandscapeWidth = 416;
       
   105 static const TInt KVgaPortraitWidth = 480;
       
   106 static const TInt KVgaLandscapeWidth = 640;
       
   107 static const TInt KHvgaPortraitWidth = 320;
       
   108 static const TInt KHvgaLandscapeWidth = 480;
       
   109 static const TInt KWideLandscapeWidth = 800;
       
   110 
       
   111 // Different resolution screen heights
       
   112 static const TInt KLowResPortraitHeight = 208;
       
   113 static const TInt KLowResLandscapeHeight = 176;
       
   114 static const TInt KQvgaPortraitHeight = 320;
       
   115 static const TInt KQvgaLandscapeHeight = 240;
       
   116 static const TInt KDrPortraitHeight = 416;
       
   117 static const TInt KDrLandscapeHeight = 352;
       
   118 static const TInt KVgaPortraitHeight = 640;
       
   119 static const TInt KVgaLandscapeHeight = 480;
       
   120 static const TInt KHvgaPortraitHeigh = 480;
       
   121 static const TInt KHvgaLandscapeHeight = 320;
       
   122 static const TInt KWideLandscapeHeight = 352;
       
   123 
       
   124 // Main UI grid icon size
       
   125 static const TInt KGridIconSizeInQvgaPort = 58;
       
   126 static const TInt KGridIconSizeInQvgaLand = 47;
       
   127 static const TInt KGridIconSizeInDoubleResPort = 100;
       
   128 static const TInt KGridIconSizeInDoubleResLand = 80;
       
   129 static const TInt KGridIconSizeInHvgaPort = 100;
       
   130 static const TInt KGridIconSizeInHvgaLand = 100;
       
   131 static const TInt KGridIconSizeInVgaPort = 100;
       
   132 static const TInt KGridIconSizeInVgaLand = 100;
       
   133 static const TInt KGridIconSizeInWideLand = 80;
       
   134 
       
   135 static const TSize KMailListIconSizeInQvgaPort(21,21);
       
   136 static const TSize KMailListIconSizeInQvgaLand(21,21);
       
   137 static const TSize KMailListIconSizeInDoubleResPort(23,23);
       
   138 static const TSize KMailListIconSizeInDoubleResLand(23,23);
       
   139 static const TSize KMailListIconSizeInHvgaPort(23,23);
       
   140 static const TSize KMailListIconSizeInHvgaLand(23,23);
       
   141 static const TSize KMailListIconSizeInVgaPort(23,23);
       
   142 static const TSize KMailListIconSizeInVgaLand(23,23);
       
   143 static const TSize KMailListIconSizeInWideLand(23,23);
       
   144 
       
   145 // Folder list icon relative size compared to item size
       
   146 static const TReal KFolderListIconRelativeSize = 0.8;
       
   147 
       
   148 static const TSize KSelectorVisualSizeInQvgaPort(60,60);
       
   149 static const TSize KSelectorVisualSizeInQvgaLand(50,50);
       
   150 static const TSize KSelectorVisualSizeInDoubleResPort(120,80);
       
   151 static const TSize KSelectorVisualSizeInDoubleResLand(100,65);
       
   152 static const TSize KSelectorVisualSizeInHvgaPort(75,85);
       
   153 static const TSize KSelectorVisualSizeInHvgaLand(75,85);
       
   154 static const TSize KSelectorVisualSizeInVgaPort(75,85);
       
   155 static const TSize KSelectorVisualSizeInVgaLand(75,85);
       
   156 static const TSize KSelectorVisualSizeInWideLand(80,80);
       
   157 
       
   158 static const TInt KOneLineListNodeHeightInQvgaPort = 24;
       
   159 static const TInt KOneLineListNodeHeightInQvgaLand = 24;
       
   160 static const TInt KOneLineListNodeHeightInDoubleResPort = 24;
       
   161 static const TInt KOneLineListNodeHeightInDoubleResLand = 24;
       
   162 static const TInt KOneLineListNodeHeightInHvgaPort = 24;
       
   163 static const TInt KOneLineListNodeHeightInHvgaLand = 24;
       
   164 static const TInt KOneLineListNodeHeightInVgaPort = 24;
       
   165 static const TInt KOneLineListNodeHeightInVgaLand = 24;
       
   166 static const TInt KOneLineListNodeHeightInWideLand = 24;
       
   167 
       
   168 static const TInt KOneLineListItemHeightInQvgaPort = 24;
       
   169 static const TInt KOneLineListItemHeightInQvgaLand = 24;
       
   170 static const TInt KOneLineListItemHeightInDoubleResPort = 27;
       
   171 static const TInt KOneLineListItemHeightInDoubleResLand = 27;
       
   172 static const TInt KOneLineListItemHeightInHvgaPort = 27;
       
   173 static const TInt KOneLineListItemHeightInHvgaLand = 27;
       
   174 static const TInt KOneLineListItemHeightInVgaPort = 27;
       
   175 static const TInt KOneLineListItemHeightInVgaLand = 27;
       
   176 static const TInt KOneLineListItemHeightInWideLand = 27;
       
   177 
       
   178 // Control bar heigth in different resolutions
       
   179 static const TInt KControlBarHeightInQvgaPort = 27;
       
   180 static const TInt KControlBarHeightInQvgaLand = 27;
       
   181 static const TInt KControlBarHeightInHvgaPort = 30;
       
   182 static const TInt KControlBarHeightInHvgaLand = 27;
       
   183 static const TInt KControlBarHeightInWideLand = 28;
       
   184 
       
   185 // Control bar text height
       
   186 static const TInt KControlBarTextHeightSmall = 120;
       
   187 static const TInt KControlBarTextHeightNormal = 130;
       
   188 static const TInt KControlBarTextHeightLarge = 140;
       
   189 
       
   190 // Control bar list size
       
   191 static const TInt KControlBarListLeftOffset = 25;
       
   192 static const TReal KControlBarListRelativeHeight = 0.95;
       
   193 static const TReal KControlBarListRelativeWidth = 0.60;
       
   194 static const TInt KControlBarListMinimumWidth = 150;
       
   195 static const TInt KControlBarListMaximumWidth = 250;
       
   196 static const TPoint KControlBarListPadding( 0, 2 );
       
   197 static const TInt KControlBarListBorderRoundingSize = 6;
       
   198 static const TInt KControlBarbuttonBorderRoundingSize = 3;
       
   199 
       
   200 // List font height
       
   201 static const TInt KListItemFontHeightSmall = 125;
       
   202 static const TInt KListItemFontHeightLarge = 170;
       
   203 static const TInt KListItemFontHeightNormal = 140;
       
   204 
       
   205 // List text marquee behaviour, mail list, search list, msg details, etc.
       
   206 static const TFsTextMarqueeType KListTextMarqueeType = EFsTextMarqueeForth; // Type
       
   207 static const TInt KListTextMarqueeSpeed = 25;		 // Pixels per second.
       
   208 static const TInt KListTextMarqueeStartDelay = 1500; // Milliseconds
       
   209 static const TInt KListTextMarqueeSpeedRepeats = 0;  // repeats
       
   210 
       
   211 // Border widths.
       
   212 const TInt KSelectorBorderWidth( 8 );
       
   213 
       
   214 // Compose screen specific layout constants
       
   215 // these are constants for all zoom levels
       
   216 const TInt KAifLabelMarginHorizontal = 9;
       
   217 const TInt KAifEditorMarginHorizontalNear = 35;
       
   218 const TInt KAifEditorMarginHorizontalFar = 23;
       
   219 const TInt KMaxAddressFieldLines = 3;
       
   220 const TInt KMaxVisibleAddressFieldLines = 2;
       
   221 const TInt KMaxVisibleSubjectFieldLines = 2;
       
   222 const TInt KIconWidthPriority = 21;
       
   223 const TInt KIconHeightPriority = 20;
       
   224 const TInt KIconWidthFollowUp = 21;
       
   225 const TInt KIconHeightFollowUp = 20;
       
   226 const TInt KIconWidthAttachment = 14;
       
   227 const TInt KIconHeightAttachment = 17;
       
   228 const TInt KInputFieldRoundingRadius = 3;
       
   229 const TSize KInputFieldRoundingSize( KInputFieldRoundingRadius * 2,
       
   230 									 KInputFieldRoundingRadius * 2 );
       
   231 
       
   232 // these are defined for each zoom level
       
   233 // normal zoom level
       
   234 const TInt KAifHeight = 45;
       
   235 const TInt KAifLabelMarginVertical = 4;
       
   236 const TInt KAifEditorMarginVertical = 23;
       
   237 const TInt KAifEditorHeight = 22;
       
   238 const TInt KSubjectExtraHeightBottom = 8;
       
   239 const TInt KAttachmentExtraHeightBottom = 8;
       
   240 const TInt KIconMarginPriorityVertical = KAifEditorMarginVertical;
       
   241 const TInt KIconMarginFollowUpVertical = KIconMarginPriorityVertical + KIconHeightPriority;
       
   242 const TInt KIconMarginAttachmentVertical = KIconMarginPriorityVertical;
       
   243 const TInt KLabelFontHeightPx = 14;
       
   244 const TInt KEditorFontHeightPx = 17;
       
   245 
       
   246 // small zoom level
       
   247 const TInt KAifHeightSmall = 40;
       
   248 const TInt KAifLabelMarginVerticalSmall = 3;
       
   249 const TInt KAifEditorMarginVerticalSmall = 20;
       
   250 const TInt KAifEditorHeightSmall = 20;
       
   251 const TInt KSubjectExtraHeightBottomSmall = 6;
       
   252 const TInt KAttachmentExtraHeightBottomSmall = 6;
       
   253 const TInt KIconMarginPriorityVerticalSmall = KAifEditorMarginVerticalSmall;
       
   254 const TInt KIconMarginFollowUpVerticalSmall = KIconMarginPriorityVerticalSmall + KIconHeightPriority;
       
   255 const TInt KIconMarginAttachmentVerticalSmall = KIconMarginPriorityVerticalSmall;
       
   256 const TInt KLabelFontHeightPxSmall = 13;
       
   257 const TInt KEditorFontHeightPxSmall = 15;
       
   258 
       
   259 // large zoom level
       
   260 const TInt KAifHeightLarge = 52;
       
   261 const TInt KAifLabelMarginVerticalLarge = 5;
       
   262 const TInt KAifEditorMarginVerticalLarge = 26;
       
   263 const TInt KAifEditorHeightLarge = 26;
       
   264 const TInt KSubjectExtraHeightBottomLarge = 10;
       
   265 const TInt KAttachmentExtraHeightBottomLarge = 10;
       
   266 const TInt KIconMarginPriorityVerticalLarge = KAifEditorMarginVerticalLarge;
       
   267 const TInt KIconMarginFollowUpVerticalLarge = KIconMarginPriorityVerticalLarge + KIconHeightPriority;
       
   268 const TInt KIconMarginAttachmentVerticalLarge = KIconMarginPriorityVerticalLarge;
       
   269 const TInt KLabelFontHeightPxLarge = 15;
       
   270 const TInt KEditorFontHeightPxLarge = 19;
       
   271 
       
   272 
       
   273 // Viewer layout spesific fonts, sizes etc.
       
   274 
       
   275 // Msg status and follow up flag icon sizes
       
   276 static const TSize KViewerIconSize( 20,20 );
       
   277 // Size of the transparent icon which is used to mark certain size indentation in pixels
       
   278 static const TSize KViewerTransparentIndentationIconSize( 31, 1 );
       
   279 // Size of the action menu icon in mail viewer
       
   280 static const TSize KViewerActionMenuIconSize( 12, 12 );
       
   281 // Margin of the action button in the mail viewer (this means the space between
       
   282 // action button and scrollbar in both normal and mirrored layout)
       
   283 static const TInt KViewerActionMenuIconMargin( 1 );
       
   284 // Hotspot seletor visual opacity
       
   285 static const TReal KViewerSelectorOpacity( 0.90 );
       
   286 
       
   287 // Viewer margins
       
   288 static const TInt KViewerRightMarginWidthInPixels = 10;
       
   289 static const TInt KViewerLeftMarginWidthInPixels = 5;
       
   290 
       
   291 // watermark place and size
       
   292 static const TSize KViewerDefaultWaterMarkSizeInViewer( 100, 100 );
       
   293 static const TPoint KViewerWaterMarkPositionFromBottomRightCorner( 150, 150 );
       
   294 
       
   295 // font contants
       
   296 static const TAknLogicalFontId KViewerLogicalTitleFontId = EAknLogicalFontTitleFont;
       
   297 static const TAknLogicalFontId KViewerLogicalTextFontId = EAknLogicalFontPrimaryFont;
       
   298 
       
   299 // viewer text fallback colors, these are used if current skin doesn't provide color
       
   300 static const TRgb KGrayBackgroundFallbackColor( 220,220,220 );
       
   301 static const TRgb KGraySentFallbackTextColor( 138,138,138 );
       
   302 static const TRgb KBlackFallbackTextColor( 0,0,0 );
       
   303 static const TRgb KLightBlueFallbackTextColor( 57,166, 214 );
       
   304 
       
   305 // viewer text sizes 
       
   306 static const TInt KViewerTitleFontSizeSmall = 13;
       
   307 static const TInt KViewerTitleFontSizeNormal = 14;
       
   308 static const TInt KViewerTitleFontSizeLarge = 15;
       
   309 
       
   310 static const TInt KViewerTextFontSizeSmall = 15;
       
   311 static const TInt KViewerTextFontSizeNormal = 17;
       
   312 static const TInt KViewerTextFontSizeLarge = 19;
       
   313 
       
   314 // viewer spaces in different places with all text sizes
       
   315 static const TInt KViewerTopMostSpaceSmall = 15;
       
   316 static const TInt KViewerRecipientSpaceSmall = 20;
       
   317 static const TInt KViewerHeaderInfoSpaceSmall = 20;
       
   318 static const TInt KViewerBottomMostSpaceSmall = 11;
       
   319 
       
   320 static const TInt KViewerTopMostSpaceNormal = 17;
       
   321 static const TInt KViewerRecipientSpaceNormal = 23;
       
   322 static const TInt KViewerHeaderInfoSpaceNormal = 22;
       
   323 static const TInt KViewerBottomMostSpaceNormal = 13;
       
   324 
       
   325 static const TInt KViewerTopMostSpaceLarge = 19;
       
   326 static const TInt KViewerRecipientSpaceLarge = 26;
       
   327 static const TInt KViewerHeaderInfoSpaceLarge = 26;
       
   328 static const TInt KViewerBottomMostSpaceLarge = 15;
       
   329 
       
   330 // size of the transparent icon between msgstatus&follow up icon and subject
       
   331 static const TInt KViewerSpaceBetweenIconAndSubject = 10;
       
   332 
       
   333 // Maximum number of recipients shown in the To, Cc, and Bcc fields
       
   334 static const TInt KViewerMaxRecipientLineCount = 4;
       
   335 
       
   336 // Maximum number of lines used to show the Mail subject. Subject is truncated after this is reached.
       
   337 static const TInt KViewerMaxSubjectLineCount = 10;
       
   338 
       
   339 // Maximum number of contacts included in the Predictive contact search popup.
       
   340 // Number is limited to enhance performance in case of large contact DB.
       
   341 static const TInt KMaxPcsMatches = 50;
       
   342 
       
   343 // Predictive contact search popup colors
       
   344 const TInt KPcsPopupDimmedFontTransparency  = 100;
       
   345 
       
   346 //Icon sizes
       
   347 static const TInt KListTextureNodeExpandedSize = 14;
       
   348 static const TInt KSearchLookingGlassIconSize = 20;
       
   349 static const TInt KListControlBarMailboxDefaultIconSize = 19;
       
   350 static const TInt KEMailListBarBgIconSize = 25;
       
   351 static const TInt KListTextureMailboxDefaultIconSize = 15;
       
   352 static const TInt KEListTextureSelectorSize = 30;
       
   353 static const TInt KListControlMenuIconSize = 13;
       
   354 static const TInt KAttachmentIconSize = 20;
       
   355 static const TInt KViewerHighlightTextureSize = 1;
       
   356 static const TInt KControlBarArrowTextureXSize = 12;
       
   357 static const TInt KControlBarArrowTextureYSize = 17;
       
   358 
       
   359 
       
   360 #endif // __FREESTYLEEMAILUI_LAYOUTDATA_H__     
       
   361 
       
   362 // End of File