Fixed "Notifications on lock screen" items visibility issue 40/174640/3
authorKartik Tidke <kr.tidke@samsung.com>
Tue, 3 Apr 2018 09:19:10 +0000 (14:49 +0530)
committerKartik Tidke <kr.tidke@samsung.com>
Mon, 9 Apr 2018 09:37:37 +0000 (15:07 +0530)
Change-Id: Idffa8822c5f40d79251c83191539b20778f7f960
Signed-off-by: Kartik Tidke <kr.tidke@samsung.com>
src/app-details.c

index 6a2623a..c64c822 100644 (file)
@@ -48,6 +48,33 @@ static void close_app_details_cb(void *data, Evas_Object *obj, void *event_info)
        elm_naviframe_item_pop(data);
 }
 
+static Evas_Object *widget_min_set(Evas_Object *obj,
+       Evas_Object *parent, Evas_Coord w, Evas_Coord h)
+{
+       Evas_Object *table, *rect;
+
+       table = elm_table_add(parent);
+
+       rect = evas_object_rectangle_add(evas_object_evas_get(table));
+       evas_object_size_hint_min_set(rect, w, h);
+       evas_object_color_set(rect, 0, 0, 0, 0);
+       evas_object_size_hint_align_set(rect, EVAS_HINT_FILL,
+               EVAS_HINT_FILL);
+       evas_object_size_hint_weight_set(rect, EVAS_HINT_EXPAND,
+               EVAS_HINT_EXPAND);
+       elm_table_pack(table, rect, 0, 0, 1, 1);
+       evas_object_size_hint_align_set(obj, EVAS_HINT_FILL,
+               EVAS_HINT_FILL);
+       evas_object_size_hint_weight_set(obj, EVAS_HINT_EXPAND,
+               EVAS_HINT_EXPAND);
+
+       elm_table_pack(table, obj, 0, 0, 1, 1);
+       evas_object_show(rect);
+       evas_object_show(obj);
+
+       return table;
+}
+
 static Eina_Bool allow_noti_status_get()
 {
        return get_allow_to_nofity(g_app_info->package_id);
@@ -373,6 +400,7 @@ static void show_noti_on_lock_popup()
        static Elm_Genlist_Item_Class itc;
        Evas_Object *popup = NULL;
        Evas_Object *genlist = NULL;
+       Evas_Object *table = NULL;
        ug_data *ug_main = get_app_ui_data();
        ret_if(ug_main == NULL);
 
@@ -390,7 +418,6 @@ static void show_noti_on_lock_popup()
        /* genlist */
        genlist = elm_genlist_add(popup);
        elm_scroller_content_min_limit(genlist, EINA_FALSE, EINA_TRUE);
-       elm_object_content_set(popup, genlist);
 
        Evas_Object *radio = elm_radio_add(genlist);
        evas_object_data_set(genlist, "radio", radio);
@@ -411,6 +438,9 @@ static void show_noti_on_lock_popup()
        elm_genlist_mode_set(genlist, ELM_LIST_EXPAND);
        evas_object_show(genlist);
 
+       table = widget_min_set(genlist, popup, ELM_SCALE_SIZE(1), ELM_SCALE_SIZE(1));
+       elm_object_content_set(popup, table);
+
        int index = noti_on_lock_screen_status_get();
        elm_radio_value_set(radio, index);