Changed cursor color in Phone Keypad. 88/93988/2
authorEugene Kurzberg <i.kurtsberg@samsung.com>
Wed, 26 Oct 2016 11:56:23 +0000 (14:56 +0300)
committerEugene Kurzberg <i.kurtsberg@samsung.com>
Thu, 27 Oct 2016 12:07:49 +0000 (05:07 -0700)
Change-Id: Ib781abbbcd40997be99382fc4e21bb70bd6e2bc5
Signed-off-by: Eugene Kurzberg <i.kurtsberg@samsung.com>
lib-phone/inc/Phone/Dialer/KeypadEntry.h
lib-phone/src/Phone/Dialer/KeypadEntry.cpp

index 25c0535..9ae2625 100644 (file)
@@ -70,6 +70,8 @@ namespace Phone
 
                private:
                        virtual Evas_Object *onCreate(Evas_Object *parent) 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);
 
                        ChangedCallback m_OnChanged;
index 63a53a3..a349272 100644 (file)
@@ -79,11 +79,25 @@ Evas_Object *KeypadEntry::onCreate(Evas_Object *parent)
        elm_entry_text_style_user_push(entry, "DEFAULT='font=Tizen:style=Light font_size=76 color=#fff align=center'");
 
        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;
 }
 
+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)
 {
        if (m_OnChanged) {