Merge "packaging: spec cleanup" into tizen
[apps/core/preloaded/settings.git] / setting-display / src / setting-display-screen-mode.c
index 97da742..eb8661b 100755 (executable)
@@ -1,22 +1,18 @@
 /*
  * setting
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
  *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
- *
- * Contact: MyoungJune Park <mj2004.park@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * Licensed under the Flora License, Version 1.1 (the License);
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *     http://floralicense.org/license/
  *
  * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
+ * distributed under the License is distributed on an AS IS BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- *
  */
 #include <setting-display-screen-mode.h>
 #include <Ecore_X.h>
@@ -42,6 +38,7 @@ setting_view setting_view_display_screen_mode = {
 static Evas_Object *__gl_content_get(void *data, Evas_Object *obj, const char *part)
 {
        if (!strcmp(part, "elm.icon")) {
+               #if 0
                Evas_Object *sub_layout = elm_layout_add(obj);
                elm_layout_file_set(sub_layout, SETTING_THEME_EDJ_NAME, "screen_mode");
                evas_object_size_hint_weight_set(sub_layout, EVAS_HINT_EXPAND, 0.0);
@@ -59,6 +56,19 @@ static Evas_Object *__gl_content_get(void *data, Evas_Object *obj, const char *p
 
                elm_object_part_content_set(sub_layout, "content", image);
                return sub_layout;
+               #endif
+               Evas_Object *image;
+               image = elm_image_add(obj);
+               elm_image_file_set(image, IMG_SCREEN_MODE, NULL);
+
+               int w = 668; /* left padding and right padding is 26, so the width = 720 - 26 -26 */
+               int h = 0;
+               elm_image_object_size_get(image, NULL, &h);
+               evas_object_size_hint_min_set(image, w * WIDGET_SCALE_FACTOR, h * WIDGET_SCALE_FACTOR);
+               evas_object_size_hint_max_set(image, w * WIDGET_SCALE_FACTOR, h * WIDGET_SCALE_FACTOR);
+               evas_object_resize(image, w * WIDGET_SCALE_FACTOR, h * WIDGET_SCALE_FACTOR);
+
+               return image;
        }
 
        return NULL;
@@ -109,7 +119,7 @@ static int setting_display_screen_mode_create(void *cb)
                                                        NULL, NULL);
        elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
 
-       ad->itc_screen_mode.item_style = "1icon";
+       ad->itc_screen_mode.item_style = "1icon/with_no_line";
        ad->itc_screen_mode.func.text_get = NULL;
        ad->itc_screen_mode.func.content_get = __gl_content_get;
        ad->itc_screen_mode.func.state_get = NULL;