equal
deleted
inserted
replaced
14 * Description: Button for touch pane. |
14 * Description: Button for touch pane. |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #include <AknBidiTextUtils.h> |
18 #include <AknBidiTextUtils.h> |
19 #include <aknsdrawutils.h> |
19 #include <AknsDrawUtils.h> |
20 #include <aknlayoutscalable_avkon.cdl.h> |
20 #include <aknlayoutscalable_avkon.cdl.h> |
21 #include <gulicon.h> |
21 #include <gulicon.h> |
22 #include <barsread.h> |
22 #include <barsread.h> |
23 #include <AknsFrameBackgroundControlContext.h> |
23 #include <AknsFrameBackgroundControlContext.h> |
24 #include <aknsconstants.h> |
24 #include <AknsConstants.h> |
25 |
25 #include <phoneappcommands.hrh> |
26 #include "bmtouchpanebutton.h" |
26 |
|
27 #include "BMTouchPaneButton.h" |
27 #include "BMTouchPaneInterface.h" |
28 #include "BMTouchPaneInterface.h" |
28 #include "bmpanic.h" |
29 #include "BMPanic.h" |
29 |
30 |
30 |
31 |
31 const TInt KBubbleButtonText = 255; |
32 const TInt KBubbleButtonText = 255; |
32 |
33 |
33 // ======== MEMBER FUNCTIONS ======== |
34 // ======== MEMBER FUNCTIONS ======== |
95 |
96 |
96 aReader.ReadInt16(); // this is mystery? |
97 aReader.ReadInt16(); // this is mystery? |
97 |
98 |
98 CAknButton::ConstructFromResourceL( aReader ); |
99 CAknButton::ConstructFromResourceL( aReader ); |
99 |
100 |
100 // function button text color |
101 SelectTextColor(); |
101 SetTextColorIds( KAknsIIDQsnTextColors, |
|
102 EAknsCIQsnTextColorsCG65 ); |
|
103 |
102 |
104 // Customize icons |
103 // Customize icons |
105 if ( iIconProvider ) |
104 if ( iIconProvider ) |
106 { |
105 { |
107 LoadCustomIcons( *iIconProvider ); |
106 LoadCustomIcons( *iIconProvider ); |
408 else |
407 else |
409 { |
408 { |
410 return KAknsIIDQsnFrButtonInactive; |
409 return KAknsIIDQsnFrButtonInactive; |
411 } |
410 } |
412 } |
411 } |
|
412 |
|
413 // ----------------------------------------------------------------------------- |
|
414 // Selects the correct text color. |
|
415 // ----------------------------------------------------------------------------- |
|
416 // |
|
417 void CBubbleTouchPaneButton::SelectTextColor() |
|
418 { |
|
419 TAknsQsnTextColorsIndex textColorIndex( EAknsCIQsnTextColorsCG65 ); |
|
420 TInt command = CommandId( EFalse ); |
|
421 |
|
422 if ( command == EPhoneCallComingCmdAnswer ) |
|
423 { |
|
424 textColorIndex = EAknsCIQsnTextColorsCG82; |
|
425 } |
|
426 else if ( command == EPhoneCallComingCmdReject ) |
|
427 { |
|
428 textColorIndex = EAknsCIQsnTextColorsCG83; |
|
429 } |
|
430 |
|
431 // function button text color |
|
432 SetTextColorIds( KAknsIIDQsnTextColors, textColorIndex ); |
|
433 } |