callscreen: uniform waiting and incoming call look.
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Tue, 21 Aug 2012 16:04:16 +0000 (13:04 -0300)
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Tue, 21 Aug 2012 16:04:16 +0000 (13:04 -0300)
The designer said they should look the same and cover the whole
screen, blocking events going to the elements below it.

data/themes/includes/call.edc
dialer/callscreen.c

index 4c0f824..2962930 100644 (file)
@@ -1677,8 +1677,8 @@ group {
          clip_to: "clipper.multiparty-details-hidden";
          description {
             state: "default" 0.0;
-            color: 255 255 255 255;
-            color_class: "bg";
+            color: 255 255 255 0;
+            color_class: "caution";
             rel1 {
                relative: 0.0 1.0;
                offset: 0 -ACTION_HEIGHT;
@@ -1691,7 +1691,7 @@ group {
          description {
             state: "pressed" 0.0;
             inherit: "default" 0.0;
-            color_class: "caution";
+            color: 255 255 255 255;
          }
       }
       part {
@@ -1759,6 +1759,7 @@ group {
       part {
          name: "clipper.multiparty-details-hidden";
          type: RECT;
+         clip_to: "clipper.waiting-hidden";
          description {
             state: "default" 0.0;
             color: 255 255 255 255;
@@ -2005,33 +2006,20 @@ group {
       part {
          name: "area.waiting";
          type: RECT;
-         mouse_events: 0;
-         clip_to: "clipper.waiting-visible";
+         mouse_events: 1; /* block events going to the call screen below it */
          description {
             state: "default" 0.0;
-            color: 255 255 255 255;
-            color_class: "bg";
+            color: 0 0 0 0;
             visible: 0;
-            fixed: 1 1;
-            align: 0.5 1.0;
-            rel1 {
-               to: "separator.dark.waiting-hangup";
-               relative: 0.0 0.0;
-               offset: 0 (-ACTION_HEIGHT - SEPARATOR_HEIGHT);
-            }
-            rel2 {
-               relative: 1.0 1.0;
-               offset: -1 712;
-            }
+            rel1.relative: 0.0 1.0;
+            rel2.relative: 1.0 2.0;
          }
          description {
             state: "alternate" 0.0;
             inherit: "default" 0.0;
             visible: 1;
-            rel2 {
-               relative: 1.0 1.0;
-               offset: -1 -1;
-            }
+            rel1.relative: 0.0 0.0;
+            rel2.relative: 1.0 1.0;
          }
       }
 
@@ -2176,15 +2164,12 @@ group {
          description {
             state: "default" 0.0;
             color: 255 255 255 255;
-            color_class: "disabled";
-            rel1 {
-               to: "area.waiting";
-               offset: BORDER_PADDING SEPARATOR_HEIGHT;
-            }
+            color_class: "action";
+            align: 0.0 0.5;
+            rel1.offset: BORDER_PADDING 0;
             rel2 {
-               to: "area.waiting";
                relative: 1.0 0.0;
-               offset: (-BORDER_PADDING - 1) (ACTION_HEIGHT + SEPARATOR_HEIGHT - 1);
+               offset: (-BORDER_PADDING - 1) (ACTION_HEIGHT - 1);
             }
             text {
                text: "Someone";
@@ -2198,6 +2183,38 @@ group {
          }
       }
 
+      part {
+         name: "label.waiting";
+         type: TEXT;
+         mouse_events: 0;
+         scale: 1;
+         clip_to: "clipper.waiting-visible";
+         description {
+            state: "default" 0.0;
+            color: 255 255 255 255;
+            color_class: "light";
+            fixed: 1 1;
+            align: 0.0 0.0;
+            rel1 {
+               to: "elm.text.waiting";
+               relative: 0.0 1.0;
+               offset: 0 -20;
+            }
+            rel2 {
+               to: "elm.text.waiting";
+               relative: 0.0 1.0;
+               offset: 0 -1;
+            }
+            text {
+               text: "Waiting...";
+               font: FONT_NORMAL;
+               size: SIZE_MEDIUM;
+               min: 1 1;
+               align: 0.0 0.0;
+            }
+         }
+      }
+
       programs {
          program {
             name: "hide-waiting-phase1";
@@ -2206,7 +2223,6 @@ group {
             action: STATE_SET "default" 0.0;
             transition: ACCELERATE 0.3;
             target: "clipper.waiting-visible";
-            target: "area.waiting";
             after: "hide-waiting-phase2";
             api: "waiting_hide" "make waiting popup hidden";
          }
@@ -2214,6 +2230,13 @@ group {
             name: "hide-waiting-phase2";
             action: STATE_SET "default" 0.0;
             transition: ACCELERATE 0.3;
+            target: "area.waiting";
+            after: "hide-waiting-phase3";
+         }
+         program {
+            name: "hide-waiting-phase3";
+            action: STATE_SET "default" 0.0;
+            transition: ACCELERATE 0.3;
             target: "clipper.waiting-hidden";
          }
 
@@ -2232,6 +2255,12 @@ group {
             action: STATE_SET "alternate" 0.0;
             transition: ACCELERATE 0.3;
             target: "area.waiting";
+            after: "show-waiting-phase3";
+         }
+         program {
+            name: "show-waiting-phase3";
+            action: STATE_SET "alternate" 0.0;
+            transition: ACCELERATE 0.3;
             target: "clipper.waiting-visible";
          }
 
index 76e4c99..87842f3 100644 (file)
@@ -666,10 +666,9 @@ static void _call_changed(void *data, OFono_Call *c)
        _calls_update(ctx);
 
        if ((ctx->calls.waiting) && (!was_waiting)) {
-               char buf[256];
                contact = _call_name_get(ctx, ctx->calls.waiting);
-               snprintf(buf, sizeof(buf), "%s is waiting...", contact);
-               elm_object_part_text_set(ctx->self, "elm.text.waiting", buf);
+               elm_object_part_text_set(ctx->self, "elm.text.waiting",
+                                               contact);
                elm_object_signal_emit(ctx->self, "show,waiting", "call");
                free(contact);
        } else if ((!ctx->calls.waiting) && (was_waiting)) {