From: Eugene Kurzberg Date: Fri, 30 Dec 2016 07:42:11 +0000 (+0200) Subject: Change color of "Select All" text according to GUI. X-Git-Tag: submit/tizen_3.0/20170110.135457^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bd3749aa61d79c5e354bbbed27e943906849a6a3;p=profile%2Fmobile%2Fapps%2Fnative%2Fphone-contacts.git Change color of "Select All" text according to GUI. Change-Id: Id7b3d0d91a6c331b9b7af551eefba8289574f971 Signed-off-by: Eugene Kurzberg --- diff --git a/lib-apps-common/inc/Ux/SelectAllItem.h b/lib-apps-common/inc/Ux/SelectAllItem.h index 4520ae2..91ca06f 100644 --- a/lib-apps-common/inc/Ux/SelectAllItem.h +++ b/lib-apps-common/inc/Ux/SelectAllItem.h @@ -35,6 +35,11 @@ namespace Ux protected: /** + * @see GenItem::getItemClass() + */ + virtual Elm_Gen_Item_Class *getItemClass() const override; + + /** * @see GenItem::getText() */ virtual char *getText(Evas_Object *parent, const char *part) override; @@ -44,6 +49,11 @@ namespace Ux */ virtual Evas_Object *getContent(Evas_Object *parent, const char *part) override; + /** + * @see GenItem::onInserted() + */ + virtual void onInserted() override; + private: std::string m_Text; }; diff --git a/lib-apps-common/src/Ux/SelectAllItem.cpp b/lib-apps-common/src/Ux/SelectAllItem.cpp index 441b833..dac3a3a 100644 --- a/lib-apps-common/src/Ux/SelectAllItem.cpp +++ b/lib-apps-common/src/Ux/SelectAllItem.cpp @@ -17,6 +17,8 @@ #include "Ux/SelectAllItem.h" #include +#define TEXT_COLOR 61, 185, 204, 255 + using namespace Ux; SelectAllItem::SelectAllItem(const char *text) @@ -26,6 +28,12 @@ SelectAllItem::SelectAllItem(const char *text) } } +Elm_Gen_Item_Class *SelectAllItem::getItemClass() const +{ + static Elm_Gen_Item_Class itc = createItemClass("end_icon"); + return &itc; +} + char *SelectAllItem::getText(Evas_Object *parent, const char *part) { if (strcmp(part, "elm.text") == 0) { @@ -43,3 +51,9 @@ Evas_Object *SelectAllItem::getContent(Evas_Object *parent, const char *part) return nullptr; } + +void SelectAllItem::onInserted() +{ + elm_object_item_color_class_color_set(getObjectItem(), "text", TEXT_COLOR); + elm_object_item_color_class_color_set(getObjectItem(), "text_pressed", TEXT_COLOR); +}