internetradio2.0/uicontrolssrc/irlayoututils.cpp
changeset 0 09774dfdd46b
equal deleted inserted replaced
-1:000000000000 0:09774dfdd46b
       
     1 /*
       
     2 * Copyright (c) 2008-2008 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:  Utilities for layouting purposes
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <aknutils.h>
       
    20 
       
    21 #include <internetradio.rsg>
       
    22 #include "irlayoututils.h"
       
    23 
       
    24 // ---------------------------------------------------------------------------
       
    25 // IRLayoutUtils::PresetBigLogoSize
       
    26 // The size for the big logo is calculated from the scren size
       
    27 // ---------------------------------------------------------------------------
       
    28 //
       
    29 TSize IRLayoutUtils::PresetBigLogoSize()
       
    30     {
       
    31     TSize screenSize;
       
    32     AknLayoutUtils::LayoutMetricsSize( AknLayoutUtils::EScreen, screenSize );
       
    33     TInt side = Min( screenSize.iWidth, screenSize.iHeight );
       
    34     return TSize( side, side );
       
    35     }
       
    36 
       
    37 // ---------------------------------------------------------------------------
       
    38 // IRLayoutUtils::PresetSmallLogoSizeL
       
    39 // The size for the small logo is taken from the application settings
       
    40 // ---------------------------------------------------------------------------
       
    41 //
       
    42 /*TSize IRLayoutUtils::PresetSmallLogoSizeL()
       
    43     {
       
    44     TInt width = 0;
       
    45     TInt height = 0;
       
    46     CVRRepositoryManager::GetRepositoryValueL( KVRCRUid, KVRCRPresetSmallLogoWidth, width );
       
    47     CVRRepositoryManager::GetRepositoryValueL( KVRCRUid, KVRCRPresetSmallLogoHeight, height );
       
    48     return TSize( width, height );
       
    49     }*/
       
    50 
       
    51 // ---------------------------------------------------------------------------
       
    52 // IRLayoutUtils::AdvertisementSizeL
       
    53 // ---------------------------------------------------------------------------
       
    54 //
       
    55 TSize IRLayoutUtils::AdvertisementSizeL()
       
    56     {
       
    57     TRect parentRect;
       
    58     AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EScreen, parentRect );
       
    59     
       
    60     TAknLayoutRect layoutRect;
       
    61     layoutRect.LayoutRect( parentRect, R_IR_ADVERTISEMENT_SIZE );
       
    62 
       
    63     return TSize( layoutRect.Rect().Size() );
       
    64     }
       
    65