calendarui/views/src/calencontainer.cpp
branchRCL_3
changeset 12 38571fd2a704
parent 0 f979ecb2b13e
child 21 9711e452b5e9
equal deleted inserted replaced
5:42814f902fe6 12:38571fd2a704
   824     
   824     
   825 
   825 
   826 TRect CCalenContainer::ReducePreview( TRect aRect ) const
   826 TRect CCalenContainer::ReducePreview( TRect aRect ) const
   827     {
   827     {
   828     TRACE_ENTRY_POINT;
   828     TRACE_ENTRY_POINT;
   829     if (UsePreview() )
   829     
   830         {
   830     // Find the application window
   831         // Find the application window
   831     TRect screenRect;
   832         TRect screenRect;
   832     TAknLayoutRect application_window;
   833         TAknLayoutRect application_window;
   833     AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EScreen, screenRect);
   834         AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EScreen, 
   834     application_window.LayoutRect(screenRect,
   835                                            screenRect );
   835             AknLayoutScalable_Apps::application_window().LayoutLine());
   836         application_window.LayoutRect( 
   836 
   837             screenRect, 
   837     // Find the size of the main pane when the preview is valid.
   838             AknLayoutScalable_Apps::application_window().LayoutLine() ); 
   838     TAknLayoutRect main_pane;
   839             
   839 
   840         // Find the size of the main pane when the preview is valid.
   840     TInt orientation = Layout_Meta_Data::IsLandscapeOrientation() ? 1 : 0;
   841         TAknLayoutRect main_pane;
   841 
   842         
   842     main_pane.LayoutRect(application_window.Rect(),
   843         TInt orientation = Layout_Meta_Data::IsLandscapeOrientation() ? 1 : 0;
   843             AknLayoutScalable_Apps::main_pane(orientation + 10).LayoutLine());
   844         
   844 
   845         main_pane.LayoutRect( 
   845     aRect.SetWidth(main_pane.Rect().Width());
   846             application_window.Rect(), 
   846     aRect.SetHeight(main_pane.Rect().Height());     
   847             AknLayoutScalable_Apps::main_pane( orientation + 10 ).LayoutLine() );
       
   848 
       
   849         aRect.SetWidth( main_pane.Rect().Width() );
       
   850         aRect.SetHeight( main_pane.Rect().Height() );
       
   851         }
       
   852         
   847         
   853     TRACE_EXIT_POINT;
   848     TRACE_EXIT_POINT;
   854     return aRect;
   849     return aRect;
   855     }
   850     }
   856 
   851