Apps/Folder Noti Badges, Icon_name font size, distance between icon and icon_name... 79/211679/1
authorJagrat Patidar <j1.patidar@samsung.com>
Thu, 8 Aug 2019 13:03:52 +0000 (18:33 +0530)
committerJagrat Patidar <j1.patidar@samsung.com>
Thu, 8 Aug 2019 13:03:52 +0000 (18:33 +0530)
This patch enables following features for Common profile:
1) Apps/Folder Noti Badges (Page 12)
2) Distance between icon and icon_name in folder popup (Page 17)

Change-Id: If0f402156bb5901e32f039fe9c5dfdb8fff13ed5
Signed-off-by: Jagrat Patidar <j1.patidar@samsung.com>
inc/conf.h
inc/edc_conf.h
res/edje/app_icon.edc
res/images/icon_badge_container2.png [new file with mode: 0644]
src/apps_view.c

index 4c76b73..fffaef8 100755 (executable)
@@ -87,7 +87,7 @@ extern int __conf_get_cluster_all_page_w();
 #define APPS_VIEW_ICON_CONTENT_VERTICAL_DISTANCE 192
 
 #define APPS_VIEW_ICON_TEXT_SIZE_NORMAL 20
-#define APPS_VIEW_ICON_TEXT_SIZE_EDIT 20
+#define APPS_VIEW_ICON_TEXT_SIZE_EDIT 19
 #define APPS_VIEW_ICON_TEXT_COLOR_WHITE "FFFAFAFA"
 #define APPS_VIEW_ICON_TEXT_COLOR_BLACK "000000"
 
index 0c9f2fe..2bb4b48 100755 (executable)
 #define SIGNAL_EXTERNAL_ICON_DISABLE "external_icon_disable"
 #define SIGNAL_EXTERNAL_ICON_ENABLE "external_icon_enable"
 #define SIGNAL_BADGE_SHOW "badge_show"
+#define SIGNAL_BADGE_SHOW_LARGE "badge_show_large"
 #define SIGNAL_BADGE_HIDE "badge_hide"
 #define SIGNAL_ICON_NAME_SHOW "icon_name_show"
 #define SIGNAL_ICON_NAME_HIDE "icon_name_hide"
index 9bdfde7..7a4ebe1 100755 (executable)
@@ -26,16 +26,17 @@ images {
        image: "core_check_bg_stroke.png" COMP;
        image: "core_check_icon.png" COMP;
        image: "folder_appicon_bg.png" COMP;
+       image: "icon_badge_container2.png" COMP;
 }
 
 styles {
        style{
                name: "icon_label";
-               base: "font=Tizen:style=Regular align=center color=#FFFAFAFA style=shadow, font_size=19 ellipsis=1.0 wrap=mixed";
+               base: "font=Tizen:style=Regular align=center color=#FFFAFAFA style=shadow, font_size=20 ellipsis=1.0 wrap=mixed";
        }
        style{
                name: "icon_label_edit";
-               base: "font=Tizen:style=Regular align=center color=#FFFAFAFA style=shadow, font_size=17 ellipsis=1.0 wrap=mixed";
+               base: "font=Tizen:style=Regular align=center color=#FFFAFAFA style=shadow, font_size=19 ellipsis=1.0 wrap=mixed";
        }
 }
 collections {
@@ -161,8 +162,8 @@ collections {
                                repeat_events: 1;
                                description {
                                        state: "default" 0.0;
-                                       rel1{relative: 0 103/152; to: SIZE_SETTER;}
-                                       rel2{relative: 1 1.02; to: SIZE_SETTER;}
+                                       rel1{relative: -30/84 97/84; to: APPS_ICON_CONTENT;}
+                                       rel2{relative: 114/84 148/84; to: APPS_ICON_CONTENT;}
                                        color: 255 255 255 255;
                                        text {
                                                        style: "icon_label";
@@ -188,8 +189,8 @@ collections {
                                description
                                {
                                        state: "default" 0.0;
-                                       rel1{relative: 0.0 0.0; offset: -10 -1; to: APPS_ICON_BADGE_TEXT;}
-                                       rel2{relative: 1.0 1.0; offset: 13 1; to: APPS_ICON_BADGE_TEXT;}
+                                       rel1{relative: 50/84 -3/84; to: APPS_ICON_CONTENT;}
+                                       rel2{relative: 90/84 37/84; to: APPS_ICON_CONTENT;}
                                        visible: 0;
                                        min : 40 40;
                                        max : 40 40;
@@ -204,6 +205,20 @@ collections {
                                        inherit: "default" 0.0;
                                        visible: 1;
                                }
+                               description
+                               {
+                                       state: "show2" 0.0;
+                                       rel1{relative: 8/84 -3/84; to: APPS_ICON_CONTENT;}
+                                       rel2{relative: 90/84 37/84; to: APPS_ICON_CONTENT;}
+                                       min : 82 40;
+                                       max : 82 40;
+                                       fixed : 1 1;
+                                       image
+                                       {
+                                               normal: "icon_badge_container2.png";
+                                       }
+                                       visible: 1;
+                               }
                        }
                        part
                        {
@@ -216,9 +231,9 @@ collections {
                                        visible: 0;
                                        fixed: 1 1;
                                        color: 255 255 255 255;
-                                       rel1{relative: 0.97 -0.017; to: APPS_ICON_CONTENT;}
-                                       rel2{relative: 0.95 0.0; to: APPS_ICON_CONTENT;}
-                                       align: 1.0 0.0;
+                                       rel1{relative: 64/84 7/84; to: APPS_ICON_CONTENT;}
+                                       rel2{relative: 76/84 24/84; to: APPS_ICON_CONTENT;}
+                                       align: 0.5 0.5;
                                        text
                                        {
                                                font: "arial";
@@ -234,6 +249,14 @@ collections {
                                        inherit: "default" 0.0;
                                        visible: 1;
                                }
+                               description
+                               {
+                                       state: "show2" 0.0;
+                                       inherit: "default" 0.0;
+                                       rel1{relative: 23/84 7/84; to: APPS_ICON_CONTENT;}
+                                       rel2{relative: 75/84 25/84; to: APPS_ICON_CONTENT;}
+                                       visible: 1;
+                               }
                        }
                        part { //APPS_ICON_UNINSTALL_BUTTON
                                name: APPS_ICON_UNINSTALL_BUTTON;
@@ -525,6 +548,14 @@ collections {
                                target: APPS_ICON_BADGE_TEXT;
                        }
                        program {
+                               name: "icon_badge_show_large";
+                               signal: SIGNAL_BADGE_SHOW_LARGE;
+                               source: SIGNAL_SOURCE;
+                               action: STATE_SET "show2" 0.0;
+                               target: "icon_badge";
+                               target: APPS_ICON_BADGE_TEXT;
+                       }
+                       program {
                                name: "icon_badge_hide";
                                signal: SIGNAL_BADGE_HIDE;
                                source: SIGNAL_SOURCE;
diff --git a/res/images/icon_badge_container2.png b/res/images/icon_badge_container2.png
new file mode 100644 (file)
index 0000000..9e33bea
Binary files /dev/null and b/res/images/icon_badge_container2.png differ
index 9006b9f..c6a1f55 100755 (executable)
@@ -1536,7 +1536,11 @@ static void __apps_view_badge_update_icon(app_data_t *item)
                        elm_object_signal_emit(item->app_layout, SIGNAL_BADGE_HIDE, SIGNAL_SOURCE);
                } else {
                        elm_layout_text_set(item->app_layout, APPS_ICON_BADGE_TEXT, number_str);
+                       if(item->badge_count<=99){
                        elm_object_signal_emit(item->app_layout, SIGNAL_BADGE_SHOW, SIGNAL_SOURCE);
+                       }else{
+                       elm_object_signal_emit(item->app_layout, SIGNAL_BADGE_SHOW_LARGE, SIGNAL_SOURCE);
+                       }
                }
        }
 
@@ -1573,7 +1577,11 @@ static void __apps_view_badge_update_folder(int parent_db_id)
                        elm_object_signal_emit(folder_item->app_layout, SIGNAL_BADGE_HIDE, SIGNAL_SOURCE);
                } else {
                        elm_layout_text_set(folder_item->app_layout, APPS_ICON_BADGE_TEXT, number_str);
+                       if(badge_count<=99){
                        elm_object_signal_emit(folder_item->app_layout, SIGNAL_BADGE_SHOW, SIGNAL_SOURCE);
+                       }else{
+                       elm_object_signal_emit(folder_item->app_layout, SIGNAL_BADGE_SHOW_LARGE, SIGNAL_SOURCE);
+                       }
                }
        }