Certificate popup landscape - proper size 97/92597/4
authorMaciej Skrzypkowski <m.skrzypkows@samsung.com>
Tue, 18 Oct 2016 07:44:39 +0000 (09:44 +0200)
committerJarek Pytlinski <j.pytlinski@samsung.com>
Tue, 18 Oct 2016 08:01:13 +0000 (01:01 -0700)
[Issue]    http://suprem.sec.samsung.net/jira/browse/TSAM-8772
           http://suprem.sec.samsung.net/jira/browse/TSAM-8776
[Problem]  Certificate didn't resize properly.
[Solution] Corrected EDC relatives.
[Verify]   Open certifiacate popup in portrait, rotate, rotate
           again. Browser shouldn't crash, certifiacate should
           close on "OK" click and resize properly.
           The same repeat for landscape view.

Change-Id: Ia5fa3d91352542705f0762c407a54787c13d8b80

services/SimpleUI/ContentPopup_mob.cpp
services/SimpleUI/ContentPopup_mob.h
services/SimpleUI/edc/ContentPopup_mob.edc

index e4f13bbdcb51618a98b3c5994095b7e0d8750560..09b7e34a03ec9a24fdfd6e910568d88597e01bb9 100644 (file)
@@ -54,7 +54,6 @@ void ContentPopup::show()
 {
     evas_object_show(m_layout);
     elm_object_part_content_set(m_parent, "popup_content", m_layout);
-    orientationChanged();
     popupShown(this);
 }
 
@@ -153,20 +152,6 @@ void ContentPopup::_layout_resize_cb(void* data, Evas* /*e*/, Evas_Object* /*obj
     elm_label_wrap_width_set(self->m_content, w);
 }
 
-void ContentPopup::orientationChanged()
-{
-    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-
-    auto landscapeSignal = isLandscape();
-    if (landscapeSignal) {
-        if (*landscapeSignal)
-            evas_object_size_hint_max_set(m_scroller, -1, MAX_HEIGHT_LANDSCAPE);
-        else
-            evas_object_size_hint_max_set(m_scroller, -1, MAX_HEIGHT);
-    } else
-        BROWSER_LOGW("[%s:%d] Wrong boost signal value!", __PRETTY_FUNCTION__, __LINE__);
-}
-
 
 }
 
index 953cf238b85880e34d614e15d4fa05177a75c3c3..f220fbbd684c77a41ec82a9779cf34dff4653c59 100644 (file)
@@ -40,7 +40,7 @@ public:
     void show();
     void dismiss();
     void onBackPressed();
-    void orientationChanged();
+    void orientationChanged() override { }
 
     void setTitle(const std::string& title);
     void setContent(Evas_Object* content);
@@ -80,8 +80,6 @@ private:
     std::string m_message;
     std::string m_edjFilePath;
     static const int MARGIN = 44;
-    static const int MAX_HEIGHT = 799 - 26 - 54;    // max height of content swallow (height - margins)
-    static const int MAX_HEIGHT_LANDSCAPE = 300;
 };
 
 }
index 34f31d8fb93f671483562bc4b5bd64793413733c..7175dbbe9c76fb4b441145c944a77e5241a77682 100644 (file)
@@ -2,7 +2,7 @@
 
 #define BUTTON_HEIGHT 120
 #define TITLE_HEIGHT 127
-#define TITLE_TEXT_OFFSET_X 100
+#define TITLE_TEXT_OFFSET_X 0
 #define TITLE_TEXT_OFFSET_Y 44
 #define TITLE_TEXT_HEIGHT 45
 #define MESSAGE_OFFSET_X 44
@@ -32,249 +32,221 @@ collections { base_scale: 2.6;
                     state: "default" 0.0;
                     visible: 1;
                     color: 0 0 0 102.4;
-                    align: 0.5 0.5;
+                    align: 0.5 1.0;
                     min: 0 0;
                     max: -1 -1;
                     fixed: 0 0;
-                    rel1.relative: 0.0 0.0;
+                    rel1.relative: 0.0 0.2;
                     rel2.relative: 1.0 1.0;
                 }
             }
             rect {
-                name: "popup_bg";
+                name: "title_bg";
                 scale: 1;
                 description {
                     state: "default" 0.0;
                     visible: 1;
                     color: 255 255 255 255;
-                    min: 0 0;
-                    max: -1 -1;
-                    fixed: 0 0;
+                    align: 0 0;
+                    min: 0 TITLE_HEIGHT;
+                    max: -1 TITLE_HEIGHT;
+                    align: 0 0;
                     rel1 {
                         relative: 0 0;
-                        to: "title_bg";
-                    }
-                    rel2 {
-                        relative: 1 0;
-                        to: "buttons_bg";
-                    }
-                }
-            }
-            rect {
-                name: "buttons_bg";
-                scale: 1;
-                description {
-                    state: "default" 0.0;
-                    visible: 1;
-                    color: 0 255 255 255;
-                    align: 0.5 1;
-                    min: 0 BUTTON_HEIGHT;
-                    max: -1 BUTTON_HEIGHT;
-                    fixed: 0 1;
-                    rel1 {
-                        relative: 0.0 1.0;
                         to: "bg";
                     }
                     rel2 {
-                        relative: 1.0 1.0;
+                        relative: 1 1;
                         to: "bg";
                     }
                 }
             }
-            part {
-                name: "buttons_swallow";
-                type: SWALLOW;
+            rect {
+                name: "title_text_spacer";
                 scale: 1;
                 description {
                     state: "default" 0.0;
-                    fixed: 0 0;
+                    visible: DEVELOPMENT;
+                    color: 255 255 255 127;
+                    min: TITLE_TEXT_OFFSET_X TITLE_TEXT_OFFSET_Y;
+                    max: TITLE_TEXT_OFFSET_X TITLE_TEXT_OFFSET_Y;
+                    fixed: 1 1;
                     align: 0.0 0.0;
-                    visible: 1;
                     rel1 {
                         relative: 0.0 0.0;
-                        to: "buttons_bg";
+                        to: "title_bg";
                     }
                     rel2 {
                         relative: 1.0 1.0;
-                        to: "buttons_bg";
+                        to: "title_bg";
                     }
-                }
-            }
-            rect {
-                name: "text_spacer_0";
-                scale: 1;
-                description {
-                    state: "default" 0.0;
-                    visible: DEVELOPMENT;
-                    min: MESSAGE_OFFSET_X 0;
-                    max: MESSAGE_OFFSET_X 0;
-                    fixed: 1 1;
-                    align: 0 0;
-                    rel1.relative: 0 0;
-                    rel2.relative: 1 1;
-                }
+                 }
             }
             rect {
-                name: "text_spacer_1";
+                name: "title_text_bg";
                 scale: 1;
                 description {
                     state: "default" 0.0;
-                    color: 50 0 50 255;
                     visible: DEVELOPMENT;
-                    min: MESSAGE_OFFSET_X MESSAGE_OFFSET_BOT;
-                    max: MESSAGE_OFFSET_X MESSAGE_OFFSET_BOT;
-                    fixed: 1 1;
-                    align: 1 1;
+                    color: 255 182 193 255; //lightpink
+                    align: 0.0 0.0;
+                    min: 0 TITLE_TEXT_HEIGHT;
+                    max: -1 -1;
+                    fixed: 0 0;
                     rel1 {
-                        relative: 0 0;
+                        relative: 1 1;
+                        to: "title_text_spacer";
                     }
                     rel2 {
-                      relative: 1 0;
-                        to: "buttons_bg";
+                        relative: 1 1;
+                        to: "title_bg";
                     }
                 }
             }
             part {
-                name: "content_swallow";
+                name: "title_text";
+                type: TEXTBLOCK;
                 scale: 1;
-                type: SWALLOW;
                 description {
                     state: "default" 0.0;
                     visible: 1;
-                    min: 0 38;
-                    align: 0.5 1;
+                    align: 0.0 0.0;
+                    fixed: 0 0;
                     rel1 {
-                        relative: 1 1;
-                        to: "text_spacer_0";
+                        relative: 0.0 0.0;
+                        to: "title_text_bg";
                     }
                     rel2 {
-                        relative: 0 0;
-                        to: "text_spacer_1";
+                        relative: 1.0 1.0;
+                        to: "title_text_bg";
+                    }
+                    text {
+                        style: "title_text_style";
+                        align: 0 0;
                     }
                 }
             }
+
             rect {
-                name: "title_spacer";
+                name: "buttons_bg";
                 scale: 1;
                 description {
                     state: "default" 0.0;
-                    visible: DEVELOPMENT;
-                    min: MESSAGE_OFFSET_X 0;
-                    max: MESSAGE_OFFSET_X 0;
-                    fixed: 1 1;
-                    align: 0 0;
+                    visible: 1;
+                    color: 0 255 255 255;
+                    align: 0.5 1;
+                    min: 0 BUTTON_HEIGHT;
+                    max: -1 BUTTON_HEIGHT;
+                    fixed: 0 1;
                     rel1 {
-                        relative: 0;
-                        to: "content_swallow";
+                        relative: 0.0 0.0;
+                        to: "bg";
                     }
                     rel2 {
-                        relative: 1 1;
+                        relative: 1.0 1.0;
+                        to: "bg";
                     }
                 }
             }
-            rect {
-                name: "title_bg";
+            part {
+                name: "buttons_swallow";
+                type: SWALLOW;
                 scale: 1;
                 description {
                     state: "default" 0.0;
+                    fixed: 0 0;
+                    align: 0.0 0.0;
                     visible: 1;
-                    color: 255 255 255 255;
-                    align: 0 1;
-                    min: 0 TITLE_HEIGHT;
-                    max: -1 TITLE_HEIGHT;
                     rel1 {
-                        relative: 0 0;
-                        to: "bg";
+                        relative: 0.0 0.0;
+                        to: "buttons_bg";
                     }
                     rel2 {
-                        relative: 1 0;
-                        to: "title_spacer";
+                        relative: 1.0 1.0;
+                        to: "buttons_bg";
                     }
                 }
             }
             rect {
-                name: "title_text_spacer_0";
+                name: "popup_bg";
                 scale: 1;
                 description {
                     state: "default" 0.0;
-                    visible: DEVELOPMENT;
-                    color: 255 255 255 127;
-                    min: TITLE_TEXT_OFFSET_X TITLE_TEXT_OFFSET_Y;
-                    max: TITLE_TEXT_OFFSET_X TITLE_TEXT_OFFSET_Y;
-                    fixed: 1 1;
-                    align: 0.0 0.0;
+                    visible: 1;
+                    color: 255 255 255 255;
+                    min: 0 0;
+                    max: -1 -1;
+                    fixed: 0 0;
+                    align: 0 0;
                     rel1 {
-                        relative: 0.0 0.0;
+                        relative: 0 1;
                         to: "title_bg";
                     }
                     rel2 {
-                        relative: 1.0 1.0;
-                        to: "title_bg";
+                        relative: 1 0;
+                        to: "buttons_bg";
                     }
-                 }
+                }
             }
             rect {
-                name: "title_text_spacer_1";
+                name: "text_spacer_0";
                 scale: 1;
                 description {
                     state: "default" 0.0;
                     visible: DEVELOPMENT;
-                    color: 255 255 255 127;
-                    min: TITLE_TEXT_OFFSET_X 0;
-                    max: TITLE_TEXT_OFFSET_X 0;
+                    color: 0 0 70 255;
+                    min: MESSAGE_OFFSET_X 0;
+                    max: MESSAGE_OFFSET_X 0;
                     fixed: 1 1;
-                    align: 1 1;
+                    align: 0 0;
                     rel1 {
-                        relative: 0.0 0.0;
-                        to: "title_bg";
+                        relative: 0 0;
+                        to: "popup_bg";
                     }
                     rel2 {
-                        relative: 1.0 1.0;
-                        to: "title_bg";
+                        relative: 1 1;
+                        to: "popup_bg";
                     }
                 }
             }
             rect {
-                name: "title_text_bg";
+                name: "text_spacer_1";
                 scale: 1;
                 description {
                     state: "default" 0.0;
+                    color: 50 0 50 255;
                     visible: DEVELOPMENT;
-                    color: 255 182 193 255; //lightpink
-                    align: 0.0 0.0;
-                    min: 0 TITLE_TEXT_HEIGHT;
-                    max: -1 -1;
-                    fixed: 0 0;
+                    min: MESSAGE_OFFSET_X MESSAGE_OFFSET_BOT;
+                    max: MESSAGE_OFFSET_X MESSAGE_OFFSET_BOT;
+                    fixed: 1 1;
+                    align: 1 1;
                     rel1 {
-                        relative: 1 1;
-                        to: "title_text_spacer_0";
+                        relative: 0 0;
+                        to: "popup_bg";
                     }
                     rel2 {
-                        relative: 0 0;
-                        to: "title_text_spacer_1";
+                        relative: 1 1;
+                        to: "popup_bg";
                     }
                 }
             }
             part {
-                name: "title_text";
-                type: TEXTBLOCK;
+                name: "content_swallow";
                 scale: 1;
+                type: SWALLOW;
                 description {
                     state: "default" 0.0;
                     visible: 1;
-                    align: 0.0 0.0;
-                    fixed: 0 0;
+                    min: 0 38;
+                    max: -1 -1;
+                    align: 0 0;
                     rel1 {
-                        relative: 0.0 0.0;
-                        to: "title_text_bg";
+                        relative: 1 1;
+                        to: "text_spacer_0";
                     }
                     rel2 {
-                        relative: 1.0 1.0;
-                        to: "title_text_bg";
-                    }
-                    text {
-                        style: "title_text_style";
-                        align: 0 0;
+                        relative: 0 0;
+                        to: "text_spacer_1";
                     }
                 }
             }