UrlHistoryList: adjusting width and x offset to the views. 95/50295/2
authorAdam Skobodzinski <a.skobodzins@partner.samsung.com>
Tue, 27 Oct 2015 12:54:26 +0000 (13:54 +0100)
committerJanusz Majnert <j.majnert@samsung.com>
Wed, 28 Oct 2015 10:48:55 +0000 (03:48 -0700)
[Issue]    https://bugs.tizen.org/jira/browse/TT-161
[Problem]  UrlHistoryList had fixed width and x offset,
[Solution] Depending on which view is active, list has a different
width and x offset.
[Verify] List should be properly positioned in a QuickAccess view and
a WebPage view.

Change-Id: Id6ae2858238639e38f228316316177983fc76a14
Signed-off-by: Adam Skobodzinski <a.skobodzins@partner.samsung.com>
services/WebPageUI/WebPageUI.cpp
services/WebPageUI/edc/UrlHistoryList.edc

index f60578c..37be2eb 100644 (file)
@@ -229,6 +229,7 @@ void WebPageUI::switchViewToWebPage(Evas_Object* content, const std::string uri,
     evas_object_show(m_leftButtonBar->getContent());
     elm_object_signal_emit(m_mainLayout, "shiftright_uri", "ui");
     elm_object_signal_emit(m_URIEntry->getContent(), "shiftright_uribg", "ui");
+    elm_object_signal_emit(m_urlHistoryList->getContent(), "switch_view_webpage", "ui");
     elm_object_focus_custom_chain_append(m_mainLayout, content, NULL);
 }
 
@@ -241,6 +242,7 @@ void WebPageUI::switchViewToQuickAccess(Evas_Object* content)
     evas_object_hide(m_leftButtonBar->getContent());
     elm_object_signal_emit(m_mainLayout, "shiftback_uri", "ui");
     elm_object_signal_emit(m_URIEntry->getContent(), "shiftback_uribg", "ui");
+    elm_object_signal_emit(m_urlHistoryList->getContent(), "switch_view_quickaccess", "ui");
     hideProgressBar();
     refreshFocusChain();
     m_URIEntry->changeUri("");
index febb024..d0ec539 100644 (file)
@@ -1,7 +1,8 @@
-#define LIST_OFFSET_X 255
+#define LIST_OFFSET_X_QUICKACCESS 10
+#define LIST_OFFSET_X_WEBPAGE 255
 #define LIST_OFFSET_Y 104
-#define URI_INPUTBOX_LENGTH 1720
-#define URI_INPUTBOX_LENGTH_SHORT 1460
+#define URI_INPUTBOX_LENGTH_QUICKACCESS 1720
+#define URI_INPUTBOX_LENGTH_WEBPAGE 1460
 #define HISTORY_ITEM_W URI_INPUTBOX_LENGTH
 #define HISTORY_ITEM_H 82
 
@@ -14,19 +15,49 @@ collections {
                 name: "list_swallow";
                 type: SWALLOW;
                 description {
+                    state: "default" 0.0;
                     color: 255 0 0 150;
-                    min: URI_INPUTBOX_LENGTH_SHORT 0;
+                    min: URI_INPUTBOX_LENGTH_QUICKACCESS 0;
                     max: -1 -1;
                     visible: 1;
                     align: 0.0 0.0;
                     rel1 {
                         relative: 0 0;
-                        offset: LIST_OFFSET_X LIST_OFFSET_Y;
+                        offset: LIST_OFFSET_X_QUICKACCESS LIST_OFFSET_Y;
                     }
                     rel2 {
                         relative: 1.0 0.5;
                     }
                 }
+                description {
+                    state: "view_quickaccess" 0.0;
+                    inherit: "default" 0.0;
+                }
+                description {
+                    state: "view_webpage";
+                    inherit: "default" 0.0;
+                    min: URI_INPUTBOX_LENGTH_WEBPAGE 0;
+                    rel1 {
+                        relative: 0 0;
+                        offset: LIST_OFFSET_X_WEBPAGE LIST_OFFSET_Y;
+                    }
+                }
+            }
+        }
+        programs {
+            program {
+                name: "switch_view_quickaccess";
+                signal: "switch_view_quickaccess";
+                source: "ui";
+                action: STATE_SET "view_quickaccess" 0.0;
+                target: "list_swallow";
+            }
+            program {
+                name: "switch_view_webpage";
+                signal: "switch_view_webpage";
+                source: "ui";
+                action: STATE_SET "view_webpage" 0.0;
+                target: "list_swallow";
             }
         }
     }