}
float temp_size = 0.0;
+ /* use size (applications + picture/videos + downloads + audio + miscellaneous + available) as 100% */
+ double total_size = ad->apps_status.dTotal + ad->pics_videos_status.dTotal +
+ ad->downloads_status.dTotal + ad->audio_status.dTotal +
+ ad->others_status.dTotal + ad->internal_status.dAvail;
+
if (!safeStrCmp(part, "elm.icon")){
Evas_Object *status_box = NULL;
status_box = elm_box_add(obj);
/* apps */
unsigned int apps_size = 0;
- temp_size = ((float)ad->apps_status.dTotal / ad->internal_status.dTotal) * width;
+ temp_size = ((float)ad->apps_status.dTotal / total_size) * width;
if (temp_size < 1 && temp_size > 0) {
apps_size = 1;
} else {
/* pictures, videos */
unsigned int pics_videos_size = 0;
- temp_size = ((float)ad->pics_videos_status.dTotal / ad->internal_status.dTotal) * width;
+ temp_size = ((float)ad->pics_videos_status.dTotal / total_size) * width;
if (temp_size < 1 && temp_size > 0) {
pics_videos_size = 1;
} else {
/* downloads */
unsigned int downloads_size = 0;
- temp_size = ((float)ad->downloads_status.dTotal / ad->internal_status.dTotal) * width;
+ temp_size = ((float)ad->downloads_status.dTotal / total_size) * width;
if (temp_size < 1 && temp_size > 0) {
downloads_size = 1;
} else {
/* audio */
unsigned int audio_size = 0;
- temp_size = ((float)ad->audio_status.dTotal / ad->internal_status.dTotal) * width;
+ temp_size = ((float)ad->audio_status.dTotal / total_size) * width;
if (temp_size < 1 && temp_size > 0) {
audio_size = 1;
} else {
/* Miscellaneous files */
unsigned int others_size = 0;
- temp_size = ((float)ad->others_status.dTotal / ad->internal_status.dTotal) * width;
+ temp_size = ((float)ad->others_status.dTotal / total_size) * width;
if (temp_size < 1 && temp_size > 0) {
others_size = 1;
} else {
/* available */
unsigned int avail_size = 0;
- temp_size = ((float)ad->internal_status.dAvail / ad->internal_status.dTotal) * width;
+ temp_size = ((float)ad->internal_status.dAvail / total_size) * width;
if (temp_size < 1 && temp_size > 0) {
avail_size = 1;
} else {