Changes to wifi scan list popup 76/138776/1
authorAbhishek Sansanwal <abhishek.s94@samsung.com>
Thu, 13 Jul 2017 14:03:35 +0000 (19:33 +0530)
committerAbhishek Sansanwal <abhishek.s94@samsung.com>
Thu, 13 Jul 2017 14:06:37 +0000 (19:36 +0530)
Description: Change the wifi scan list popup style
to remove margins and set the height and width to
the proper values.

Signed-off-by: Abhishek Sansanwal <abhishek.s94@samsung.com>
Change-Id: Id6f83db96006db7fc548d766aad25b5000577707

res/images/4.0/bg_popup.#.png [new file with mode: 0755]
res/images/4.0/img_popup_bar_line.png [new file with mode: 0755]
res/images/4.0/img_popup_bar_shadow.png [new file with mode: 0755]
res/layout/network.edc
res/widget/gengrid_network.edc
res/widget/popup.edc
src/view/network/view_wireless_list.c

diff --git a/res/images/4.0/bg_popup.#.png b/res/images/4.0/bg_popup.#.png
new file mode 100755 (executable)
index 0000000..cdfbb23
Binary files /dev/null and b/res/images/4.0/bg_popup.#.png differ
diff --git a/res/images/4.0/img_popup_bar_line.png b/res/images/4.0/img_popup_bar_line.png
new file mode 100755 (executable)
index 0000000..341c85e
Binary files /dev/null and b/res/images/4.0/img_popup_bar_line.png differ
diff --git a/res/images/4.0/img_popup_bar_shadow.png b/res/images/4.0/img_popup_bar_shadow.png
new file mode 100755 (executable)
index 0000000..a0b440d
Binary files /dev/null and b/res/images/4.0/img_popup_bar_shadow.png differ
index 08a0546..1baa378 100644 (file)
@@ -250,8 +250,8 @@ group {
                        scale, 1;
                        description {
                                state, "default" 0.0;
-                               min, 860 796;
-                               max, 860 796;
+                               min, 860 792;
+                               max, 860 792;
                                visible, 0;
                        }
                }
@@ -262,10 +262,9 @@ group {
                        scale, 1;
                        description {
                                state, "default" 0.0;
-                               rel1 {
-                                       to, "area";
-                                       relative, 0.0 0.0;
-                               }
+                               rel1.to: "area";
+                               rel2.to: "area";
+                               align, 0.5 0.0;
                        }
                }
 
index 9a79837..a4db7bb 100644 (file)
@@ -135,6 +135,8 @@ group {
                        type, RECT;
                        scale, 1;
                        description {
+                               min, 670 116;
+                               max, 670 116;
                                state, "default" 0.0;
                                perspective {
                                        zplane, 0;
@@ -156,6 +158,8 @@ group {
                        description {
                                state, "default" 0.0;
                                color, 0 0 0 0;
+                               min, 670 116;
+                               max, 670 116;
                                rel1 {
                                        to: "map";
                                }
index dd92811..e133ade 100644 (file)
 #define POPUP_TOAST_TEXT_MAX_WIDTH_INC 1800-POPUP_TOAST_PADDING_INC*2
 #define POPUP_TOAST_TEXT_MAX_HEIGHT_INC 300-POPUP_TOAST_PADDING_INC*2
 
-// NOTIFY
+/* scanlist style */
+
+#define SCANLIST_DEFAULT_WIDTH_MIN_INC 860
+//#define SCANLIST_DEFAULT_WIDTH_MAX_INC 1100
+#define SCANLIST_DEFAULT_WIDTH_MAX_INC 860
+#define SCANLIST_DEFAULT_HEIGHT_MIN_INC 318
+#define SCANLIST_DEFAULT_BASE_PADDING_LR_INC 0
+#define SCANLIST_DEFAULT_BASE_PADDING_TOP_INC 65
+//#define SCANLIST_DEFAULT_BASE_PADDING_BOTTOM_INC 70
+#define SCANLIST_DEFAULT_BASE_PADDING_BOTTOM_INC 0
+#define SCANLIST_DEFAULT_TITLE_PADDING_TOP 7
+#define SCANLIST_DEFAULT_TITLE_PADDING_BOTTOM 84
+#define SCANLIST_DEFAULT_TITLE_MIN_HEIGHT_INC 55
+#define SCANLIST_DEFAULT_TITLEBAR_PADDING_TOP 23
+#define SCANLIST_DEFAULT_TITLEBAR_WIDTH_INC 120
+#define SCANLIST_DEFAULT_TITLEBAR_LINE_HEIGHT_INC 3
+#define SCANLIST_DEFAULT_TITLEBAR_SHADOW_HEIGHT_INC 9
+#define SCANLIST_DEFAULT_CONTENT_MIN_HEIGHT_INC 40
+#define SCANLIST_DEFAULT_ACTION_AREA_MIN_HEIGHT_INC 80
+#define SCANLIST_DEFAULT_ACTION_AREA_PADDING_TOP 72
+#define SCANLIST_DEFAULT_BUTTON_WIDTH_INC 300
+#define SCANLIST_DEFAULT_BUTTON_HEIGHT_INC 80
+#define SCANLIST_DEFAULT_BUTTON2_PADDING_INC 20
+#define SCANLIST_DEFAULT_BUTTON3_PADDING_INC 4
+#define SCANLIST_DEFAULT_VI_INC 12
+#define SCANLIST_DEFAULT_ACTION_AREA_HEIGHT (SCANLIST_DEFAULT_ACTION_AREA_MIN_HEIGHT_INC+SCANLIST_DEFAULT_ACTION_AREA_PADDING_TOP)
+#define SCANLIST_DEFAULT_OUTSIDE_PAD (120+SCANLIST_DEFAULT_BASE_PADDING_TOP_INC+SCANLIST_DEFAULT_BASE_PADDING_BOTTOM_INC)
+
 
 color_classes {
    color_class { "popup/default/text_title";
       color: 255 255 255 255;
    }
+   color_class { "popup/style.scanlist.popup/bg";
+      color: 220 220 220 255;
+   }
+   color_class { "popup/style.scanlist.popup/title_bar_line";
+      color: 255 255 255 204;
+   }
+   color_class { "popup/style.scanlist.popup/title_bar_shadow";
+      color: 0 0 0 255;
+   }
 }
 
 styles {
@@ -97,6 +133,10 @@ styles {
       base: "font=Tizen:style=Semibold font_size=42 align=center color=#FFF wrap=mixed ellipsis=1.0";
       tag:  "tab" "\t";
    }
+   style { name: "scanlist_default_title_style";
+      base: "font=Tizen:style=Semibold font_size=42 align=center color=#000 wrap=mixed ellipsis=1.0";
+      tag:  "tab" "\t";
+   }
 }
 group { "elm/popup/base/settings";
        nomouse;
@@ -388,3 +428,320 @@ group {
    }
 }
 
+group { "elm/popup/base/style.scanlist.popup";
+   nomouse;
+
+   images {
+      image: "4.0/bg_popup.#.png" COMP;
+      image: "4.0/img_popup_bar_line.png" COMP;
+      image: "4.0/img_popup_bar_shadow.png" COMP;
+   }
+
+   data {
+      item: "focus_highlight" "on";
+      item: "default_orient" "2"; //top, center:1 bottom:2
+      item: "popup_outside_pad" SCANLIST_DEFAULT_OUTSIDE_PAD;
+   }
+
+   parts {
+      spacer { "base";
+         scale;
+         desc { "default";
+            min: SCANLIST_DEFAULT_WIDTH_MIN_INC SCANLIST_DEFAULT_HEIGHT_MIN_INC;
+         }
+      }
+      image { "bg";
+         mouse;
+         desc { "default";
+            rel.to: "base";
+            image.normal: "4.0/bg_popup.#.png";
+            color_class: "popup/style.scanlist.popup/bg";
+         }
+      }
+      rect { "access.outline";
+         repeat_events: 1;
+         desc { "default";
+            fixed: 1 1;
+            rel.to: "base";
+            color: 0 0 0 0;
+         }
+      }
+      rect { "padding_top_left";
+         scale;
+         desc { "default";
+           color, 255 0 0 255;
+            rel.to: "base";
+            rel2.relative: 0.0 0.0;
+            align: 0.0 0.0;
+            min: SCANLIST_DEFAULT_BASE_PADDING_LR_INC SCANLIST_DEFAULT_BASE_PADDING_TOP_INC;
+            fixed: 1 1;
+         }
+      }
+      rect { "padding_bottom_right";
+         scale;
+         desc { "default";
+           color, 255 0 0 255;
+            rel.to: "base";
+            rel1.relative: 1.0 1.0;
+            align: 1.0 1.0;
+            min: SCANLIST_DEFAULT_BASE_PADDING_LR_INC SCANLIST_DEFAULT_BASE_PADDING_BOTTOM_INC;
+            fixed: 1 1;
+         }
+      }
+      rect { "elm.bg.title";
+         scale;
+         desc { "default";
+            rel.to: "padding_top_left";
+            rel1.relative: 1.0 1.0;
+            rel2.to_x: "padding_bottom_right";
+            rel2.relative: 0.0 1.0;
+            align: 0.5 0.0;
+            min: 0 0;
+            fixed: 1 1;
+            color: 0 0 0 0;
+         }
+         desc { "visible";
+            inherit: "default" 0.0;
+            min: 0 (SCANLIST_DEFAULT_TITLE_PADDING_TOP+SCANLIST_DEFAULT_TITLE_MIN_HEIGHT_INC+SCANLIST_DEFAULT_TITLE_PADDING_BOTTOM);
+         }
+      }
+      spacer { "padding_title_top";
+         scale;
+         desc { "default";
+            rel.to: "elm.bg.title";
+            rel2.relative: 1.0 0.0;
+            align: 0.5 0.0;
+            min: 0 SCANLIST_DEFAULT_TITLE_PADDING_TOP;
+            fixed: 1 1;
+         }
+      }
+      spacer { "padding_title_bottom";
+         scale;
+         desc { "default";
+            rel.to: "elm.bg.title";
+            rel1.relative: 0.0 1.0;
+            align: 0.5 1.0;
+            min: 0 SCANLIST_DEFAULT_TITLE_PADDING_BOTTOM;
+            fixed: 1 1;
+         }
+      }
+      textblock { "elm.text.title";
+         scale;
+         desc { "default";
+            rel1 {
+               to_x: "elm.bg.title";
+               to_y: "padding_title_top";
+               relative: 0.0 1.0;
+            }
+            rel2 {
+               to_x: "elm.bg.title";
+               to_y: "padding_title_bottom";
+               relative: 1.0 0.0;
+            }
+            fixed: 1 1;
+            text.style: "scanlist_default_title_style";
+         }
+      }
+      rect { "access.title";
+         repeat_events: 1;
+         desc { "default";
+            rel.to: "elm.text.title";
+            color: 0 0 0 0;
+         }
+      }
+      spacer { "padding_title_bar_top";
+         scale;
+         desc { "default";
+            rel.to: "elm.text.title";
+            rel1.relative: 0.0 1.0;
+            align: 0.5 0.0;
+            min: 0 SCANLIST_DEFAULT_TITLEBAR_PADDING_TOP;
+            min: 0 SCANLIST_DEFAULT_TITLEBAR_PADDING_TOP;
+            fixed: 1 1;
+         }
+      }
+      image { "title_bar_line";
+         scale;
+         desc { "default";
+            image.normal: "4.0/img_popup_bar_line.png";
+            color_class: "popup/style.scanlist.popup/title_bar_line";
+            color: 0 0 0 0;
+            rel.to: "padding_title_bar_top";
+            rel1.relative: 0.0 1.0;
+            align: 0.5 0.0;
+            min: SCANLIST_DEFAULT_TITLEBAR_WIDTH_INC SCANLIST_DEFAULT_TITLEBAR_LINE_HEIGHT_INC;
+            max: SCANLIST_DEFAULT_TITLEBAR_WIDTH_INC SCANLIST_DEFAULT_TITLEBAR_LINE_HEIGHT_INC;
+            fixed: 1 1;
+         }
+         desc { "visible";
+            inherit: "default";
+            color: 255 255 255 255;
+         }
+      }
+      image { "title_bar_shadow";
+         scale;
+         desc { "default";
+            image.normal: "4.0/img_popup_bar_shadow.png";
+            color_class: "popup/style.scanlist.popup/title_bar_shadow";
+            color: 0 0 0 0;
+            rel.to: "title_bar_line";
+            rel1.relative: 0.0 1.0;
+            align: 0.5 0.0;
+            min: SCANLIST_DEFAULT_TITLEBAR_WIDTH_INC SCANLIST_DEFAULT_TITLEBAR_SHADOW_HEIGHT_INC;
+            max: SCANLIST_DEFAULT_TITLEBAR_WIDTH_INC SCANLIST_DEFAULT_TITLEBAR_SHADOW_HEIGHT_INC;
+            fixed: 1 1;
+         }
+         desc { "visible";
+            inherit: "default";
+            color: 255 255 255 255;
+         }
+      }
+      swallow { "elm.swallow.content";
+         mouse;
+         desc { "default";
+            rel1 {
+               to_x: "padding_top_left";
+               to_y: "elm.bg.title";
+               relative: 1.0 1.0;
+            }
+            rel2 {
+               to_x: "padding_bottom_right";
+               to_y: "elm.swallow.action_area.bg";
+               relative: 0.0 0.0;
+            }
+         }
+      }
+      rect { "access.body";
+         repeat_events: 1;
+         desc { "default";
+            rel.to: "elm.swallow.content";
+            color: 0 0 0 0;
+         }
+      }
+      rect { "elm.swallow.action_area.bg";
+         scale;
+         desc { "default";
+            rel1 {
+               to_x: "padding_top_left";
+               to_y: "padding_bottom_right";
+               relative: 1.0 0.0;
+            }
+            rel2 {
+               to: "padding_bottom_right";
+               relative: 0.0 0.0;
+            }
+            align: 0.5 1.0;
+            min: 0 0;
+            fixed: 0 1;
+            color: 0 0 0 0;
+         }
+         desc { "show_action_area";
+            inherit: "default" 0.0;
+            min: 0 (SCANLIST_DEFAULT_ACTION_AREA_MIN_HEIGHT_INC+SCANLIST_DEFAULT_ACTION_AREA_PADDING_TOP);
+         }
+      }
+      spacer { "padding_action_area_top";
+         scale;
+         desc { "default";
+            rel.to: "elm.swallow.action_area.bg";
+            rel2.relative: 1.0 0.0;
+            align: 0.5 0.0;
+            min: 0 SCANLIST_DEFAULT_ACTION_AREA_PADDING_TOP;
+            max: 0 SCANLIST_DEFAULT_ACTION_AREA_PADDING_TOP;
+            fixed: 1 1;
+         }
+      }
+      swallow { "elm.swallow.action_area";
+         mouse;
+         desc { "default";
+            rel1 {
+               to_x: "elm.swallow.action_area.bg";
+               to_y: "padding_action_area_top";
+               relative: 0.0 1.0;
+            }
+            rel2.to: "elm.swallow.action_area.bg";
+            fixed: 0 1;
+         }
+      }
+   }
+
+   programs {
+      program { "show_title_area";
+         signal: "elm,state,title_area,visible";
+         source: "elm";
+         script {
+            set_state(PART:"elm.bg.title", "visible", 0.0);
+            set_state(PART:"title_bar_line", "visible", 0.0);
+            set_state(PART:"title_bar_shadow", "visible", 0.0);
+         }
+      }
+      program { "hide_title_area";
+         signal: "elm,state,title_area,hidden";
+         source: "elm";
+         action: STATE_SET "default" 0.0;
+         script {
+            set_state(PART:"elm.bg.title", "default", 0.0);
+            set_state(PART:"title_bar_line", "default", 0.0);
+            set_state(PART:"title_bar_shadow", "default", 0.0);
+         }
+      }
+      program { "show_action_area";
+         signal: "elm,state,action_area,visible";
+         source: "elm";
+         script {
+            set_state(PART:"elm.swallow.action_area.bg", "show_action_area", 0.0);
+         }
+      }
+      program { "hide_action_area";
+         signal: "elm,state,action_area,hidden";
+         source: "elm";
+         action: STATE_SET "default" 0.0;
+         script {
+            set_state(PART:"elm.swallow.action_area.bg", "default", 0.0);
+         }
+      }
+      program { "on_show";
+         signal: "show";
+         source: "";
+      }
+      program { "on_hide";
+         signal: "elm,state,hide";
+         source: "elm";
+      }
+
+
+      program { "change_to_landscape";
+         action: STATE_SET "landscape" 0.0;
+         target: "base";
+         after: "orientation_change";
+      }
+      program { "orientation_change";
+         action: SIGNAL_EMIT "elm,state,orientation,changed" "";
+      }
+      program { "change_to_portrait";
+         action: STATE_SET "default" 0.0;
+         target: "base";
+         after: "orientation_change";
+      }
+      program { "landscape_mode";
+         source: "elm";
+         signal: "elm,state,orient,90";
+         after: "change_to_landscape";
+      }
+      program { "landscape_mode2";
+         source: "elm";
+         signal: "elm,state,orient,270";
+         after: "change_to_landscape";
+      }
+      program { "portrait_mode";
+         source: "elm";
+         signal: "elm,state,orient,0";
+         after: "change_to_portrait";
+      }
+      program { "portrait_mode2";
+         source: "elm";
+         signal: "elm,state,orient,180";
+         after: "change_to_portrait";
+      }
+   }
+}
index 86bb1a8..d64dc92 100644 (file)
@@ -100,7 +100,7 @@ static Evas_Object *_create(Evas_Object *win, void *data)
 
        priv = data;
 
-       wifi_list_popup = utils_add_popup(priv->base, STYLE_POPUP, STR_WIRELESS, NULL);
+       wifi_list_popup = utils_add_popup(priv->base, "style.scanlist.popup", STR_WIRELESS, NULL);
        if (!wifi_list_popup) {
                _ERR("Add popup failed");
                evas_object_del(wifi_list_popup);