summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-10-16 18:04:42 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-10-16 18:04:42 +0900
commitd0c2fe3ea8b91e4b3eadbd8ff37516fb39f57af5 (patch)
tree6dd2cdc7bacadcefad849b19ae778491f082ca4c
parent9bb1c1531b6fe1f774d70c5df7786e210ac1a0a0 (diff)
evlog - make tooltips have time span
-rw-r--r--evlog.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/evlog.c b/evlog.c
index 4bc5244..5849a53 100644
--- a/evlog.c
+++ b/evlog.c
@@ -752,6 +752,7 @@ _add_log_state_object(Evas_Object *win, Evas_Object *grid, Event *ev)
752 Evas_Object *o, *oe; 752 Evas_Object *o, *oe;
753 int col[4] = {255, 255, 255, 255}, i; 753 int col[4] = {255, 255, 255, 255}, i;
754 char *s; 754 char *s;
755 char buf[512];
755 756
756 o = elm_layout_add(win); 757 o = elm_layout_add(win);
757 oe = elm_layout_edje_get(o); 758 oe = elm_layout_edje_get(o);
@@ -768,7 +769,8 @@ _add_log_state_object(Evas_Object *win, Evas_Object *grid, Event *ev)
768 255, 255, 255, 255); 769 255, 255, 255, 255);
769 edje_object_part_text_set(oe, "text", ev->event); 770 edje_object_part_text_set(oe, "text", ev->event);
770 elm_grid_pack(grid, o, ev->t0 * RES, ev->n, (ev->t1 - ev->t0) * RES, 1); 771 elm_grid_pack(grid, o, ev->t0 * RES, ev->n, (ev->t1 - ev->t0) * RES, 1);
771 elm_object_tooltip_text_set(o, ev->event); 772 snprintf(buf, sizeof(buf), "%s - %1.9fms ~ %1.9fms", ev->event, ev->t0 * 1000.0, (ev->t1 - ev->t0) * 1000.0);
773 elm_object_tooltip_text_set(o, buf);
772 evas_object_show(o); 774 evas_object_show(o);
773 return o; 775 return o;
774} 776}
@@ -779,6 +781,7 @@ _add_log_event_object(Evas_Object *win, Evas_Object *grid, Event *ev)
779 Evas_Object *o, *oe; 781 Evas_Object *o, *oe;
780 int col[4] = {255, 255, 255, 255}, i; 782 int col[4] = {255, 255, 255, 255}, i;
781 char *s; 783 char *s;
784 char buf[512];
782 785
783 o = elm_layout_add(win); 786 o = elm_layout_add(win);
784 oe = elm_layout_edje_get(o); 787 oe = elm_layout_edje_get(o);
@@ -795,7 +798,8 @@ _add_log_event_object(Evas_Object *win, Evas_Object *grid, Event *ev)
795 255, 255, 255, 255); 798 255, 255, 255, 255);
796 edje_object_part_text_set(oe, "text", ev->event); 799 edje_object_part_text_set(oe, "text", ev->event);
797 elm_grid_pack(grid, o, ev->t0 * RES, ev->n, (ev->t1 - ev->t0) * RES, 1); 800 elm_grid_pack(grid, o, ev->t0 * RES, ev->n, (ev->t1 - ev->t0) * RES, 1);
798 elm_object_tooltip_text_set(o, ev->event); 801 snprintf(buf, sizeof(buf), "%s - %1.9fms ~ %1.9fms", ev->event, ev->t0 * 1000.0, (ev->t1 - ev->t0) * 1000.0);
802 elm_object_tooltip_text_set(o, buf);
799 evas_object_show(o); 803 evas_object_show(o);
800 return o; 804 return o;
801} 805}
@@ -804,12 +808,14 @@ static Evas_Object *
804_add_log_frame_object(Evas_Object *win, Evas_Object *grid, Event *ev) 808_add_log_frame_object(Evas_Object *win, Evas_Object *grid, Event *ev)
805{ 809{
806 Evas_Object *o, *oe; 810 Evas_Object *o, *oe;
811 char buf[512];
807 812
808 o = elm_layout_add(win); 813 o = elm_layout_add(win);
809 oe = elm_layout_edje_get(o); 814 oe = elm_layout_edje_get(o);
810 elm_layout_file_set(o, "./evlog.edj", "frame"); 815 elm_layout_file_set(o, "./evlog.edj", "frame");
811 elm_grid_pack(grid, o, ev->t0 * RES, ev->n, (ev->t1 - ev->t0) * RES, 1); 816 elm_grid_pack(grid, o, ev->t0 * RES, ev->n, (ev->t1 - ev->t0) * RES, 1);
812 elm_object_tooltip_text_set(o, ev->event); 817 snprintf(buf, sizeof(buf), "%s - %1.9fms", ev->event, ev->t0 * 1000.0);
818 elm_object_tooltip_text_set(o, buf);
813 evas_object_show(o); 819 evas_object_show(o);
814 return o; 820 return o;
815} 821}