Handle FHD resolution. 13/100613/2 accepted/tizen/3.0/mobile/20161205.000758 submit/tizen_3.0/20161204.183650
authorRadoslaw Czerski <r.czerski@samsung.com>
Thu, 1 Dec 2016 09:11:16 +0000 (10:11 +0100)
committerRadoslaw Czerski <r.czerski@samsung.com>
Thu, 1 Dec 2016 09:11:16 +0000 (10:11 +0100)
Change-Id: Ibdd0f710e2d8b5d48256f4b8b5fdc48cafd8cace
Signed-off-by: Radoslaw Czerski <r.czerski@samsung.com>
inc/indicator_gui.h
inc/main.h
res/resource/indicator_common.edc
res/resource/indicator_icon_animation.edc
res/resource/indicator_icon_nonfixed_theme.edc
res/resource/indicator_icon_theme.edc
res/resource/indicator_port.edc
src/main.c
src/ticker.c

index b0f79f3c149c7338abdafbd751fec6b310fa7b17..3b6770bb7382939061804aa57d5467a575a4805f 100644 (file)
@@ -18,7 +18,9 @@
 #define __INDICATOR_GUI_H__
 
 /* DISPLAY */
+#define INDICATOR_WVGA_HEIGHT 25
 #define INDICATOR_HEIGHT 40
+#define INDICATOR_FHD_HEIGHT 60
 
 #define ICON_PADDING           3
 
index 225a20a2e80cfe90f6058a4d93251a1f69a8c01f..8039b8b401d02657ddae4a72b4940b1899c9efa4 100644 (file)
@@ -355,4 +355,6 @@ int isRSSI2Showing; // For RSSI2 Icon
 int isSilentShowing;           // For Silent Icon
 int isWifiDirectShowing;       // For WiFi Direct Icon
 
+int indicator_height_get();
+
 #endif                         /* __DEF_indicator_H__ */
index 2911339737fff475d66ef2e83987d6af8227f1f0..0badb6aa12313832204bf35d54bad07bc7c6c34b 100644 (file)
@@ -20,7 +20,7 @@
                                name: partName; \
                                type: SWALLOW; \
                                mouse_events: 0; \
-                               scale: 1; \
+                               scale: 0; \
                                description { \
                                        state: "default" 0.0; \
                                        max: MaxWidth MaxHeight; \
@@ -37,7 +37,7 @@
                                name: partName; \
                                type: SWALLOW; \
                                mouse_events: 0; \
-                               scale: 1; \
+                               scale: 0; \
                                description { \
                                        state: "default" 0.0; \
                                        max: MaxWidth MaxHeight; \
@@ -53,7 +53,7 @@
                        part {\
                          name : "rect."partName; \
                          type : RECT;\
-                         scale : 1;\
+                         scale: 0;\
                          description {\
                             state : "default" 0.0;\
                             rel1.to : partName;\
@@ -64,7 +64,7 @@
                        part { \
                                name: partName; \
                                type: SWALLOW; \
-                               scale: 1; \
+                               scale: 0; \
                                description { \
                                        state: "default" 0.0; \
                                        max: MaxWidth MaxHeight; \
@@ -85,7 +85,7 @@
                        part {\
                          name : "rect."partName; \
                          type : RECT;\
-                         scale : 1;\
+                         scale: 0;\
                          description {\
                             state : "default" 0.0;\
                             rel1.to : partName;\
@@ -96,7 +96,7 @@
                        part { \
                                name: partName; \
                                type: SWALLOW; \
-                               scale: 1; \
+                               scale: 0; \
                                description { \
                                        state: "default" 0.0; \
                                        max: MaxWidth MaxHeight; \
                        part { \
                                name: partName; \
                                type: SWALLOW; \
-                               scale: 1; \
+                               scale: 0; \
                                description { \
                                        state: "default" 0.0; \
                                        max: MaxWidth MaxHeight; \
                        part { \
                                name: partName; \
                                type: SWALLOW; \
-                               scale: 1; \
+                               scale: 0; \
                                description { \
                                        state: "default" 0.0; \
                                        max: MaxWidth MaxHeight; \
                                name: rectName; \
                                type: RECT; \
                                mouse_events: 0; \
-                               scale: 1; \
+                               scale: 0; \
                                description { \
                                        state: "default" 0.0; \
                                        max: MaxWidth -1; \
                                name: rectName; \
                                type: RECT; \
                                mouse_events: 0; \
-                               scale: 1; \
+                               scale: 0; \
                                description { \
                                        state: "default" 0.0; \
-                                       max: MaxWidth -1; \
-                                       fixed: 1 0; \
+                                       max: MaxWidth MaxHeight; \
+                                       fixed: 1 1; \
                                        rel1 { relative: 1.0 0.0; to_x: rel_x; to_y: rel_y; } \
                                        rel2 { relative: 1.0 1.0; to_x: rel_x; to_y: rel_y; } \
                                        align: 0.0 0.5; \
                                name: rectName; \
                                type: RECT; \
                                mouse_events: 0; \
-                               scale: 1; \
+                               scale: 0; \
                                description { \
                                        state: "default" 0.0; \
                                        max: MaxWidth -1; \
                        part { \
                                name: partName; \
                                type: SWALLOW; \
-                               scale: 1; \
+                               scale: 0; \
                                description { \
                                        state: "default" 0.0; \
                                        rel1 { relative: 1.0 0.0; to: lPadding; } \
index cda3537b27f87e03ce7ff896118c2d9c473932c8..2c3a07e0de1f58e2c563f5e8c8ef974881700717 100644 (file)
@@ -53,7 +53,7 @@ collections {
                                name: "padding.left";
                                type: RECT;
                                mouse_events: 0;
-                               scale: 1;
+                               scale: 0;
                                description {
                                        state: "default" 0.0;
                                        min: DEFAULT_ICON_PADDING 0;
@@ -70,7 +70,7 @@ collections {
                        part {
                                name: "elm.image.icon.ani";
                                type: IMAGE;
-                               scale: 1;
+                               scale: 0;
                                description {
                                        state: "default" 0.0;
                                        rel1.to: "elm.swallow.icon";
@@ -224,7 +224,7 @@ collections {
                                name: "padding.right";
                                type: RECT;
                                mouse_events: 0;
-                               scale: 1;
+                               scale: 0;
                                description {
                                        state: "default" 0.0;
                                        min: 0 0;
index f1bd2cb99f80d84d326e73bfd851f2e9b3e5748e..7785c545aa286646170467f99101752b25a82901 100644 (file)
@@ -34,7 +34,7 @@ collections {
                                name: "padding.left";
                                type: RECT;
                                mouse_events: 0;
-                               scale: 1;
+                               scale: 0;
                                description {
                                        state: "default" 0.0;
                                        min: DEFAULT_ICON_PADDING 0;
@@ -51,7 +51,7 @@ collections {
                                name: "padding.right";
                                type: RECT;
                                mouse_events: 0;
-                               scale: 1;
+                               scale: 0;
                                description {
                                        state: "default" 0.0;
                                        min: 0 0;
@@ -68,7 +68,7 @@ collections {
                        part {
                                name: "elm.rect.icon.access";
                                type: RECT;
-                               scale: 1;
+                               scale: 0;
                                description {
                                        state: "default" 0.0;
                                        rel1.to: "elm.swallow.icon";
index 472ce5508cc8632ec1f354c8a0fa4a340fe311b4..62d94f567ff5dd04a5f1064a9c1739ee9749557c 100644 (file)
@@ -34,7 +34,7 @@ collections {
                                name: "padding.left";
                                type: RECT;
                                mouse_events: 0;
-                               scale: 1;
+                               scale: 0;
                                description {
                                        state: "default" 0.0;
                                        min: 0 0;
@@ -53,7 +53,7 @@ collections {
                                name: "padding.right";
                                type: RECT;
                                mouse_events: 0;
-                               scale: 1;
+                               scale: 0;
                                description {
                                        state: "default" 0.0;
                                        min: 0 0;
@@ -69,7 +69,7 @@ collections {
                        part {
                                name: "elm.rect.icon.access";
                                type: RECT;
-                               scale: 1;
+                               scale: 0;
                                description {
                                        state: "default" 0.0;
                                        rel1.to: "elm.swallow.icon";
@@ -101,7 +101,7 @@ collections {
                                name: "padding.left";
                                type: RECT;
                                mouse_events: 0;
-                               scale: 1;
+                               scale: 0;
                                description {
                                        state: "default" 0.0;
                                        min: 0 0;
@@ -119,7 +119,7 @@ collections {
                                name: "padding.right";
                                type: RECT;
                                mouse_events: 0;
-                               scale: 1;
+                               scale: 0;
                                description {
                                        state: "default" 0.0;
                                        min: 1 20;
@@ -135,7 +135,7 @@ collections {
                        part {
                                name: "elm.rect.icon.access";
                                type: RECT;
-                               scale: 1;
+                               scale: 0;
                                description {
                                        state: "default" 0.0;
                                        rel1.to: "elm.swallow.icon";
index 8ec57057864057b1b025f333a0f9bc9d927a4db4..02c3990aededdae26a379b8b56a66721d5d403a9 100644 (file)
@@ -68,11 +68,9 @@ collections {
                        part {
                                name: "background";
                                type: RECT;
-                               scale: 1;
+                               scale: 0;
                                description {
                                        state: "default" 0.0;
-                                       max: -1 INDICATOR_HEIGHT;
-                                       fixed: 0 1;
                                        color_class: "bg_default";
                                }
                                description {
@@ -99,7 +97,7 @@ collections {
                        part {
                                name: "padding.left";
                                type: RECT;
-                               scale: 1;
+                               scale: 0;
                                mouse_events: 0;
                                description {
                                        state: "default" 0.0;
@@ -121,7 +119,7 @@ collections {
                                name: "padding.right";
                                type: RECT;
                                mouse_events: 0;
-                               scale: 1;
+                               scale: 0;
                                description {
                                        state: "default" 0.0;
                                        min: RIGHT_PADDING_WIDTH 0;
@@ -142,7 +140,7 @@ collections {
                        part {
                                name: "elm.rect.bg.base";
                                type: RECT;
-                               scale: 1;
+                               scale: 0;
                                mouse_events: 0;
                                description {
                                        state: "default" 0.0;
@@ -172,7 +170,7 @@ collections {
                        part {
                                name: "elm.rect.bg";
                                type: RECT;
-                               scale: 1;
+                               scale: 0;
                                mouse_events: 0;
                                description {
                                        state: "default" 0.0;
@@ -212,11 +210,12 @@ collections {
                        part {
                                name: "elm.swallow.fixed8";
                                type: SWALLOW;
-                               scale: 1;
+                               scale: 0;
                                description {
                                        state: "default" 0.0;
                                        min: DEFAULT_ICON_WIDTH DEFAULT_ICON_HEIGHT;
-                                       fixed: 1 0;
+                                       max: DEFAULT_ICON_WIDTH DEFAULT_ICON_HEIGHT;
+                                       fixed: 1 1;
                                        rel1 { relative: 0.0 0.0; to_x: "padding.right"; to_y: "elm.rect.bg"; }
                                        rel2 { relative: 0.0 1.0; to_x: "padding.right"; to_y: "elm.rect.bg"; }
                                        align: 1.0 0.5;
@@ -234,7 +233,7 @@ collections {
                        part {
                                name: "percentage.digit.box";
                                type: SWALLOW;
-                               scale: 1;
+                               scale: 0;
                                description {
                                        state: "default" 0.0;
                                        min: BATTERY_DIGIT_WIDTH BATTERY_DIGIT_HEIGHT;
@@ -276,7 +275,7 @@ collections {
                        part {
                                name: "elm.image.updown1";
                                type: IMAGE;
-                               scale: 1;
+                               scale: 0;
                                mouse_events: 0;
                                description {
                                        state: "default" 0.0;
@@ -334,7 +333,7 @@ collections {
                        part {
                                name: "elm.image.updown2";
                                type: IMAGE;
-                               scale: 1;
+                               scale: 0;
                                mouse_events: 0;
                                description {
                                        state: "default" 0.0;
@@ -417,7 +416,7 @@ collections {
                        part {
                                name: elm.swallow.fixed9.access;
                                type: RECT;
-                               scale: 1;
+                               scale: 0;
                                description {
                                        state: "default" 0.0;
                                        fixed: 1 0;
@@ -437,7 +436,7 @@ collections {
                        part {
                                name: "elm.swallow.more_noti";
                                type: SWALLOW;
-                               scale: 1;
+                               scale: 0;
                                description {
                                        state: "default" 0.0;
                                        min: DEFAULT_ICON_WIDTH DEFAULT_ICON_HEIGHT;
@@ -462,7 +461,7 @@ collections {
                                name: "clock.padding.left";
                                type: RECT;
                                mouse_events: 0;
-                               scale: 1;
+                               scale: 0;
                                description {
                                        state: "default" 0.0;
                                        min: 5 0;
@@ -477,7 +476,7 @@ collections {
                        part {
                                name: "elm.text.clock";
                                type: TEXTBLOCK;
-                               scale: 1;
+                               scale: 0;
                                mouse_events: 0;
                                description {
                                        state: "default" 0.0;
@@ -516,7 +515,7 @@ collections {
                                name: "clock.padding.right";
                                type: RECT;
                                mouse_events: 0;
-                               scale: 1;
+                               scale: 0;
                                description {
                                        state: "default" 0.0;
                                        min: 2 0;
@@ -531,7 +530,7 @@ collections {
                                name: "indicator.alarm.icon";
                                type: SWALLOW;
                                mouse_events: 0;
-                               scale: 1;
+                               scale: 0;
                                description {
                                        state: "default" 0.0;
                                        min: DEFAULT_ICON_WIDTH DEFAULT_ICON_HEIGHT;
@@ -546,7 +545,7 @@ collections {
                        part {
                                name: "elm.rect.clock.access";
                                type: RECT;
-                               scale: 1;
+                               scale: 0;
                                description {
                                        state: "default" 0.0;
                                        rel1 { relative: 0.0 0.0; to_x: "elm.swallow.fixed5"; to_y: "elm.swallow.fixed5"; }
index 246cd0fe8c1063c5f9431168b6c4c2e622c548e1..36904f9476d04e5308d464b4c7a99fed1f8fa594 100644 (file)
@@ -28,6 +28,7 @@
 #include <system_settings.h>
 #include <runtime_info.h>
 #include <vconf.h>
+#include <system_info.h>
 
 #include "common.h"
 #include "box.h"
@@ -318,21 +319,41 @@ static Eina_Bool _render_force(void *data)
        return EINA_FALSE;
 }
 
+int indicator_height_get()
+{
+       int w;
+
+       int ret = system_info_get_platform_int("http://tizen.org/feature/screen.width", &w);
+       if (ret != SYSTEM_INFO_ERROR_NONE)
+               _E("system_info_get_platform_int failed[%d] %s", ret, get_error_message(ret));
+
+       if (w == 480)
+               return INDICATOR_WVGA_HEIGHT;
+       else if (w == 720)
+               return INDICATOR_HEIGHT;
+       else if (w == 1080)
+               return INDICATOR_FHD_HEIGHT;
+       else {
+               return INDICATOR_HEIGHT;
+       }
+}
+
 static void _indicator_service_cb(void *data, tzsh_indicator_service_h service,
                int angle, int opacity)
 {
        win_info *info = data;
+       int indicator_height = indicator_height_get();
 
        switch (angle) {
                case 0:
                case 180:
-                       _D("Enable indicator portrait mode: %d %d", info->port_w, INDICATOR_HEIGHT);
-                       evas_object_resize(info->win, info->port_w, INDICATOR_HEIGHT);
+                       _D("Enable indicator portrait mode: %d %d", info->port_w, indicator_height);
+                       evas_object_resize(info->win, info->port_w, indicator_height);
                        break;
                case 90:
                case 270:
-                       _D("Enable indicator landscape mode: %d %d", info->land_w, INDICATOR_HEIGHT);
-                       evas_object_resize(info->win, info->land_w, INDICATOR_HEIGHT);
+                       _D("Enable indicator landscape mode: %d %d", info->land_w, indicator_height);
+                       evas_object_resize(info->win, info->land_w, indicator_height);
                        break;
                default:
                        _E("Unahandled rotation value");
@@ -432,8 +453,8 @@ static void _create_window(struct appdata *ad)
        evas_object_size_hint_fill_set(ad->win.win , EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        evas_object_size_hint_align_set(ad->win.win , 1.0, 0.5);
 
-       evas_object_resize(ad->win.win, ad->win.port_w, INDICATOR_HEIGHT);
-       _D("w,h(%d,%d)", ad->win.port_w, INDICATOR_HEIGHT);
+       evas_object_resize(ad->win.win, ad->win.port_w, indicator_height_get());
+       _D("w,h(%d,%d)", ad->win.port_w, indicator_height_get());
 
        evas_object_show(ad->win.win);
        if (indicator_tzsh_init(&ad->win))
@@ -451,7 +472,7 @@ static void _create_base_gui(void* data)
        _create_window(ad);
 
        /* FIXME */
-       ad->win.h = INDICATOR_HEIGHT;
+       ad->win.h = indicator_height_get();
        ad->win.w = ad->win.port_w;
        ad->win.evas = evas_object_evas_get(ad->win.win);
 
index 600fe1fa6d4504c03359b03deb532e50af4bde68..21cedf6c1b8e250a61bef96d08f8fef737abbb92 100644 (file)
@@ -514,6 +514,7 @@ static Evas_Object *_ticker_layout_create(Evas_Object *win)
 static void _ticker_win_rotation_cb(void *data, Evas_Object *obj, void *event)
 {
        int angle = 0;
+       int indicator_height = indicator_height_get();
        Evas_Object *win = obj;
 
        angle = elm_win_active_win_orientation_get(win);
@@ -529,16 +530,16 @@ static void _ticker_win_rotation_cb(void *data, Evas_Object *obj, void *event)
        switch (angle) {
        case 0:
        case 180:
-               evas_object_resize(win, ticker.ad->win.port_w, INDICATOR_HEIGHT);
+               evas_object_resize(win, ticker.ad->win.port_w, indicator_height);
                evas_object_move(win, 0, 0);
                break;
        case 90:
-               evas_object_resize(win, ticker.ad->win.land_w, INDICATOR_HEIGHT);
+               evas_object_resize(win, ticker.ad->win.land_w, indicator_height);
                evas_object_move(win, 0, 0);
                break;
        case 270:
-               evas_object_resize(win, ticker.ad->win.land_w, INDICATOR_HEIGHT);
-               evas_object_move(win, ticker.ad->win.port_w - INDICATOR_HEIGHT, 0);
+               evas_object_resize(win, ticker.ad->win.land_w, indicator_height);
+               evas_object_move(win, ticker.ad->win.port_w - indicator_height, 0);
                break;
        default:
                _E("Undefined window rotation angle");
@@ -563,7 +564,7 @@ static Evas_Object *_ticker_window_create(struct appdata *ad)
        efl_util_set_window_opaque_state(win, 0);
 
        elm_win_aux_hint_add(win, "wm.policy.win.user.geometry", "1");
-       evas_object_resize(win, ad->win.w, INDICATOR_HEIGHT);
+       evas_object_resize(win, ad->win.w, indicator_height_get());
        evas_object_move(win, 0, 0);
 
        if (elm_win_wm_rotation_supported_get(win)) {