Enlightenment CVS committal Author : moom Project : e17 Module : libs/etk
Dir : e17/libs/etk/src/lib Modified Files: etk_entry.c etk_entry.h etk_widget.c Log Message: * Various fixes and cleanup =================================================================== RCS file: /cvs/e/e17/libs/etk/src/lib/etk_entry.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -3 -r1.27 -r1.28 --- etk_entry.c 2 Feb 2007 18:22:28 -0000 1.27 +++ etk_entry.c 19 Feb 2007 01:05:27 -0000 1.28 @@ -353,7 +353,6 @@ entry->secondary_image_highlight = ETK_FALSE; entry->pointer_set = ETK_FALSE; entry->text = NULL; - entry->inner_part_margin = 2; widget->size_allocate = _etk_entry_size_allocate; @@ -452,8 +451,8 @@ i_geometry.y += (geometry.h - i_geometry.h)/2; etk_widget_size_allocate(ETK_WIDGET(image), i_geometry); - x += i_geometry.w + entry->inner_part_margin; - w -= i_geometry.w + entry->inner_part_margin; + x += i_geometry.w + entry->image_interspace; + w -= i_geometry.w + entry->image_interspace; } if (entry->secondary_image) { @@ -469,7 +468,7 @@ i_geometry.y += (geometry.h - i_geometry.h)/2; etk_widget_size_allocate(ETK_WIDGET(image), i_geometry); - w -= i_geometry.w + entry->inner_part_margin; + w -= i_geometry.w + entry->image_interspace; } evas_object_move(entry->editable_object, x, geometry.y); @@ -517,19 +516,23 @@ evas_object_event_callback_add(entry->editable_object, EVAS_CALLBACK_MOUSE_MOVE, _etk_entry_editable_mouse_move_cb, entry); - if (etk_widget_theme_data_get(ETK_WIDGET(entry), "highlight_image_color", "%d %d %d %d", - &entry->highlight_image_color.r, &entry->highlight_image_color.g, - &entry->highlight_image_color.b, &entry->highlight_image_color.a) != 4) - { - entry->highlight_image_color.r = 128; - entry->highlight_image_color.g = 128; - entry->highlight_image_color.b = 128; - entry->highlight_image_color.a = 255; + if (etk_widget_theme_data_get(ETK_WIDGET(entry), "icon_highlight_color", "%d %d %d %d", + &entry->highlight_color.r, &entry->highlight_color.g, + &entry->highlight_color.b, &entry->highlight_color.a) != 4) + { + entry->highlight_color.r = 128; + entry->highlight_color.g = 128; + entry->highlight_color.b = 128; + entry->highlight_color.a = 255; + } + else + { + evas_color_argb_premul(entry->highlight_color.a, &entry->highlight_color.r, + &entry->highlight_color.g, &entry->highlight_color.b); } - if (etk_widget_theme_data_get(ETK_WIDGET(entry), "inner_part_margin", "%d", - &entry->inner_part_margin) != 1) - entry->inner_part_margin = 2; + if (etk_widget_theme_data_get(ETK_WIDGET(entry), "icon_interspace", "%d", &entry->image_interspace) != 1) + entry->image_interspace = 5; } @@ -800,8 +803,8 @@ return; evas_object_color_set(etk_image_evas_object_get(image), - entry->highlight_image_color.r, entry->highlight_image_color.g, - entry->highlight_image_color.b, entry->highlight_image_color.a); + entry->highlight_color.r, entry->highlight_color.g, + entry->highlight_color.b, entry->highlight_color.a); } /* Called when the mouse moves out of the image */ @@ -844,8 +847,8 @@ return; evas_object_color_set(etk_image_evas_object_get(image), - entry->highlight_image_color.r, entry->highlight_image_color.g, - entry->highlight_image_color.b, entry->highlight_image_color.a); + entry->highlight_color.r, entry->highlight_color.g, + entry->highlight_color.b, entry->highlight_color.a); } /* Called when the clear button is pressed */ =================================================================== RCS file: /cvs/e/e17/libs/etk/src/lib/etk_entry.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- etk_entry.h 27 Jan 2007 05:14:32 -0000 1.11 +++ etk_entry.h 19 Feb 2007 01:05:27 -0000 1.12 @@ -40,15 +40,16 @@ Etk_Image *secondary_image; Evas_Object *editable_object; - Etk_Bool password_mode; - Etk_Bool selection_dragging; - Etk_Bool pointer_set; - Etk_Bool primary_image_highlight; - Etk_Bool secondary_image_highlight; - Etk_Color highlight_image_color; + Etk_Bool password_mode; + Etk_Bool selection_dragging; + Etk_Bool pointer_set; + + Etk_Bool primary_image_highlight; + Etk_Bool secondary_image_highlight; + Etk_Color highlight_color; + int image_interspace; char *text; - int inner_part_margin; }; =================================================================== RCS file: /cvs/e/e17/libs/etk/src/lib/etk_widget.c,v retrieving revision 1.96 retrieving revision 1.97 diff -u -3 -r1.96 -r1.97 --- etk_widget.c 18 Feb 2007 16:53:24 -0000 1.96 +++ etk_widget.c 19 Feb 2007 01:05:27 -0000 1.97 @@ -1231,10 +1231,12 @@ Etk_Widget *tc; Evas_List *l; - if (!widget || !widget->theme_object) + if (!widget) return; - edje_object_signal_emit(widget->theme_object, signal_name, "etk"); + if (widget->theme_object) + edje_object_signal_emit(widget->theme_object, signal_name, "etk"); + for (l = widget->theme_children; l; l = l->next) { tc = ETK_WIDGET(l->data); ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs