Support various resolutions in tutorial popup 66/238466/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Tue, 14 Jul 2020 00:47:49 +0000 (09:47 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 14 Jul 2020 06:57:24 +0000 (15:57 +0900)
Change-Id: Ifdfbfbddbf0e4a0bdbe5c63e3dd6f1fae55cb958

src/ise-tutorial-mode.cpp

index 85d5ac5..b5ef51b 100644 (file)
@@ -40,6 +40,8 @@
 #define BUTTON_HEIGHT 56
 #define BUTTON_PADDING_X 152
 #define BUTTON_PADDING_Y 289
+#define BASE_WIDTH 360
+#define BASE_HEIGHT 360
 
 #define DEFAULT_FORMAT_GUIDE_TITLE_TEXT "DEFAULT='font=Tizen:style=Regular font_size=%d align=center color=#ffffff text_class=tizen wrap=mixed'"
 #define DEFAULT_FORMAT_GUIDE_MAIN_TEXT "DEFAULT='font=Tizen:style=Large font_size=%d align=center color=#ffffff text_class=tizen wrap=mixed' newline='br'"
@@ -188,8 +190,8 @@ static Eina_Bool tutorial_show_layout_cb(void *data)
             button = elm_button_add(tutorial_window);
             elm_object_style_set(button, "focus");
             view_set_image(button, NULL, IMG_POPUP_BUTTON_CANCEL_NORMAL);
-            evas_object_resize(button, BUTTON_WIDTH, BUTTON_HEIGHT);
-            evas_object_move(button, BUTTON_PADDING_X, BUTTON_PADDING_Y);
+            evas_object_resize(button, BUTTON_WIDTH*SCREEN_WIDTH/BASE_WIDTH, BUTTON_HEIGHT*SCREEN_HEIGHT/BASE_HEIGHT);
+            evas_object_move(button, BUTTON_PADDING_X*SCREEN_WIDTH/BASE_WIDTH, BUTTON_PADDING_Y*SCREEN_HEIGHT/BASE_HEIGHT);
             evas_object_layer_set(button, EVAS_LAYER_MAX);
             evas_object_show(button);