add keypad and actions to callscreen theme - no backend yet.
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Tue, 10 Jul 2012 20:33:48 +0000 (17:33 -0300)
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Tue, 10 Jul 2012 22:13:21 +0000 (19:13 -0300)
15 files changed:
Makefile.am
data/themes/default.edc
data/themes/images/bt_contacts_pressed.png [new file with mode: 0644]
data/themes/images/bt_contacts_released.png [new file with mode: 0644]
data/themes/images/bt_keypad_pressed.png [new file with mode: 0644]
data/themes/images/bt_keypad_released.png [new file with mode: 0644]
data/themes/images/bt_merge_pressed.png [new file with mode: 0644]
data/themes/images/bt_merge_released.png [new file with mode: 0644]
data/themes/images/bt_mute_pressed.png [new file with mode: 0644]
data/themes/images/bt_mute_released.png [new file with mode: 0644]
data/themes/images/bt_speaker_pressed.png [new file with mode: 0644]
data/themes/images/bt_speaker_released.png [new file with mode: 0644]
data/themes/images/bt_swap_pressed.png [new file with mode: 0644]
data/themes/images/bt_swap_released.png [new file with mode: 0644]
dialer/callscreen.c

index 3293071..02d634b 100644 (file)
@@ -59,7 +59,19 @@ data/themes/images/bt_add_contact_released.png \
 data/themes/images/bt_backspace_pressed.png \
 data/themes/images/bt_backspace_released.png \
 data/themes/images/bt_call_pressed.png \
-data/themes/images/bt_call_released.png
+data/themes/images/bt_call_released.png \
+data/themes/images/bt_contacts_pressed.png \
+data/themes/images/bt_contacts_released.png \
+data/themes/images/bt_keypad_pressed.png \
+data/themes/images/bt_keypad_released.png \
+data/themes/images/bt_merge_pressed.png \
+data/themes/images/bt_merge_released.png \
+data/themes/images/bt_mute_pressed.png \
+data/themes/images/bt_mute_released.png \
+data/themes/images/bt_speaker_pressed.png \
+data/themes/images/bt_speaker_released.png \
+data/themes/images/bt_swap_pressed.png \
+data/themes/images/bt_swap_released.png
 
 EXTRA_DIST = data/themes/default.edc $(THEME_IMAGES)
 
index 6d1dd49..59d3016 100644 (file)
@@ -25,6 +25,11 @@ collections {
          name: "caution";
          color: 193 39 44 255;
       }
+
+      color_class {
+         name: "disabled";
+         color: 255 255 255 64;
+      }
    }
 
    group {
@@ -424,6 +429,18 @@ collections {
 
       images {
          image: "bg_call.jpg" COMP;
+         image: "bt_mute_pressed.png" COMP;
+         image: "bt_mute_released.png" COMP;
+         image: "bt_keypad_pressed.png" COMP;
+         image: "bt_keypad_released.png" COMP;
+         image: "bt_speaker_pressed.png" COMP;
+         image: "bt_speaker_released.png" COMP;
+         image: "bt_merge_pressed.png" COMP;
+         image: "bt_merge_released.png" COMP;
+         image: "bt_swap_pressed.png" COMP;
+         image: "bt_swap_released.png" COMP;
+         image: "bt_contacts_pressed.png" COMP;
+         image: "bt_contacts_released.png" COMP;
       }
 
       parts {
@@ -502,11 +519,12 @@ collections {
             }
          }
 
-#define SEPARATOR(id, rely, offy, relto)                                \
+#define SEPARATOR(id, clip, rely, offy, relto)                          \
          part {                                                         \
             name: "separator.dark."##id;                                \
             type: RECT;                                                 \
             mouse_events: 0;                                            \
+            clip_to: clip;                                              \
             description {                                               \
                state: "default" 0.0;                                    \
                color: 255 255 255 255;                                  \
@@ -527,6 +545,7 @@ collections {
             name: "separator.bg."##id;                                  \
             type: RECT;                                                 \
             mouse_events: 0;                                            \
+            clip_to: clip;                                              \
             description {                                               \
                state: "default" 0.0;                                    \
                color: 255 255 255 255;                                  \
@@ -544,17 +563,606 @@ collections {
             }                                                           \
          }
 
-         SEPARATOR("answer", 0.0, -8, "button.answer");
-         SEPARATOR("hangup", 0.0, -8, "button.hangup");
-#undef SEPARATOR
+         SEPARATOR("actions", "clipper.actions", 0.0, -8, "bg.actions");
+
+         part {
+            name: "bg.actions";
+            type: RECT;
+            mouse_events: 0;
+            clip_to: "clipper.keypad-hidden";
+            description {
+               state: "default" 0.0;
+               color: 0 0 0 0;
+               min: 720 340;
+               max: 720 99999; /* keep it tight centered */
+               fixed: 1 1;
+               rel1 {
+                  to: "bg.buttons";
+                  relative: 0.0 0.0;
+                  offset: 0 -348;
+               }
+               rel2 {
+                  to: "bg.buttons";
+                  relative: 1.0 0.0;
+                  offset: -1 -8;
+               }
+            }
+         }
+         part {
+            name: "clipper.actions";
+            type: RECT;
+            mouse_events: 0;
+            clip_to: "clipper.keypad-hidden";
+            description {
+               state: "default" 0.0;
+               color: 255 255 255 0;
+               visible: 0;
+            }
+            description {
+               state: "visible" 0.0;
+               inherit: "default" 0.0;
+               color: 255 255 255 255;
+               visible: 1;
+            }
+         }
+         programs {
+            program {
+               name: "show,actions";
+               action: STATE_SET "visible" 0.0;
+               transition: DECELERATE 0.3;
+               target: "clipper.actions";
+            }
+            program {
+               name: "hide,actions";
+               action: STATE_SET "default" 0.0;
+               transition: ACCELERATE 0.3;
+               target: "clipper.actions";
+            }
+
+            program {
+               signal: "state,disconnected";
+               source: "call";
+               after: "hide,actions";
+            }
+            program {
+               signal: "state,active";
+               source: "call";
+               after: "show,actions";
+            }
+            program {
+               signal: "state,held";
+               source: "call";
+               after: "hide,actions";
+            }
+            program {
+               signal: "state,dialing";
+               source: "call";
+               after: "hide,actions";
+            }
+            program {
+               signal: "state,alerting";
+               source: "call";
+               after: "hide,actions";
+            }
+            program {
+               signal: "state,incoming";
+               source: "call";
+               after: "hide,actions";
+            }
+         }
+
+#define ACTION_BUTTON(id, img, r1, r2)                                  \
+         part {                                                         \
+            name: "clipper."##id;                                       \
+            type: RECT;                                                 \
+            clip_to: "clipper.actions";                                 \
+            description {                                               \
+               state: "default" 0.0;                                    \
+               color: 255 255 255 255;                                  \
+               rel1.to: "button."##id;                                  \
+               rel2.to: "button."##id;                                  \
+            }                                                           \
+            description {                                               \
+               state: "disabled" 0.0;                                   \
+               inherit: "default" 0.0;                                  \
+               color_class: "disabled";                                 \
+            }                                                           \
+            description {                                               \
+               state: "hidden" 0.0;                                     \
+               inherit: "default" 0.0;                                  \
+               color: 255 255 255 0;                                    \
+               visible: 0;                                              \
+            }                                                           \
+         }                                                              \
+         part {                                                         \
+            name: "button."##id;                                        \
+            type: IMAGE;                                                \
+            mouse_events: 1;                                            \
+            clip_to: "clipper."##id;                                    \
+            description {                                               \
+               state: "default" 0.0;                                    \
+               color: 255 255 255 255;                                  \
+               color_class: "action";                                   \
+               min: 240 170;                                            \
+               max: 240 170;                                            \
+               fixed: 1 1;                                              \
+               rel1 {                                                   \
+                  to: "bg.actions";                                     \
+                  relative: r1;                                         \
+               }                                                        \
+               rel2 {                                                   \
+                  to: "bg.actions";                                     \
+                  relative: r2;                                         \
+                  offset: -1 -1;                                        \
+               }                                                        \
+               image.normal: "bt_"##img"_released.png";                 \
+            }                                                           \
+            description {                                               \
+               state: "pressed" 0.0;                                    \
+               inherit: "default" 0.0;                                  \
+               color: 255 255 255 0;                                    \
+               visible: 0;                                              \
+            }                                                           \
+         }                                                              \
+         part {                                                         \
+            name: "button.over."##id;                                   \
+            type: IMAGE;                                                \
+            clip_to: "clipper."##id;                                    \
+            mouse_events: 1;                                            \
+            description {                                               \
+               state: "default" 0.0;                                    \
+               color: 255 255 255 0;                                    \
+               visible: 0;                                              \
+               color_class: "action";                                   \
+               rel1.to: "button."##id;                                  \
+               rel2.to: "button."##id;                                  \
+               image.normal: "bt_"##img"_pressed.png";                  \
+            }                                                           \
+            description {                                               \
+               state: "pressed" 0.0;                                    \
+               inherit: "default" 0.0;                                  \
+               color: 255 255 255 255;                                  \
+               visible: 1;                                              \
+            }                                                           \
+         }                                                              \
+         part {                                                         \
+            name: "blocker."##id;                                       \
+            type: RECT;                                                 \
+            mouse_events: 1;                                            \
+            clip_to: "clipper."##id;                                    \
+            description {                                               \
+               state: "default" 0.0;                                    \
+               color: 0 0 0 0;                                          \
+               visible: 0;                                              \
+            }                                                           \
+            description {                                               \
+               state: "disabled" 0.0;                                   \
+               inherit: "default" 0.0;                                  \
+               visible: 1;                                              \
+            }                                                           \
+         }                                                              \
+         programs {                                                     \
+            program {                                                   \
+               signal: "mouse,up,1";                                    \
+               source: "button."##id;                                   \
+               action: SIGNAL_EMIT "released,"##id "call";              \
+               after: "show_up_"##id;                                   \
+            }                                                           \
+            program {                                                   \
+               name: "show_up_"##id;                                    \
+               action: STATE_SET "default" 0.0;                         \
+               transition: DECELERATE 0.1;                              \
+               target: "button."##id;                                   \
+               target: "button.over."##id;                              \
+            }                                                           \
+            program {                                                   \
+               signal: "mouse,down,1";                                  \
+               source: "button."##id;                                   \
+               after: "show_down_"##id;                                 \
+               action: SIGNAL_EMIT "pressed,"##id "call";               \
+            }                                                           \
+            program {                                                   \
+               name: "show_down_"##id;                                  \
+               action: STATE_SET "pressed" 0.0;                         \
+               transition: ACCELERATE 0.1;                              \
+               target: "button."##id;                                   \
+               target: "button.over."##id;                              \
+            }                                                           \
+            program {                                                   \
+               signal: "mouse,clicked,1";                               \
+               source: "button."##id;                                   \
+               action: SIGNAL_EMIT "clicked,"##id "call";               \
+            }                                                           \
+            program {                                                   \
+               signal: "disable,"##id;                                  \
+               source: "call";                                          \
+               action: STATE_SET "disabled" 0.0;                        \
+               target: "blocker."##id;                                  \
+               target: "clipper."##id;                                  \
+            }                                                           \
+            program {                                                   \
+               signal: "enable,"##id;                                   \
+               source: "call";                                          \
+               action: STATE_SET "default" 0.0;                         \
+               target: "blocker."##id;                                  \
+               target: "clipper."##id;                                  \
+            }                                                           \
+         }
+
+         ACTION_BUTTON("mute",    "mute",    0.000000000 0.0, 0.333333333 0.5);
+         ACTION_BUTTON("keypad",  "keypad",  0.333333333 0.0, 0.666666666 0.5);
+         ACTION_BUTTON("speaker", "speaker", 0.666666666 0.0, 1.000000000 0.5);
+
+         ACTION_BUTTON("merge",    "merge",  0.000000000 0.5, 0.333333333 1.0);
+         ACTION_BUTTON("swap",     "swap",   0.333333333 0.5, 0.666666666 1.0);
+         ACTION_BUTTON("contacts", "contacts",0.666666666 0.5, 1.000000000 1.0);
+#undef ACTION_BUTTON
+
+         SEPARATOR("answer", "clipper.answer", 0.0, -8, "button.answer");
+         SEPARATOR("hangup", "", 0.0, -8, "button.hangup");
+
+         part {
+            name: "clipper.keypad-hidden";
+            type: RECT;
+            description {
+               state: "default" 0.0;
+               color: 255 255 255 255;
+               visible: 1;
+            }
+            description {
+               state: "alternate" 0.0;
+               inherit: "default" 0.0;
+               color: 255 255 255 0;
+               visible: 0;
+            }
+         }
+         part {
+            name: "clipper.keypad-visible";
+            type: RECT;
+            description {
+               state: "default" 0.0;
+               color: 255 255 255 0;
+               visible: 0;
+            }
+            description {
+               state: "alternate" 0.0;
+               inherit: "default" 0.0;
+               color: 255 255 255 255;
+               visible: 1;
+            }
+         }
+
+
+         /* keypad */
+         SEPARATOR("hide-keypad", "clipper.keypad-visible", 0.0, -8, "button.hide-keypad");
+         SEPARATOR("keypad", "clipper.keypad-visible", 0.0, -8, "bg.keypad");
+
+         part {
+            name: "bg.keypad";
+            type: RECT;
+            mouse_events: 0;
+            clip_to: "clipper.keypad-visible";
+            description {
+               state: "default" 0.0;
+               color: 0 0 0 0;
+               min: 720 680;
+               max: 720 680; /* keep it tight centered */
+               rel1 {
+                  relative: 0.0 0.0;
+                  offset: 0 -688; /* separator */
+                  to_y: "button.hide-keypad";
+               }
+               rel2 {
+                  relative: 1.0 0.0;
+                  offset: 0 -9; /* separator */
+                  to_y: "button.hide-keypad";
+               }
+            }
+         }
+#define BUTTON(id, label, sub, ccls, r1, r2)                            \
+         part {                                                         \
+            name: "button."##id;                                        \
+            type: RECT;                                                 \
+            mouse_events: 1;                                            \
+            clip_to: "clipper.keypad-visible";                          \
+            description {                                               \
+               state: "default" 0.0;                                    \
+               color: 255 255 255 0;                                    \
+               color_class: "action";                                   \
+               rel1 {                                                   \
+                  to: "bg.keypad";                                      \
+                  relative: r1;                                         \
+               }                                                        \
+               rel2 {                                                   \
+                  to: "bg.keypad";                                      \
+                  relative: r2;                                         \
+                  offset: -2 -2;                                        \
+               }                                                        \
+            }                                                           \
+            description {                                               \
+               state: "pressed" 0.0;                                    \
+               inherit: "default" 0.0;                                  \
+               color: 255 255 255 255;                                  \
+            }                                                           \
+         }                                                              \
+         part {                                                         \
+            name: "label."##id;                                         \
+            type: TEXT;                                                 \
+            mouse_events: 0;                                            \
+            clip_to: "clipper.keypad-visible";                          \
+            description {                                               \
+               state: "default" 0.0;                                    \
+               color: 255 255 255 255;                                  \
+               color_class: ccls;                                       \
+               rel1.to: "button."##id;                                  \
+               rel2 {                                                   \
+                  to: "button."##id;                                    \
+                  relative: 1.0 0.8;                                    \
+               }                                                        \
+               text {                                                   \
+                  text: label;                                          \
+                  font: "Verdana";                                      \
+                  size: 99;                                             \
+                  align: 0.5 0.5;                                       \
+               }                                                        \
+            }                                                           \
+            description {                                               \
+               state: "pressed" 0.0;                                    \
+               inherit: "default" 0.0;                                  \
+               color: 16 16 16 255;                                     \
+            }                                                           \
+         }                                                              \
+         part {                                                         \
+            name: "sub."##id;                                           \
+            type: TEXT;                                                 \
+            mouse_events: 0;                                            \
+            clip_to: "clipper.keypad-visible";                          \
+            description {                                               \
+               state: "default" 0.0;                                    \
+               color: 255 255 255 255;                                  \
+               color_class: "light";                                    \
+               rel1 {                                                   \
+                  to: "button."##id;                                    \
+                  relative: 0.0 0.5;                                    \
+                  offset: 0 2;                                          \
+               }                                                        \
+               rel2.to: "button."##id;                                  \
+               text {                                                   \
+                  text: sub;                                            \
+                  font: "Verdana:style=Bold";                           \
+                  size: 16;                                             \
+                  align: 0.5 0.5;                                       \
+               }                                                        \
+            }                                                           \
+            description {                                               \
+               state: "pressed" 0.0;                                    \
+               inherit: "default" 0.0;                                  \
+               color: 16 16 16 255;                                     \
+            }                                                           \
+         }                                                              \
+         programs {                                                     \
+            program {                                                   \
+               signal: "mouse,up,1";                                    \
+               source: "button."##id;                                   \
+               action: SIGNAL_EMIT "released,"##id "call";              \
+               after: "show_up_"##id;                                   \
+            }                                                           \
+            program {                                                   \
+               name: "show_up_"##id;                                    \
+               action: STATE_SET "default" 0.0;                         \
+               transition: DECELERATE 0.1;                              \
+               target: "button."##id;                                   \
+               target: "label."##id;                                    \
+               target: "sub."##id;                                      \
+            }                                                           \
+            program {                                                   \
+               signal: "mouse,down,1";                                  \
+               source: "button."##id;                                   \
+               after: "show_down_"##id;                                 \
+               action: SIGNAL_EMIT "pressed,"##id "call";               \
+            }                                                           \
+            program {                                                   \
+               name: "show_down_"##id;                                  \
+               action: STATE_SET "pressed" 0.0;                         \
+               transition: ACCELERATE 0.3;                              \
+               target: "button."##id;                                   \
+               target: "label."##id;                                    \
+               target: "sub."##id;                                      \
+            }                                                           \
+            program {                                                   \
+               signal: "mouse,clicked,1";                               \
+               source: "button."##id;                                   \
+               action: SIGNAL_EMIT "clicked,"##id "call";               \
+            }                                                           \
+         }
+
+         BUTTON("1",    "1",     "", "action", 0.000 0.0, 0.333 0.25);
+         BUTTON("2",    "2",  "ABC", "action", 0.333 0.0, 0.666 0.25);
+         BUTTON("3",    "3",  "DEF", "action", 0.666 0.0, 1.000 0.25);
+
+         BUTTON("4",    "4",  "GHI", "action", 0.000 0.25, 0.333 0.50);
+         BUTTON("5",    "5",  "JKL", "action", 0.333 0.25, 0.666 0.50);
+         BUTTON("6",    "6",  "MNO", "action", 0.666 0.25, 1.000 0.50);
+
+         BUTTON("7",    "7", "PQRS", "action", 0.000 0.50, 0.333 0.75);
+         BUTTON("8",    "8",  "TUV", "action", 0.333 0.50, 0.666 0.75);
+         BUTTON("9",    "9", "WXYZ", "action", 0.666 0.50, 1.000 0.75);
+
+         BUTTON("star", "*",     "", "light",  0.000 0.75, 0.333 1.00);
+         BUTTON("0",    "0",    "+", "action", 0.333 0.75, 0.666 1.00);
+         BUTTON("hash", "#",     "", "light",  0.666 0.75, 1.000 1.00);
+#undef BUTTON
 
          part {
+            name: "area.hide-keypad";
+            type: RECT;
+            mouse_events: 0;
+            clip_to: "clipper.keypad-visible";
+            description {
+               state: "default" 0.0;
+               color: 0 0 0 0;
+               visible: 0;
+               rel1 {
+                  to_y: "button.hangup";
+                  relative: 0.0 -1.0;
+                  offset: 0 688;
+               }
+               rel2 {
+                  to_y: "button.hangup";
+                  relative: 1.0 0.0;
+                  offset: -1 687;
+               }
+            }
+            description {
+               state: "alternate" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               rel1 {
+                  to_y: "button.hangup";
+                  relative: 0.0 -1.0;
+                  offset: 0 -8; /* separator */
+               }
+               rel2 {
+                  to_y: "button.hangup";
+                  relative: 1.0 0.0;
+                  offset: -1 -9; /* separator */
+               }
+            }
+         }
+         part {
+            name: "button.hide-keypad";
+            type: RECT;
+            mouse_events: 1;
+            clip_to: "clipper.keypad-visible";
+            description {
+               state: "default" 0.0;
+               color: 255 255 255 0;
+               color_class: "action";
+               rel1.to_y: "area.hide-keypad";
+               rel2.to_y: "area.hide-keypad";
+            }
+            description {
+               state: "pressed" 0.0;
+               inherit: "default" 0.0;
+               color: 255 255 255 255;
+            }
+         }
+         part {
+            name: "label.hide-keypad";
+            type: TEXT;
+            mouse_events: 0;
+            clip_to: "clipper.keypad-visible";
+            description {
+               state: "default" 0.0;
+               color: 255 255 255 255;
+               color_class: "action";
+               rel1.to: "button.hide-keypad";
+               rel2.to: "button.hide-keypad";
+               text {
+                  text: "Hide Keypad";
+                  font: "Verdana";
+                  size: 99;
+                  align: 0.5 0.5;
+               }
+            }
+            description {
+               state: "pressed" 0.0;
+               inherit: "default" 0.0;
+               color_class: "bg";
+            }
+         }
+         programs {
+            program {
+               signal: "mouse,up,1";
+               source: "button.hide-keypad";
+               action: STATE_SET "default" 0.0;
+               transition: DECELERATE 0.1;
+               target: "button.hide-keypad";
+               target: "label.hide-keypad";
+            }
+            program {
+               signal: "mouse,down,1";
+               source: "button.hide-keypad";
+               action: STATE_SET "pressed" 0.0;
+               transition: ACCELERATE 0.3;
+               target: "button.hide-keypad";
+               target: "label.hide-keypad";
+            }
+
+            program {
+               name: "hide-keypad-phase1";
+               signal: "mouse,clicked,1";
+               source: "button.hide-keypad";
+               action: STATE_SET "default" 0.0;
+               transition: ACCELERATE 0.3;
+               target: "clipper.keypad-visible";
+               target: "area.hide-keypad";
+               after: "hide-keypad-phase2";
+            }
+            program {
+               name: "hide-keypad-phase2";
+               action: STATE_SET "default" 0.0;
+               transition: ACCELERATE 0.3;
+               target: "clipper.keypad-hidden";
+            }
+
+            program {
+               name: "show-keypad-phase1";
+               signal: "mouse,clicked,1";
+               source: "button.keypad";
+               action: STATE_SET "alternate" 0.0;
+               transition: ACCELERATE 0.3;
+               target: "clipper.keypad-hidden";
+               after: "show-keypad-phase2";
+            }
+            program {
+               name: "show-keypad-phase2";
+               action: STATE_SET "alternate" 0.0;
+               transition: ACCELERATE 0.3;
+               target: "area.hide-keypad";
+               target: "clipper.keypad-visible";
+            }
+         }
+
+         /* buttons */
+         part {
+            name: "bg.buttons";
+            type: RECT;
+            mouse_events: 0;
+            clip_to: "clipper.keypad-hidden";
+            description {
+               state: "default" 0.0;
+               color: 0 0 0 0;
+               rel1.to: "area.answer";
+               rel2.to: "button.hangup";
+            }
+         }
+
+         part {
+            name: "clipper.answer";
+            type: RECT;
+            mouse_events: 0;
+            clip_to: "clipper.keypad-hidden";
+            description {
+               state: "default" 0.0;
+               color: 255 255 255 0;
+               visible: 0;
+            }
+            description {
+               state: "visible" 0.0;
+               inherit: "default" 0.0;
+               color: 255 255 255 255;
+               visible: 1;
+            }
+         }
+         part {
             name: "area.answer";
             type: RECT;
             mouse_events: 0;
+            clip_to: "clipper.answer";
             description {
                state: "default" 0.0;
-               color: 0 0 0 255;
+               color: 0 0 0 0;
                visible: 0;
                rel1.to_y: "button.hangup";
                rel2.to_y: "button.hangup";
@@ -562,7 +1170,6 @@ collections {
             description {
                state: "visible" 0.0;
                inherit: "default" 0.0;
-               color: 255 255 255 255;
                visible: 1;
                rel1 {
                   to_y: "button.hangup";
@@ -571,8 +1178,8 @@ collections {
                }
                rel2 {
                   to_y: "button.hangup";
-                  relative: 0.0 0.0;
-                  offset: 0 -9; /* separator */
+                  relative: 1.0 0.0;
+                  offset: -1 -9; /* separator */
                }
             }
          }
@@ -580,23 +1187,25 @@ collections {
             name: "button.answer";
             type: RECT;
             mouse_events: 1;
+            clip_to: "clipper.answer";
             description {
                state: "default" 0.0;
-               color: 255 255 255 255;
-               color_class: "bg";
+               color: 255 255 255 0;
+               color_class: "action";
                rel1.to_y: "area.answer";
                rel2.to_y: "area.answer";
             }
             description {
                state: "pressed" 0.0;
                inherit: "default" 0.0;
-               color_class: "action";
+               color: 255 255 255 255;
             }
          }
          part {
             name: "label.answer";
             type: TEXT;
             mouse_events: 0;
+            clip_to: "clipper.answer";
             description {
                state: "default" 0.0;
                color: 255 255 255 255;
@@ -613,7 +1222,7 @@ collections {
             description {
                state: "pressed" 0.0;
                inherit: "default" 0.0;
-               color: 0 0 0 255;
+               color_class: "bg";
             }
          }
          programs {
@@ -654,12 +1263,14 @@ collections {
                source: "call";
                action: STATE_SET "visible" 0.0;
                target: "area.answer";
+               target: "clipper.answer";
             }
             program {
                signal: "hide,answer";
                source: "call";
                action: STATE_SET "default" 0.0;
                target: "area.answer";
+               target: "clipper.answer";
             }
          }
 
@@ -706,7 +1317,7 @@ collections {
             description {
                state: "pressed" 0.0;
                inherit: "default" 0.0;
-               color: 0 0 0 255;
+               color_class: "bg";
             }
          }
          programs {
@@ -742,6 +1353,8 @@ collections {
                action: SIGNAL_EMIT "clicked,hangup" "call";
             }
          }
+#undef SEPARATOR
       }
+
    }
 }
diff --git a/data/themes/images/bt_contacts_pressed.png b/data/themes/images/bt_contacts_pressed.png
new file mode 100644 (file)
index 0000000..034678e
Binary files /dev/null and b/data/themes/images/bt_contacts_pressed.png differ
diff --git a/data/themes/images/bt_contacts_released.png b/data/themes/images/bt_contacts_released.png
new file mode 100644 (file)
index 0000000..a053344
Binary files /dev/null and b/data/themes/images/bt_contacts_released.png differ
diff --git a/data/themes/images/bt_keypad_pressed.png b/data/themes/images/bt_keypad_pressed.png
new file mode 100644 (file)
index 0000000..efce8f0
Binary files /dev/null and b/data/themes/images/bt_keypad_pressed.png differ
diff --git a/data/themes/images/bt_keypad_released.png b/data/themes/images/bt_keypad_released.png
new file mode 100644 (file)
index 0000000..a4e566c
Binary files /dev/null and b/data/themes/images/bt_keypad_released.png differ
diff --git a/data/themes/images/bt_merge_pressed.png b/data/themes/images/bt_merge_pressed.png
new file mode 100644 (file)
index 0000000..e9b383c
Binary files /dev/null and b/data/themes/images/bt_merge_pressed.png differ
diff --git a/data/themes/images/bt_merge_released.png b/data/themes/images/bt_merge_released.png
new file mode 100644 (file)
index 0000000..b8f009d
Binary files /dev/null and b/data/themes/images/bt_merge_released.png differ
diff --git a/data/themes/images/bt_mute_pressed.png b/data/themes/images/bt_mute_pressed.png
new file mode 100644 (file)
index 0000000..51fc6ec
Binary files /dev/null and b/data/themes/images/bt_mute_pressed.png differ
diff --git a/data/themes/images/bt_mute_released.png b/data/themes/images/bt_mute_released.png
new file mode 100644 (file)
index 0000000..50107f8
Binary files /dev/null and b/data/themes/images/bt_mute_released.png differ
diff --git a/data/themes/images/bt_speaker_pressed.png b/data/themes/images/bt_speaker_pressed.png
new file mode 100644 (file)
index 0000000..577a80a
Binary files /dev/null and b/data/themes/images/bt_speaker_pressed.png differ
diff --git a/data/themes/images/bt_speaker_released.png b/data/themes/images/bt_speaker_released.png
new file mode 100644 (file)
index 0000000..12826a6
Binary files /dev/null and b/data/themes/images/bt_speaker_released.png differ
diff --git a/data/themes/images/bt_swap_pressed.png b/data/themes/images/bt_swap_pressed.png
new file mode 100644 (file)
index 0000000..4464181
Binary files /dev/null and b/data/themes/images/bt_swap_pressed.png differ
diff --git a/data/themes/images/bt_swap_released.png b/data/themes/images/bt_swap_released.png
new file mode 100644 (file)
index 0000000..58678ec
Binary files /dev/null and b/data/themes/images/bt_swap_released.png differ
index d6288cd..1dd2e9d 100644 (file)
@@ -12,6 +12,7 @@ typedef struct _Callscreen
        Evas_Object *self;
        OFono_Call *in_use;
        Eina_List *calls;
+       OFono_Call_State last_state;
        struct {
                const char *number;
                Evas_Object *popup;
@@ -248,6 +249,40 @@ static void _call_changed(void *data, OFono_Call *c)
        elm_object_part_text_set(ctx->self, "elm.text.status", status);
        elm_object_signal_emit(ctx->self, sig, "call");
 
+       if (ctx->last_state != state) {
+               switch (state) {
+               case OFONO_CALL_STATE_DISCONNECTED:
+                       sig = "state,disconnected";
+                       break;
+               case OFONO_CALL_STATE_ACTIVE:
+                       sig = "state,active";
+                       break;
+               case OFONO_CALL_STATE_HELD:
+                       sig = "state,held";
+                       break;
+               case OFONO_CALL_STATE_DIALING:
+                       sig = "state,dialing";
+                       break;
+               case OFONO_CALL_STATE_ALERTING:
+                       sig = "state,alerting";
+                       break;
+               case OFONO_CALL_STATE_INCOMING:
+                       sig = "state,incoming";
+                       break;
+               case OFONO_CALL_STATE_WAITING:
+                       sig = "state,waiting";
+                       break;
+               default:
+                       sig = NULL;
+               }
+               if (sig)
+                       elm_object_signal_emit(ctx->self, sig, "call");
+               ctx->last_state = state;
+       }
+
+       elm_object_signal_emit(ctx->self, "disable,merge", "call");
+       elm_object_signal_emit(ctx->self, "disable,swap", "call");
+
        if (state == OFONO_CALL_STATE_DISCONNECTED)
                _call_disconnected_show(ctx, c, "local");
 }