idlehomescreen/xmluirendering/renderingplugins/xnclockfactory/src/xnclockadapter.cpp
equal
deleted
inserted
replaced
36 |
36 |
37 // Constants |
37 // Constants |
38 _LIT8( KDisplay, "display" ); |
38 _LIT8( KDisplay, "display" ); |
39 _LIT8( KNone, "none" ); |
39 _LIT8( KNone, "none" ); |
40 _LIT8( KBlock, "block" ); |
40 _LIT8( KBlock, "block" ); |
|
41 _LIT( KLogicalSecondaryFont, "EAknLogicalFontSecondaryFont" ); |
41 |
42 |
42 // ============================ LOCAL FUNCTIONS =============================== |
43 // ============================ LOCAL FUNCTIONS =============================== |
43 |
44 |
44 // ----------------------------------------------------------------------------- |
45 // ----------------------------------------------------------------------------- |
45 // ClockFormat |
46 // ClockFormat |
516 // ----------------------------------------------------------------------------- |
517 // ----------------------------------------------------------------------------- |
517 // CXnClockAdapter::CreateFontL |
518 // CXnClockAdapter::CreateFontL |
518 // ----------------------------------------------------------------------------- |
519 // ----------------------------------------------------------------------------- |
519 // |
520 // |
520 void CXnClockAdapter::CreateFontL( CXnNodePluginIf& aNode, |
521 void CXnClockAdapter::CreateFontL( CXnNodePluginIf& aNode, |
521 const TDesC& aFontName, |
|
522 CFont*& aFont ) |
522 CFont*& aFont ) |
523 { |
523 { |
524 TFontSpec spec; |
524 TFontSpec spec; |
525 TInt dummy; |
525 TInt dummy; |
526 |
526 |
544 { |
544 { |
545 height = iNode.UiEngineL()->VerticalPixelValueL( |
545 height = iNode.UiEngineL()->VerticalPixelValueL( |
546 prop, iNode.Rect().Height() ); |
546 prop, iNode.Rect().Height() ); |
547 } |
547 } |
548 } |
548 } |
549 |
549 |
550 // No need to relase avkon font |
550 TBool fontNotSet( ETrue ); |
551 CXnUtils::CreateFontL( aFontName, |
551 prop = aNode.GetPropertyL( |
552 height, |
552 XnPropertyNames::appearance::common::KFontFamily ); |
553 spec.iFontStyle, |
553 |
554 aFont, |
554 if ( prop ) |
555 dummy ); |
555 { |
|
556 CXnDomPropertyValue* value = static_cast< CXnDomPropertyValue* >( |
|
557 prop->Property()->PropertyValueList().Item( 0 ) ); |
|
558 |
|
559 if ( CXnDomPropertyValue::EIdent == value->PrimitiveValueType() |
|
560 ||CXnDomPropertyValue::EString == value->PrimitiveValueType() ) |
|
561 { |
|
562 const TDesC& fontName( prop->StringValueL()->Des() ); |
|
563 |
|
564 // No need to relase avkon font |
|
565 CXnUtils::CreateFontL( fontName, |
|
566 height, |
|
567 spec.iFontStyle, |
|
568 aFont, |
|
569 dummy ); |
|
570 |
|
571 fontNotSet = EFalse; |
|
572 } |
|
573 } |
|
574 |
|
575 if( fontNotSet ) |
|
576 { |
|
577 // No need to relase avkon font |
|
578 CXnUtils::CreateFontL( KLogicalSecondaryFont, |
|
579 height, |
|
580 spec.iFontStyle, |
|
581 aFont, |
|
582 dummy ); |
|
583 } |
556 } |
584 } |
557 |
585 |
558 // ----------------------------------------------------------------------------- |
586 // ----------------------------------------------------------------------------- |
559 // CXnClockAdapter::CreateColorL |
587 // CXnClockAdapter::CreateColorL |
560 // ----------------------------------------------------------------------------- |
588 // ----------------------------------------------------------------------------- |