this->bg.obj = elm_bg_add(elm_win);
evas_object_size_hint_weight_set(this->bg.obj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(elm_win, this->bg.obj);
-
- switch (color)
- {
- case E_TC_WIN_COLOR_BLACK: elm_bg_color_set(this->bg.obj, 0, 0, 0); break;
- case E_TC_WIN_COLOR_WHITE: elm_bg_color_set(this->bg.obj, 255, 255, 255); break;
- case E_TC_WIN_COLOR_RED: elm_bg_color_set(this->bg.obj, 255, 0, 0); break;
- case E_TC_WIN_COLOR_GREEN: elm_bg_color_set(this->bg.obj, 0, 255, 0); break;
- case E_TC_WIN_COLOR_BLUE: elm_bg_color_set(this->bg.obj, 0, 0, 255); break;
- case E_TC_WIN_COLOR_YELLOW: elm_bg_color_set(this->bg.obj, 255, 255, 0); break;
- case E_TC_WIN_COLOR_CYAN: elm_bg_color_set(this->bg.obj, 0, 255, 255); break;
- case E_TC_WIN_COLOR_PURPLE: elm_bg_color_set(this->bg.obj, 255, 0, 255); break;
- case E_TC_WIN_COLOR_ORANGE: elm_bg_color_set(this->bg.obj, 255, 165, 0); break;
- case E_TC_WIN_COLOR_INDIGO: elm_bg_color_set(this->bg.obj, 75, 0, 130); break;
- case E_TC_WIN_COLOR_KHAKI: elm_bg_color_set(this->bg.obj, 240, 230, 140); break;
- case E_TC_WIN_COLOR_GRAY: elm_bg_color_set(this->bg.obj, 128, 128, 128); break;
- default: elm_bg_color_set(this->bg.obj, 100, 100, 100); break;
- }
- evas_object_show(this->bg.obj);
+ this->setColor(color);
elm_win_screen_size_get(elm_win, NULL, NULL, &screen_width, &screen_height);
b = (b + 10) % 255;
if (!b) b = 10;
}
- elm_bg_color_set(tw->bg.obj, r, g, b);
- evas_object_show(tw->bg.obj);
+ tw->setColor(r, g, b);
return EINA_TRUE;
}