Change cursor color in Dialer using elm_object_color_class_color_set 60/103560/2
authorNataliia Sydorchuk <n.sydorchuk@samsung.com>
Thu, 8 Dec 2016 16:16:17 +0000 (18:16 +0200)
committerNataliia Sydorchuk <n.sydorchuk@samsung.com>
Thu, 8 Dec 2016 16:16:17 +0000 (18:16 +0200)
Change-Id: I5d443e3ad130daf7cae795d762421a89843f257a
Signed-off-by: Nataliia Sydorchuk <n.sydorchuk@samsung.com>
lib-phone/inc/Phone/Dialer/KeypadEntry.h
lib-phone/src/Phone/Dialer/KeypadEntry.cpp

index 4a354df..28fe80e 100644 (file)
@@ -73,8 +73,6 @@ namespace Phone
                        virtual Evas_Object *onCreate(Evas_Object *parent) override;
                        virtual void onCreated() override;
 
-                       static void onFocused(void *data, Evas_Object *obj, void *event_info);
-                       static void onUnfocused(void *data, Evas_Object *obj, void *event_info);
                        void onChanged(Evas_Object *obj, void *event_info);
 
                        int calcFontSize();
index 8cce246..6f6ad7f 100644 (file)
@@ -81,15 +81,12 @@ Evas_Object *KeypadEntry::onCreate(Evas_Object *parent)
        elm_entry_single_line_set(entry, EINA_TRUE);
        elm_entry_scrollable_set(entry, EINA_TRUE);
        elm_entry_input_panel_enabled_set(entry, EINA_FALSE);
+       elm_object_color_class_color_set(entry, "cursor", 250, 250, 250, 255);
 
        static Elm_Entry_Filter_Accept_Set filter = { "+*#;,1234567890", NULL };
        elm_entry_markup_filter_append(entry, elm_entry_filter_accept_set, &filter);
 
        eext_entry_selection_back_event_allow_set(entry, EINA_TRUE);
-       evas_object_smart_callback_add(entry, "focused",
-                       &KeypadEntry::onFocused, this);
-       evas_object_smart_callback_add(entry, "unfocused",
-                       &KeypadEntry::onUnfocused, this);
        evas_object_smart_callback_add(entry, "changed",
                        makeCallback(&KeypadEntry::onChanged), this);
        return entry;
@@ -100,16 +97,6 @@ void KeypadEntry::onCreated()
        updateFontSize();
 }
 
-void KeypadEntry::onFocused(void *data, Evas_Object *obj, void *event_info)
-{
-       edje_color_class_set("entry/default/cursor", 250, 250, 250, 255, 0, 0, 0, 0, 0, 0, 0, 0);
-}
-
-void KeypadEntry::onUnfocused(void *data, Evas_Object *obj, void *event_info)
-{
-       edje_color_class_set("entry/default/cursor", 0, 184, 230, 110, 0, 0, 0, 0, 0, 0, 0, 0);
-}
-
 void KeypadEntry::onChanged(Evas_Object *obj, void *event_info)
 {
        const char *text = elm_entry_entry_get(getEvasObject());