1 /* |
1 /* |
2 * Copyright (c) 1997-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 1997-1999 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
521 TRect CEikAppUiFactory::ClientRect() |
521 TRect CEikAppUiFactory::ClientRect() |
522 { |
522 { |
523 CCoeEnv* env = CCoeEnv::Static(); |
523 CCoeEnv* env = CCoeEnv::Static(); |
524 TRect rect = LafAppUi::ClientRect( *env, *this ); |
524 TRect rect = LafAppUi::ClientRect( *env, *this ); |
525 |
525 |
|
526 #ifdef RD_SCALABLE_UI_V2 |
|
527 if ( TouchPane() ) |
|
528 { |
|
529 TouchPane()->ReduceRect( rect ); |
|
530 } |
|
531 |
526 CAknToolbar* toolbar = CurrentFixedToolbar(); |
532 CAknToolbar* toolbar = CurrentFixedToolbar(); |
527 |
533 |
528 // Reduce fixed toolbar's area. |
534 // reduce fixed toolbar's area |
529 if ( toolbar ) |
535 if ( toolbar ) |
530 { |
536 { |
531 TInt flags = toolbar->ToolbarFlags(); |
537 TInt flags = toolbar->ToolbarFlags(); |
532 |
538 |
533 if ( flags & KAknToolbarFixed && !( flags & KAknToolbarDefault ) ) |
539 if ( flags & KAknToolbarFixed && !( flags & KAknToolbarDefault ) ) |
534 { |
540 { |
535 toolbar->ReduceRect( rect ); |
541 toolbar->ReduceRect( rect ); |
536 } |
542 } |
537 } |
543 } |
538 |
544 |
539 // Recalculate the client rect is split input is enabled. |
545 // recaculate the client rect is splitinput is enabled. |
540 if ( iExtension && iExtension->iSplitInput ) |
546 if ( iExtension && iExtension->iSplitInput ) |
541 { |
547 { |
542 TInt inputTop = rect.iBr.iY; |
548 TInt inputTop = rect.iBr.iY; |
543 TAknLayoutRect splitwnd; |
549 TAknLayoutRect splitwnd; |
544 TRect screenRect ; |
550 TRect screenRect ; |
545 AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EScreen, screenRect ); |
551 AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EScreen, screenRect ); |
546 |
552 |
547 if ( Layout_Meta_Data::IsLandscapeOrientation() ) |
553 if ( Layout_Meta_Data::IsLandscapeOrientation() ) |
548 { |
554 { |
549 splitwnd.LayoutRect( |
555 splitwnd.LayoutRect( screenRect, AknLayoutScalable_Avkon::popup_fep_vkbss_window (0).LayoutLine() ); |
550 screenRect, |
556 TRect wndRc = splitwnd.Rect(); |
551 AknLayoutScalable_Avkon::popup_fep_vkbss_window( 0 ).LayoutLine() ); |
557 inputTop = wndRc.iTl.iY; |
552 } |
558 } |
553 else |
559 else |
554 { |
560 { |
555 splitwnd.LayoutRect( |
561 splitwnd.LayoutRect( screenRect, AknLayoutScalable_Avkon::popup_fep_ituss_window(0).LayoutLine() ); |
556 screenRect, |
562 TRect wndRc = splitwnd.Rect(); |
557 AknLayoutScalable_Avkon::popup_fep_ituss_window( 0 ).LayoutLine() ); |
563 inputTop = wndRc.iTl.iY; |
558 } |
564 } |
559 |
|
560 TRect wndRc( splitwnd.Rect() ); |
|
561 inputTop = wndRc.iTl.iY; |
|
562 rect.iBr.iY = rect.iBr.iY > inputTop ? inputTop : rect.iBr.iY; |
565 rect.iBr.iY = rect.iBr.iY > inputTop ? inputTop : rect.iBr.iY; |
563 rect.iTl.iY = 0; |
566 rect.iTl.iY = 0; |
564 } |
567 } |
565 |
568 |
|
569 #endif // RD_SCALABLE_UI_V2 |
|
570 |
566 return rect; |
571 return rect; |
567 } |
572 } |
568 |
|
569 |
573 |
570 void CEikAppUiFactory::ReadAppInfoResourceL(TInt aResourceFileOffset, CEikAppUi* aAppUi) |
574 void CEikAppUiFactory::ReadAppInfoResourceL(TInt aResourceFileOffset, CEikAppUi* aAppUi) |
571 { |
575 { |
572 const TInt resourceFileOffset=(aResourceFileOffset)? aResourceFileOffset : aAppUi->Application()->ResourceFileOffset(); |
576 const TInt resourceFileOffset=(aResourceFileOffset)? aResourceFileOffset : aAppUi->Application()->ResourceFileOffset(); |
573 SEikAppInfo appInfo; |
577 SEikAppInfo appInfo; |