From: Maciej Skrzypkowski Date: Wed, 28 Oct 2015 10:37:36 +0000 (+0100) Subject: Mobile version of WebPageUI and QuickAccess X-Git-Tag: accepted/tizen/tv/20151029.090044 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Ftags%2Faccepted%2Ftizen%2Ftv%2F20151029.090044;p=profile%2Ftv%2Fapps%2Fweb%2Fbrowser.git Mobile version of WebPageUI and QuickAccess [Issue] https://bugs.tizen.org/jira/browse/TM-34 [Problem] There was a lack of mobile edc version. [Solution] Added edc files with "_mob" extention for mobile profile. [Verification] Build project for TV and for mobile, check if there is no regresion for TV, check if there is QuickAcces view for mobile. Change-Id: If790494ccbd12f405a86a807515e2f6560476496 Signed-off-by: Maciej Skrzypkowski --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e94aba..218c05e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,6 +98,7 @@ if(TIZEN_BUILD) -DM_VCS_ID=\"${VCS_ID}\" -DTIZEN_BUILD=\"${TIZEN_BUILD}\" -DCERTS_DIR=\"${CERTS_DIR}\" + -DPROFILE=${PROFILE} ) endif(TIZEN_BUILD) diff --git a/core/Config/Config.cpp b/core/Config/Config.cpp index 73e387e..4d96ca8 100644 --- a/core/Config/Config.cpp +++ b/core/Config/Config.cpp @@ -44,6 +44,8 @@ void DefaultConfig::load(const std::string &) # include "ConfigValues.h" m_data["resourcedb/dir"] = std::string(db_path)+"/"+std::string("org.tizen.browser/data/"); + + m_data["mobile_scale"] = 1.98; } void DefaultConfig::store(const std::string & ) @@ -60,5 +62,10 @@ void DefaultConfig::set(const std::string & key, const boost::any & value) m_data[key] = value; } +bool DefaultConfig::isMobileProfile() const +{ + return boost::any_cast(m_data.at("profile")) == MOBILE; +} + } /* end of namespace config */ } /* end of namespace tizen_browser */ diff --git a/core/Config/Config.h b/core/Config/Config.h index b342c86..650c4cb 100644 --- a/core/Config/Config.h +++ b/core/Config/Config.h @@ -74,8 +74,15 @@ public: * @param value Value to be set. */ void set(const std::string & key, const boost::any & value); + + /** + * @brief Check if current profile is mobile. + */ + bool isMobileProfile() const; private: std::map m_data; + + const std::string MOBILE = "mobile"; }; diff --git a/core/Config/ConfigValues.h.in b/core/Config/ConfigValues.h.in index 53fce72..dfca385 100644 --- a/core/Config/ConfigValues.h.in +++ b/core/Config/ConfigValues.h.in @@ -2,3 +2,4 @@ m_data["services/dir"] = std::string("@CMAKE_INSTALL_PREFIX@/services"); m_data["resource/dir"] = std::string("@RESDIR@"); m_data["webkit/dir"] = std::string("@WEBKITDIR@"); +m_data["profile"] = std::string("@PROFILE@"); diff --git a/services/QuickAccess/CMakeLists.txt b/services/QuickAccess/CMakeLists.txt index bacd28d..3b210c6 100644 --- a/services/QuickAccess/CMakeLists.txt +++ b/services/QuickAccess/CMakeLists.txt @@ -5,11 +5,6 @@ set(QuickAccess_SRCS DetailPopup.cpp ) -set(QuickAccess_HEADERS - QuickAccess.h - DetailPopup.h - ) - include(Coreheaders) include(EFLHelpers) @@ -26,14 +21,22 @@ install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION services/static) #please do not add edc/ directory -set(edcFiles - QuickAccess.edc - DetailPopup.edc - ) +if (${PROFILE} MATCHES "mobile") # mobile profile + set(edcFiles + InvisibleButton.edc + QuickAccess_mob.edc + ) +else (${PROFILE} MATCHES "mobile") # tv profile + set(edcFiles + InvisibleButton.edc + QuickAccess.edc + DetailPopup.edc + ) +endif (${PROFILE} MATCHES "mobile") foreach(edec ${edcFiles}) - string(REPLACE ".edc" ".edj" target_name ${edec}) + string(REGEX REPLACE "(_mob)?.edc" ".edj" target_name ${edec}) EDJ_TARGET(${target_name} - ${CMAKE_CURRENT_SOURCE_DIR}/edc/${edec} - ${CMAKE_CURRENT_BINARY_DIR}) + ${CMAKE_CURRENT_SOURCE_DIR}/edc/${edec} + ${CMAKE_CURRENT_BINARY_DIR}) endforeach(edec) diff --git a/services/QuickAccess/QuickAccess.cpp b/services/QuickAccess/QuickAccess.cpp index 4dee510..e39ff1e 100644 --- a/services/QuickAccess/QuickAccess.cpp +++ b/services/QuickAccess/QuickAccess.cpp @@ -136,14 +136,13 @@ Evas_Object* QuickAccess::createQuickAccessLayout(Evas_Object* parent) m_desktopMode = true; Evas_Object* layout = elm_layout_add(parent); + elm_layout_file_set(layout, edjFilePath.c_str(), "main_layout"); evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set (layout, EVAS_HINT_FILL, EVAS_HINT_FILL); m_mostVisitedView = createMostVisitedView(layout); m_bookmarksView = createBookmarksView (layout); - showHistory(); - return layout; } @@ -397,11 +396,12 @@ void QuickAccess::showHistory() { BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__); - if (elm_layout_content_get(m_layout, "elm.swallow.content") == m_mostVisitedView) + if (elm_layout_content_get(m_layout, "view") == m_mostVisitedView) return; evas_object_hide(m_bookmarksView); - elm_layout_content_set(m_layout, "elm.swallow.content", m_mostVisitedView); + elm_layout_content_unset(m_layout, "view"); + elm_layout_content_set(m_layout, "view", m_mostVisitedView); evas_object_show(m_mostVisitedView); @@ -425,11 +425,12 @@ void QuickAccess::showBookmarks() { BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__); - if (elm_layout_content_get(m_layout, "elm.swallow.content") == m_bookmarksView && m_bookmarksView != nullptr) + if (elm_layout_content_get(m_layout, "view") == m_bookmarksView && m_bookmarksView != nullptr) return; evas_object_hide(m_mostVisitedView); - elm_layout_content_set(m_layout, "elm.swallow.content", m_bookmarksView); + elm_layout_content_unset(m_layout, "view"); + elm_layout_content_set(m_layout, "view", m_bookmarksView); evas_object_show(m_bookmarksView); evas_object_show(m_layout); @@ -441,7 +442,7 @@ void QuickAccess::showUI() { BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); evas_object_show(m_layout); - if (elm_layout_content_get(m_layout, "elm.swallow.content") == m_bookmarksView) { + if (elm_layout_content_get(m_layout, "view") == m_bookmarksView) { evas_object_show(m_bookmarksView); } else { evas_object_show(m_mostVisitedView); diff --git a/services/QuickAccess/edc/InvisibleButton.edc b/services/QuickAccess/edc/InvisibleButton.edc new file mode 100644 index 0000000..bc1028a --- /dev/null +++ b/services/QuickAccess/edc/InvisibleButton.edc @@ -0,0 +1,40 @@ + +collections { + group{ + name: "elm/button/base/invisible_button"; + parts{ + part{ + name: "button"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + visible: 1; + fixed: 1 1; + color: 0 0 0 0; + } + } + part{ + name: "over"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + visible: 1; + fixed: 1 1; + rel1 { relative: 0.0 0.0;to: "button";} + rel2 { relative: 1.0 1.0;to: "button";} + color: 0 0 0 0; + } + } + } + programs{ + program { + name: "mouse_click"; + signal: "mouse,clicked,1"; + source: "over"; + script { + emit("elm,action,click", ""); + } + } + } + } +} diff --git a/services/QuickAccess/edc/QuickAccess.edc b/services/QuickAccess/edc/QuickAccess.edc index c87299b..c5cd3fd 100644 --- a/services/QuickAccess/edc/QuickAccess.edc +++ b/services/QuickAccess/edc/QuickAccess.edc @@ -1,3 +1,5 @@ +#include "InvisibleButton.edc" + #define DEBUG_RECT_OVER(over_part, r, g, b) \ part { name: __CONCAT("dbg_rect_at_", __stringify(__LINE__)); \ \ @@ -19,44 +21,10 @@ collections { #define HEIGHT 181 #define ITEM_WIDTH 374 #define PARENT_ITEM_HEIGHT 36 - -group{ - name: "elm/button/base/invisible_button"; - parts{ - part{ - name: "button"; - type: RECT; - scale: 1; - description { state: "default" 0.0; - visible: 1; - fixed: 1 1; - color: 0 0 0 0; - } - } - part{ - name: "over"; - type: RECT; - scale: 1; - description { state: "default" 0.0; - visible: 1; - fixed: 1 1; - rel1 { relative: 0.0 0.0;to: "button";} - rel2 { relative: 1.0 1.0;to: "button";} - color: 0 0 0 0; - } - } - } - programs{ - program { - name: "mouse_click"; - signal: "mouse,clicked,1"; - source: "over"; - script { - emit("elm,action,click", ""); - } - } - } -} +#define URI_INPUTBOX_LENGTH 1720 +#define URL_HISTORY_ITEM_H 82 +#define URL_HISTORY_ITEMS_VISIBLE_MAX 5 +#define URL_HISTORY_LIST_MAX_H HISTORY_ITEM_H*HISTORY_ITEMS_VISIBLE_MAX group { name: "elm/button/base/thumbButton"; @@ -89,6 +57,28 @@ group { } } +group { + name: "main_layout"; + parts { + part { + name: "view"; + type: SWALLOW; + scale: 1; + mouse_events: 1; + description { state: "default" 0.0; + align: 0.0 0.0; + fixed: 0 0; + rel1 { + relative: 0 0; + } + rel2 { + relative: 1 1; + } + } + } + } +} + group { name: "mv_bookmarks"; data { item: "focus_highlight" "off"; @@ -98,93 +88,64 @@ group { name: "mv_bookmarks"; } color_classes{ color_class{ - name: "defaultBgColor"; - color: 18 22 34 255; - } - color_class{ name: "focusBgColor"; color: 0 119 246 255; } color_class{ - name: "imageHighlight"; - color: 255 255 255 102; - } - color_class{ - name: "focusbtBgColor"; - color: 22 120 224 255; - } - color_class{ - name: "titleTextColor"; - color: 74 74 74 255; - } - color_class{ - name: "focusTextColor"; - color: 255 255 255 255; - } - color_class{ - name: "highlightTextColor"; - color: 255 255 255 51; - } - color_class{ - name: "urlTextColor"; - color: 116 116 116 204; - } - color_class{ name: "transparent"; color: 0 0 0 0; } } parts { - part { name: "layoutTop_bg"; + part { name: "bg"; type: RECT; mouse_events: 0; description { state: "default" 0.0; color: 255 255 255 255; - min: 0 181; - max: -1 181; align: 0.0 0.0; fixed: 0 0; rel1 { - relative: 0 0; offset: 0 104; + relative: 0 0; } rel2{ relative: 1 1; } } } - part { name: "gengrid_bg"; - type: RECT; - mouse_events: 0; + + part { name: "elm.swallow.layoutTop"; + type: SWALLOW; description { state: "default" 0.0; - color: 255 255 255 255; - min: 1920 626; - max: -1 626; + min: 1920 181; + max: 1920 181; align: 0.0 0.0; fixed: 0 0; rel1 { - to: "layoutTop_bg"; - relative: 0 1; + relative: 0 0; + to: "bg"; } - rel2{ + rel2 { relative: 1 1; + to: "bg"; } } } + part { name: "layoutBottom_bg"; type: RECT; mouse_events: 0; description { state: "default" 0.0; - color: 255 255 255 255; + color: 255 255 255 255; min: 1920 181; - max: 1920 181; - align: 0.0 0.0; + max: 1920 181; + align: 0.0 1.0; fixed: 0 0; rel1 { - relative: 0 1; to: "gengrid_bg"; + relative: 0 0; to: "bg"; } rel2{ - relative: 1 1; + relative: 1 1; } } } @@ -194,14 +155,15 @@ group { name: "mv_bookmarks"; description { state: "default" 0.0; min: 1920 614; max: 1920 614; - align: 0.0 0.0; + align: 0.0 0.0; fixed: 0 0; rel1 { - relative: 0 0; to: "gengrid_bg"; offset: 63 0; + relative: 0 1; + to: "elm.swallow.layoutTop"; } rel2 { relative: 1 1; - offset: 0 0; + to: "bg"; } } } @@ -214,12 +176,12 @@ group { name: "mv_bookmarks"; visible: 0; align: 0.5 0.0; rel1 { - to: "gengrid_bg"; - relative: 0 0; + relative: 0 1; + to: "elm.swallow.layoutTop"; } rel2 { - to: "gengrid_bg"; relative: 1 1; + to: "bg"; } } description { state: "empty" 0.0; @@ -351,40 +313,6 @@ group { name: "mv_bookmarks"; } } - part { name: "elm.swallow.layoutTop"; - type: SWALLOW; - description { state: "default" 0.0; - min: 1920 181; - max: 1920 181; - align: 0.0 0.0; - fixed: 0 0; - rel1 { - relative: 0 0; to: "layoutTop_bg"; - } - rel2 { - relative: 1 1; - offset: 0 0; - } - } - } - - part { name: "uri_bar_shadow"; - type: IMAGE; - scale: 1; - repeat_events: 1; - description { - state: "default" 0.0; - visible: 1; - align: 0.0 0.0; - fixed: 0 0; - min: 1920 14; - max: 1920 14; - image.normal: "web_shadow.png"; - rel1 { relative: 0.0 0.0; to: "elm.swallow.layoutTop"; } - rel2 { relative: 1.0 1.0; } - } - } - part { name: "elm.swallow.layoutBottom"; type: SWALLOW; description { state: "default" 0.0; @@ -416,11 +344,11 @@ group { name: "mv_bookmarks"; align: 0.5 0.5; } rel1 { - to: "gengrid_bg"; + to: "bg"; relative: 0.0 0.0; } rel2 { - to: "gengrid_bg"; + to: "bg"; relative: 1 1; } } @@ -853,14 +781,6 @@ group { name: "elm/button/base/small_tile"; align: 0 0.0; } } - description { state: "focus" 0.0; - inherit: "default" 0.0; - color_class: focusTextColor; - } - description { state: "highlight" 0.0; - inherit: "default" 0.0; - //color_class: highlightTextColor; - } } part { name: "page_url"; @@ -886,14 +806,6 @@ group { name: "elm/button/base/small_tile"; align: 0 0.5; } } - description { state: "focus" 0.0; - inherit: "default" 0.0; - color_class: focusTextColor; - } - description { state: "highlight" 0.0; - inherit: "default" 0.0; - //color_class: highlightTextColor; - } } part { name: "over"; @@ -1069,14 +981,6 @@ group { name: "elm/gengrid/item/grid_item/default"; align: 0 0.5; } } - description { state: "focus" 0.0; - inherit: "default" 0.0; - //color: focusTextColor; - } - description { state: "highlight" 0.0; - inherit: "default" 0.0; - //color: highlightTextColor; - } } part { name: "page_url"; @@ -1101,14 +1005,6 @@ group { name: "elm/gengrid/item/grid_item/default"; align: 0 0.5; } } - description { state: "focus" 0.0; - inherit: "default" 0.0; - //color: focusTextColor; - } - description { state: "highlight" 0.0; - inherit: "default" 0.0; - //color: highlightTextColor; - } } part { name: "elm.thumbButton"; @@ -1194,12 +1090,6 @@ group { name: "top_button_item"; color_class: focusBgColor; visible: 1; } - description { - state: "focus" 0.0; - inherit: "default" 0.0; - color_class: focusbtBgColor; - visible: 1; - } } part{ name: "mostvisited_text"; @@ -1270,12 +1160,6 @@ group { name: "top_button_item"; color_class: focusBgColor; visible: 1; } - description { - state: "focus" 0.0; - inherit: "default" 0.0; - color_class: focusbtBgColor; - visible: 1; - } } part{ name: "bookmark_text"; @@ -1426,12 +1310,6 @@ group { name: "bottom_button_item"; color_class: focusBgColor; visible: 1; } - description { - state: "focus" 0.0; - inherit: "default" 0.0; - color_class: focusbtBgColor; - visible: 1; - } } part{ name: "bookmarkmanager_text"; diff --git a/services/QuickAccess/edc/QuickAccess_mob.edc b/services/QuickAccess/edc/QuickAccess_mob.edc new file mode 100644 index 0000000..02a3b80 --- /dev/null +++ b/services/QuickAccess/edc/QuickAccess_mob.edc @@ -0,0 +1,1378 @@ +#include "InvisibleButton.edc" + +collections { + +#define URI_INPUTBOX_LENGTH 1720 +#define URL_HISTORY_ITEM_H 82 +#define URL_HISTORY_ITEMS_VISIBLE_MAX 5 +#define URL_HISTORY_LIST_MAX_H HISTORY_ITEM_H*HISTORY_ITEMS_VISIBLE_MAX +#define LAYOUT_WIDTH 720 +#define LAYOUT_HEIGHT 1120 + +#define BIG_TILE_WIDTH 656 +#define BIG_TILE_HEIGHT 450 +#define SMALL_TILE_WIDTH 319 +#define SMALL_TILE_HEIGHT 361 +#define TILE_SEPARATOR 18 +#define TILE_LABEL_BG_HEIGHT 100 + +group { + name: "elm/button/base/thumbButton"; + images { + image: "ico_delete.png" COMP; + } + parts { + part { + name: "elm.swallow.content"; + type: RECT; + scale: 1; + mouse_events: 1; + repeat_events: 1; + description { + state: "default" 0.0; + color: 0 0 0 0; + visible: 1; + rel1.relative: 0.0 0.0; + rel2.relative: 1.0 1.0; + align: 0.0 0.0; + } + } + } + programs { + program { + name: "mouse,clicked"; + signal: "mouse,down,1"; + source: "elm.swallow.content"; + action: SIGNAL_EMIT "elm,action,click" ""; + } + } +} + +group { + name: "main_layout"; + parts { + part { + name: "view"; + type: SWALLOW; + scale: 1; + mouse_events: 1; + description { state: "default" 0.0; + align: 0.0 0.0; + fixed: 0 0; + rel1 { + relative: 0 0; + } + rel2 { + relative: 1 1; + } + } + } + } +} + +group { name: "mv_bookmarks"; + data { + item: "focus_highlight" "off"; + } + color_classes{ + color_class{ + name: "focusBgColor"; + color: 0 119 246 255; + } + color_class{ + name: "transparent"; + color: 0 0 0 0; + } + } + + parts { + part { name: "bg"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + color: 244 244 244 255; + align: 0.0 0.0; + fixed: 0 0; + rel1 { + relative: 0 0; + } + rel2{ + relative: 1 1; + } + } + } + + part { name: "elm.swallow.layoutTop"; + type: SWALLOW; + scale: 1; + description { state: "default" 0.0; + min: LAYOUT_WIDTH 181; + max: LAYOUT_WIDTH 181; + align: 0.0 0.0; + fixed: 0 0; + visible: 1; + rel1 { + relative: 0 0; + to: "bg"; + } + rel2 { + relative: 1 1; + to: "bg"; + } + } + } + + part { name: "elm.swallow.layoutBottom"; + type: SWALLOW; + scale: 1; + description { + state: "default" 0.0; + visible: 0; // only plug for unused bottom layout + } + } + + part { name: "elm.swallow.grid"; + type: SWALLOW; + scale: 1; + description { state: "default" 0.0; + align: 0.0 0.0; + fixed: 0 0; + visible: 1; + rel1 { + relative: 0 1; + to: "elm.swallow.layoutTop"; + } + rel2 { + relative: 1 1; + to: "bg"; + } + } + } + + part { name: "center_rect"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + color: 0 0 0 0; + min: 720 0; + max: 720 -1; + align: 0 0; + visible: 1; + rel1 { + to: "elm.swallow.layoutTop"; + relative: 0 1; + } + rel2 { + to: "bg"; + relative: 1 1; + } + } + description { state: "empty" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 229 229 229 255; + } + } + + part { name: "elm.swallow.big"; + type: SWALLOW; + scale: 1; + description { state: "default" 0.0; + min: BIG_TILE_WIDTH BIG_TILE_HEIGHT; + max: BIG_TILE_WIDTH BIG_TILE_HEIGHT; + align: 0.5 0.0; + fixed: 1 1; + visible: 1; + rel1 { + to: "center_rect"; + relative: 0 0; + offset: TILE_SEPARATOR 0; + } + rel2 { + relative: 1 1; + offset: 0 0; + } + } + description { state: "empty" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + + part { name: "elm.swallow.small_first"; + type: SWALLOW; + scale: 1; + description { state: "default" 0.0; + min: SMALL_TILE_WIDTH SMALL_TILE_HEIGHT; + max: SMALL_TILE_WIDTH SMALL_TILE_HEIGHT; + align: 0.0 0.0; + fixed: 1 1; + visible: 1; + rel1 { + to: "elm.swallow.big"; + relative: 0 1; + offset: 0 TILE_SEPARATOR; + } + rel2{ + to: "center_rect"; + relative: 1 1; + offset: 0 0; + } + } + description { state: "empty" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + + part { name: "elm.swallow.small_second"; + type: SWALLOW; + scale: 1; + description { state: "default" 0.0; + min: SMALL_TILE_WIDTH SMALL_TILE_HEIGHT; + max: SMALL_TILE_WIDTH SMALL_TILE_HEIGHT; + align: 0.0 0.0; + fixed: 1 1; + visible: 1; + rel1 { + to: "elm.swallow.small_first"; + relative: 1 0; + offset: TILE_SEPARATOR 0; + } + rel2{ + to: "center_rect"; + relative: 1 1; + offset: 0 0; + } + } + description { state: "empty" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + + part { name: "elm.swallow.small_third"; + type: SWALLOW; + scale: 1; + description { state: "default" 0.0; + min: SMALL_TILE_WIDTH SMALL_TILE_HEIGHT; + max: SMALL_TILE_WIDTH SMALL_TILE_HEIGHT; + align: 0.0 0.0; + fixed: 1 1; + visible: 1; + rel1 { + to: "elm.swallow.small_first"; + relative: 0 1; + offset: 0 TILE_SEPARATOR; + } + rel2 { + to: "center_rect"; + relative: 1 1; + offset: 0 0; + } + } + description { state: "empty" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + + part { name: "elm.swallow.small_fourth"; + type: SWALLOW; + scale: 1; + description { state: "default" 0.0; + min: SMALL_TILE_WIDTH SMALL_TILE_HEIGHT; + max: SMALL_TILE_WIDTH SMALL_TILE_HEIGHT; + align: 0.0 0.0; + fixed: 1 1; + visible: 1; + rel1 { + to: "elm.swallow.small_third"; + relative: 1 0; + offset: TILE_SEPARATOR 0; + } + rel2 { + to: "center_rect"; + relative: 1 1; + offset: 0 0; + } + } + description { state: "empty" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + + part { name: "elm.text.empty"; + type: TEXT; + scale: 1; + description { state: "default" 0.0; + visible: 0; + align: 0.5 0.5; + color: 0 0 0 179; + text { + text: "empty"; + font: "Sans"; + size: 32; + align: 0.5 0.5; + } + rel1 { + to: "bg"; + relative: 0.0 0.0; + } + rel2 { + to: "bg"; + relative: 1 1; + } + } + description { state: "empty" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + } + + programs { + program { name: "empty"; + signal: "empty,view"; + source: "quickaccess"; + action: STATE_SET "empty" 0.0; + target: "elm.swallow.big"; + target: "elm.swallow.small_first"; + target: "elm.swallow.small_second"; + target: "elm.swallow.small_third"; + target: "elm.swallow.small_fourth"; + target: "elm.text.empty"; + target: "center_rect"; + } + program { name: "not_empty"; + signal: "not,empty,view"; + source: "quickaccess"; + action: STATE_SET "default" 0.0; + target: "elm.text.empty"; + target: "center_rect"; + target: "elm.swallow.big"; + target: "elm.swallow.small_first"; + target: "elm.swallow.small_second"; + target: "elm.swallow.small_third"; + target: "elm.swallow.small_fourth"; + } + } +} + +group { name: "elm/button/base/big_tile"; + data.item: "texts" "page_title page_url"; + data.item: "contents" "elm.thumbnail"; + images { + image: "web_frame_selected.png" COMP; + image: "ico_bg_round_shape_37x37.png" COMP; + } + parts { + part { name: "bg"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { + relative: 0.0 0.0; to: "bg"; + } + rel2 { + relative: 1.0 1.0; to: "bg"; + } + visible: 1; + color: 231 231 231 255; + } + } + + part { name: "elm.thumbnail"; + type: SWALLOW; + scale: 1; + description { state: "default" 0.0; + fixed: 1 1; + align: 0.0 0.0; + color : 231 231 231 255; + min: BIG_TILE_WIDTH BIG_TILE_HEIGHT; // size adjusted to max thubnail with and height + max: BIG_TILE_WIDTH BIG_TILE_HEIGHT; + rel1 { + relative: 0.0 0.0; to: "bg"; + } + rel2 { + relative: 1.0 1.0; to: "bg"; + } + } + description { state: "selected"; + inherit: "default" 0.0; + } + } + + part { name: "border_top"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + color_class: focusBgColor; + min: 0 6; + max: -1 6; + align: 0 0; + rel1 { + to: "elm.thumbnail"; + relative: 0.0 0.0; + } + rel2 { + to: "elm.thumbnail"; + relative: 1.0 1.0; + } + visible: 0; + } + description { state: "selected"; + inherit: "default" 0.0; + visible: 1; + } + } + + part { name: "border_left"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + color_class: focusBgColor; + min: 6 0; + max: 6 -1; + align: 0 0; + rel1 { + to: "elm.thumbnail"; + relative: 0.0 0.0; + } + rel2 { + to: "elm.thumbnail"; + relative: 1.0 1.0; + } + visible: 0; + } + description { state: "selected"; + inherit: "default" 0.0; + visible: 1; + } + } + + part { name: "border_right"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + color_class: focusBgColor; + min: 6 0; + max: 6 -1; + align: 1 0; + rel1 { + to: "elm.thumbnail"; + relative: 0.0 0.0; + } + rel2 { + to: "elm.thumbnail"; + relative: 1.0 1.0; + } + visible: 0; + } + description { state: "selected"; + inherit: "default" 0.0; + visible: 1; + } + } + + part { name: "lb_bg"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + min: BIG_TILE_WIDTH TILE_LABEL_BG_HEIGHT; + max: BIG_TILE_WIDTH TILE_LABEL_BG_HEIGHT; + align: 0.0 1.0; + color: 113 128 147 255; + visible: 1; + rel1 { + to: "elm.thumbnail"; + relative: 0.0 0.0; + } + rel2 { + to: "elm.thumbnail"; + relative: 1.0 1.0; + } + } + description { state: "selected" 0.0; + inherit: "default" 0.0; + color: 0 119 246 255; + } + } + + part { name: "page_title"; + type: TEXT; + scale: 1; + description { state: "default" 0.0; + min: 584 34; + max: 584 34; + align: 0.0 0.0; + color: 255 255 255 255; + rel1 { + to: "lb_bg"; + relative: 0.0 0.0; + offset: 36 33; + } + rel2 { + to: "lb_bg"; + relative: 1.0 1.0; + } + text { + text: "Web page title"; + font: "Sans"; + size: 36; + align: 0 0.5; + } + } + } + + part { name: "page_url"; + type: TEXT; + scale: 1; + description { state: "default" 0.0; + visible: 0; + } + } + + part { name: "over"; + type: RECT; + scale: 1; + mouse_events: 1; + repeat_events: 1; + description { state: "default" 0.0; + color: 0 0 0 0; + rel1.to: "bg"; + rel2.to: "lb_bg"; + } + } + } + + programs{ + program { name: "mouse_in"; + signal: "mouse,in"; + source: "over"; + action: STATE_SET "selected" 0.0; + target: "lb_bg"; + target: "border_top"; + target: "border_left"; + target: "border_right"; + } + program { name: "mouse_out"; + signal: "mouse,out"; + source: "over"; + action: STATE_SET "default" 0.0; + target: "lb_bg"; + target: "border_top"; + target: "border_left"; + target: "border_right"; + } + program { + name: "mouse_click"; + signal: "mouse,clicked,1"; + source: "over"; + script { + emit("elm,action,click", ""); + } + } + } +} + +group { name: "elm/button/base/small_tile"; + data.item: "texts" "page_title page_url"; + data.item: "contents" "elm.thumbnail"; + images { + image: "web_frame_selected.png" COMP; + image: "ico_bg_round_shape_37x37.png" COMP; + } + parts { + part { name: "container"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + min: 378 320; + max: 378 320; + visible: 0; + } + } + + part { name: "bg"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + min: 378 294; + max: 378 294; + visible: 1; + color: 231 231 231 255; + align: 0.0 0.0; + rel1 { + relative: 0.0 0.0; to: "container"; + } + rel2 { + relative: 1.0 1.0; to: "container"; + } + } + } + + part { name: "elm.thumbnail"; + type: SWALLOW; + scale: 1; + description { state: "default" 0.0; + fixed: 1 0; + align: 0.0 0.0; + color : 231 231 231 255; + min: 378 292; // size adjusted to max thubnail with and height + max: 378 292; + rel1 { + relative: 0.0 0.0; to: "bg"; + } + rel2 { + relative: 1.0 1.0; to: "bg"; + } + } + description { state: "selected"; + inherit: "default" 0.0; + } + } + + part { name: "border_top"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + color_class: focusBgColor; + min: 0 6; + max: -1 6; + align: 0 0; + rel1 { + to: "elm.thumbnail"; + relative: 0.0 0.0; + } + rel2 { + to: "elm.thumbnail"; + relative: 1.0 1.0; + } + visible: 0; + } + description { state: "selected"; + inherit: "default" 0.0; + visible: 1; + } + } + + part { name: "border_left"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + color_class: focusBgColor; + min: 6 0; + max: 6 -1; + align: 0 0; + rel1 { + to: "elm.thumbnail"; + relative: 0.0 0.0; + } + rel2 { + to: "elm.thumbnail"; + relative: 1.0 1.0; + } + visible: 0; + } + description { state: "selected"; + inherit: "default" 0.0; + visible: 1; + } + } + + part { name: "border_right"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + color_class: focusBgColor; + min: 6 0; + max: 6 -1; + align: 1 0; + rel1 { + to: "elm.thumbnail"; + relative: 0.0 0.0; + } + rel2 { + to: "elm.thumbnail"; + relative: 1.0 1.0; + } + visible: 0; + } + description { state: "selected"; + inherit: "default" 0.0; + visible: 1; + } + } + + part { name: "lb_bg"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + min: 378 96; + max: 378 96; + align: 0.0 1.0; + color: 113 128 147 255; + visible: 1; + rel1 { + to: "bg"; + relative: 0.0 0.0; + } + rel2 { + relative: 1.0 1.0; + } + } + description { state: "selected" 0.0; + inherit: "default" 0.0; + color: 0 119 246 255; + } + } + + part { name: "page_title"; + type: TEXT; + scale: 1; + description { state: "default" 0.0; + min: 314 28; + max: 314 28; + align: 0.0 0.0; + color: 255 255 255 255; + rel1 { + to: "lb_bg"; + relative: 0.0 0.0; + offset: 32 18; + } + rel2 { + to: "lb_bg"; + relative: 1.0 1.0; + } + text { + text: "Web page title"; + font: "Sans"; + size: 28; + align: 0 0.0; + } + } + } + + part { name: "page_url"; + type: TEXT; + scale: 1; + description { state: "default" 0.0; + min: 314 24; + max: 314 24; + align: 0 0.0; + color: 255 255 255 255; + rel1 { + to: "page_title"; + relative: 0.0 1.0; + offset: 0 8; + } + rel2 { + to: "lb_bg"; + relative: 1.0 1.0; + } + text { + text: "Web page url"; + font: "Sans"; + size: 24; + align: 0 0.5; + } + } + } + + part { name: "over"; + type: RECT; + scale: 1; + mouse_events: 1; + repeat_events: 1; + description { state: "default" 0.0; + color: 0 0 0 0; + rel1.to: "bg"; + rel2.to: "lb_bg"; + } + } + } + + programs { + program { name: "mouse_in"; + signal: "mouse,in"; + source: "over"; + action: STATE_SET "selected" 0.0; + target: "lb_bg"; + target: "border_top"; + target: "border_left"; + target: "border_right"; + } + program { name: "mouse_out"; + signal: "mouse,out"; + source: "over"; + action: STATE_SET "default" 0.0; + target: "lb_bg"; + target: "border_top"; + target: "border_left"; + target: "border_right"; + } + program { + name: "mouse_click"; + signal: "mouse,clicked,1"; + source: "over"; + script { + emit("elm,action,click", ""); + } + } + } +} + +group { name: "elm/gengrid/item/grid_item/default"; + data.item: "texts" "page_title page_url"; + data.item: "contents" "elm.thumbnail elm.thumbButton"; + images { + image: "web_frame_selected.png" COMP; + image: "ico_bg_round_shape_37x37.png" COMP; + image: "ic_thumbnail_favorite_01.png" COMP; + } + parts { + part { name: "bg"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + min: 338 294; + max: 338 294; + visible: 1; + color: 231 231 231 255; + rel1.offset: -26 -26; + } + description { state: "selected"; + inherit: "default" 0.0; + color: 70 143 254 255; + } + } + + part { name: "elm.thumbnail"; + type: SWALLOW; + scale: 1; + description { state: "default" 0.0; + fixed: 1 0; + align: 0.0 0.0; + color : 231 231 231 255; + min: 338 198; + max: 338 198; + rel1 { + relative: 0.0 0.0; to: "bg"; + } + rel2 { + relative: 1.0 1.0; to: "bg"; + } + } + description { state: "selected"; + inherit: "default" 0.0; + } + } + + part { + name: "bookmark_thumbButton"; + type: IMAGE; + scale: 1; + mouse_events: 1; + repeat_events: 1; + description { + state: "default" 0.0; + visible: 1; + rel1.to: "elm.thumbnail"; + rel1.offset: 284 18; + rel1.relative: 0.0 0.0; + rel2.to: "elm.thumbnail"; + rel2.offset: 324 58; + rel2.relative: 0.0 0.0; + align: 0.0 0.0; + image.normal: "ic_thumbnail_favorite_01.png"; + } + } + + part { name: "focus_highlight"; + type: IMAGE; + scale: 1; + description { state: "default" 0.0; + rel1 { + to: "elm.thumbnail"; + relative: 0.0 0.0; + } + rel2 { + to: "elm.thumbnail"; + relative: 1.0 1.0; + } + image.normal: "web_frame_selected.png"; + image.border: 8 8 8 0; + image.border_scale: 1; + image.middle: NONE; + visible: 0; + } + description { state: "selected"; + inherit: "default" 0.0; + visible: 1; + } + } + + part { name: "background"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + min: 338 87; + max: 338 87; + align: 0.0 0.0; + color: 231 231 231 255; + rel1 { + to: "elm.thumbnail"; + relative: 0.0 1.0; + } + rel2 { + relative: 1.0 1.0; + } + } + description { state: "selected" 0.0; + inherit: "default" 0.0; + color: 70 143 254 255; + } + } + + part { name: "page_title"; + type: TEXT; + scale: 1; + description { state: "default" 0.0; + min: 300 48; + max: 300 48; + align: 0.0 0.5; + color: 51 51 51 255; + rel1 { + to: "background"; + relative: 0.0 0.0; + offset: 17 0; + } + rel2 { + to: "background"; + relative: 1.0 1.0; + } + text { + text: "Web page title"; + font: "Sans"; + size: 27; + align: 0 0.5; + } + } + } + + part { name: "page_url"; + type: TEXT; + scale: 1; + description { state: "default" 0.0; + min: 300 48; + max: 300 48; + align: 0 0.5; + color: 153 153 153 255; + rel1 { + to: "page_title"; + relative: 0.0 1.0; + } + rel2 { + to: "page_title"; + relative: 1.0 1.0; + } + text { + text: "Web page url"; + font: "Sans"; + size: 24; + align: 0 0.5; + } + } + } + + part { name: "elm.thumbButton"; + type: SWALLOW; + scale: 1; + description { state: "default" 0.0; + rel1.to: "elm.thumbnail"; + rel2.to: "elm.thumbnail"; + } + } + + part { name: "over"; + type: RECT; + scale: 1; + mouse_events: 1; + repeat_events: 1; + description { state: "default" 0.0; + color: 0 0 0 0; + rel1.to: "bg"; + rel2.to: "background"; + } + } + } + + programs{ + program { name: "mouse_in"; + signal: "mouse,in"; + source: "over"; + action: STATE_SET "selected" 0.0; + target: "background"; + target: "focus_highlight"; + target: "bg"; + } + program { name: "mouse_out"; + signal: "mouse,out"; + source: "over"; + action: STATE_SET "default" 0.0; + target: "background"; + target: "focus_highlight"; + target: "bg"; + } + } +} + +group { name: "top_button_item"; + data.item: "texts" "mostvisited_text bookmark_text"; + data.item: "contents" "mostvisited_click bookmark_click"; + parts{ + part { + name: "bg_clipper"; + scale:1; + mouse_events: 1; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + color: 0 0 0 0; + align: 0 0; + rel1 { relative: 0.0 0.0;} + rel2 { relative: 1.0 1.0;} + } + } + part { + name: "mostvisited_button"; + mouse_events: 1; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + visible: 1; + fixed: 1 1; + color: 192 192 192 255; + align: 0 0; + min: 300 64; + max: 300 64; + rel1 { relative: 0.0 0.0; to: "bg_clipper"; offset: 20 58;} + rel2 { relative: 1.0 1.0; to: "bg_clipper"; } + } + description { + state: "highlight" 0.0; + inherit: "default" 0.0; + color_class: focusBgColor; + visible: 1; + } + } + part{ + name: "mostvisited_text"; + type: TEXT; + scale: 1; + description { state: "default" 0.0; + visible: 1; + fixed: 1 1; + rel1 { relative: 0.0 0.0;to: "mostvisited_button";} + rel2 { relative: 1.0 1.0;to: "mostvisited_button";} + color: 0 0 0 255; + text { + text: "Most visited"; + font: "Sans"; + size: 27; + align: 0.5 0.5; + } + } + } + part { + name: "mostvisited_over"; + scale:1; + type: RECT; + mouse_events: 1; + description { + state: "default" 0.0; + visible: 1; + align: 0 0; + fixed: 1 1; + rel1 { relative: 0.0 0.0; to: "mostvisited_button";} + rel2 { relative: 1.0 1.0; to: "mostvisited_button";} + color_class: transparent; + } + } + part { + name: "mostvisited_click"; + scale:1; + type: SWALLOW; + mouse_events: 1; + description { + state: "default" 0.0; + visible: 1; + align: 0 0; + fixed: 1 1; + rel1 { relative: 0.0 0.0; to: "mostvisited_button";} + rel2 { relative: 1.0 1.0; to: "mostvisited_button";} + } + } + part { + name: "bookmark_button"; + scale:1; + mouse_events: 1; + type: RECT; + description { + state: "default" 0.0; + visible: 1; + fixed: 1 1; + color: 192 192 192 255; + align: 0 0; + min: 300 64; + max: 300 64; + rel1 { relative: 0.0 0.0; to: "bg_clipper"; offset: 600 58;} + rel2 { relative: 1.0 1.0; to: "bg_clipper"; } + } + description { + state: "highlight" 0.0; + inherit: "default" 0.0; + color_class: focusBgColor; + visible: 1; + } + } + part{ + name: "bookmark_text"; + type: TEXT; + scale: 1; + description { state: "default" 0.0; + visible: 1; + fixed: 1 1; + rel1 { relative: 0.0 0.0;to: "bookmark_button";} + rel2 { relative: 1.0 1.0;to: "bookmark_button";} + color: 0 0 0 255; + text { + text: "Bookmark"; + font: "Sans"; + size: 27; + align: 0.5 0.5; + } + } + } + part { + name: "bookmark_over"; + scale:1; + type: RECT; + mouse_events: 1; + description { + state: "default" 0.0; + visible: 1; + align: 0 0; + fixed: 1 1; + rel1 { relative: 0.0 0.0; to: "bookmark_button";} + rel2 { relative: 1.0 1.0; to: "bookmark_button";} + color_class: transparent; + } + } + part { + name: "bookmark_click"; + scale:1; + type: SWALLOW; + mouse_events: 1; + description { + state: "default" 0.0; + visible: 1; + align: 0 0; + fixed: 1 1; + rel1 { relative: 0.0 0.0; to: "bookmark_button";} + rel2 { relative: 1.0 1.0; to: "bookmark_button";} + color_class: transparent; + } + } + + programs{ + program { + name: "mouse_click_mostvisited"; + signal: "mouse,clicked,1"; + source: "mostvisited_over"; + script { + emit("elm,action,click", ""); + } + } + program { + name: "mouse_in_mostvisited_click"; + signal: "mouse,in"; + source: "mostvisited_*"; + action: STATE_SET "highlight" 0.0; + target: "mostvisited_button"; + target: "mostvisited_over"; + target: "mostvisited_text"; + } + program { + name: "mouse_out_mostvisited_click"; + signal: "mouse,out"; + source: "mostvisited_*"; + action: STATE_SET "default" 0.0; + target: "mostvisited_button"; + target: "mostvisited_over"; + target: "mostvisited_text"; + } + program { + name: "mouse_click_bookmark"; + signal: "mouse,clicked,1"; + source: "bookmark_over"; + script { + emit("elm,action,click", ""); + } + } + program { + name: "mouse_in_bookmark_click"; + signal: "mouse,in"; + source: "bookmark_*"; + action: STATE_SET "highlight" 0.0; + target: "bookmark_button"; + target: "bookmark_over"; + target: "bookmark_text"; + } + program { + name: "mouse_out_bookmark_click"; + signal: "mouse,out"; + source: "bookmark_*"; + action: STATE_SET "default" 0.0; + target: "bookmark_button"; + target: "bookmark_over"; + target: "mostvisited_text"; + } + } + } +} + +group { name: "bottom_button_item"; + min: 1920 181; + max: 1920 181; + data.item: "texts" "bookmarkmanager_text"; + data.item: "contents" "bookmarkmanager_click"; + parts{ + part { + name: "bg_clipper"; + scale:1; + mouse_events: 1; + type: RECT; + description { + state: "default" 0.0; + color: 255 255 255 255; + align: 0 0; + min: 1920 181; + max: 1920 181; + rel1 { relative: 0.0 0.0;} + rel2 { relative: 1.0 1.0;} + } + } + part { + name: "bookmarkmanager_button"; + scale:1; + mouse_events: 1; + type: RECT; + description { + state: "default" 0.0; + visible: 1; + fixed: 1 1; + align: 0 0; + min: 348 65; + max: 348 65; + color: 192 192 192 255; + rel1 { relative: 0.0 0.0; to: "bg_clipper"; offset: 786 58;} + rel2 { relative: 1.0 1.0; to: "bg_clipper"; } + } + description { + state: "highlight" 0.0; + inherit: "default" 0.0; + color_class: focusBgColor; + visible: 1; + } + } + part{ + name: "bookmarkmanager_text"; + type: TEXT; + scale: 1; + description { state: "default" 0.0; + visible: 1; + fixed: 1 1; + rel1 { relative: 0.0 0.0;to: "bookmarkmanager_button";} + rel2 { relative: 1.0 1.0;to: "bookmarkmanager_button";} + color: 0 0 0 255; + text { + text: "Bookmark Manager"; + font: "Sans"; + size: 27; + align: 0.5 0.5; + } + } + } + part { + name: "bookmarkmanager_over"; + scale:1; + type: RECT; + mouse_events: 1; + description { + state: "default" 0.0; + visible: 1; + align: 0 0; + fixed: 1 1; + min: 348 65; + max: 348 65; + rel1 { relative: 0.0 0.0; to: "bookmarkmanager_button";} + rel2 { relative: 1.0 1.0; to: "bookmarkmanager_button";} + color_class: transparent; + } + } + part { + name: "bookmarkmanager_click"; + scale:1; + type: SWALLOW; + mouse_events: 1; + description { + state: "default" 0.0; + visible: 1; + align: 0 0; + fixed: 1 1; + min: 348 65; + max: 348 65; + rel1 { relative: 0.0 0.0; to: "bookmarkmanager_over";} + rel2 { relative: 1.0 1.0; to: "bookmarkmanager_over";} + } + } + } + programs{ + program { + name: "mouse_click_bookmarkmanager"; + signal: "mouse,clicked,1"; + source: "bookmarkmanager_over"; + script { + emit("elm,action,click", ""); + } + } + program { + name: "mouse_in_bookmarkmanager_click"; + signal: "mouse,in"; + source: "bookmarkmanager_*"; + action: STATE_SET "highlight" 0.0; + target: "bookmarkmanager_button"; + target: "bookmarkmanager_over"; + target: "bookmarkmanager_text"; + } + program { + name: "mouse_out_bookmarkmanager_click"; + signal: "mouse,out"; + source: "bookmarkmanager_*"; + action: STATE_SET "default" 0.0; + target: "bookmarkmanager_button"; + target: "bookmarkmanager_over"; + target: "bookmarkmanager_text"; + } + } + } +} diff --git a/services/SimpleUI/SimpleUI.cpp b/services/SimpleUI/SimpleUI.cpp index 1e436f1..461d89a 100644 --- a/services/SimpleUI/SimpleUI.cpp +++ b/services/SimpleUI/SimpleUI.cpp @@ -41,7 +41,6 @@ #include "Tools/EflTools.h" #include "BrowserImage.h" #include "HistoryItem.h" -#include "BookmarkItem.h" #include "boost/date_time/gregorian/gregorian.hpp" #include "boost/date_time/posix_time/posix_time.hpp" #include "SqlStorage.h" @@ -75,6 +74,13 @@ SimpleUI::SimpleUI() { BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); elm_init(0, nullptr); + + config::DefaultConfig config; + config.load(""); + if (config.isMobileProfile()) { + elm_config_scale_set(boost::any_cast(config.get("mobile_scale"))); + } + Evas_Object *main_window = elm_win_util_standard_add("browserApp", "browserApp"); if (main_window == nullptr) BROWSER_LOGE("Failed to create main window"); diff --git a/services/WebPageUI/CMakeLists.txt b/services/WebPageUI/CMakeLists.txt index 6171eae..802541a 100644 --- a/services/WebPageUI/CMakeLists.txt +++ b/services/WebPageUI/CMakeLists.txt @@ -11,17 +11,6 @@ set(WebPageUI_SRCS UrlHistoryList/GenlistItemsManager.cpp ) -set(WebPageUI_HEADERS - WebPageUI.h - ButtonBar.h - URIEntry.h - UrlHistoryList/UrlHistoryList.h - UrlHistoryList/GenlistManager.h - UrlHistoryList/GenlistManagerCallbacks.h - UrlHistoryList/UrlMatchesStyler.h - UrlHistoryList/GenlistItemsManager.h - ) - include(Coreheaders) include(EFLHelpers) include(EWebKitHelpers) @@ -62,19 +51,31 @@ install(TARGETS ${PROJECT_NAME} include(EDCCompile) #please do not add edc/ directory -set(edcFiles - WebPageUI.edc - ErrorMessage.edc - LeftButtonBar.edc - RightButtonBar.edc - URIEntry.edc - PrivateMode.edc - UrlHistoryList.edc - ) +if (${PROFILE} MATCHES "mobile") # mobile profile + set(edcFiles + WebPageUI_mob.edc + ErrorMessage.edc + LeftButtonBar_mob.edc + RightButtonBar_mob.edc + URIEntry_mob.edc + PrivateMode.edc + UrlHistoryList.edc + ) +else (${PROFILE} MATCHES "mobile") # tv profile + set(edcFiles + WebPageUI.edc + ErrorMessage.edc + LeftButtonBar.edc + RightButtonBar.edc + URIEntry.edc + PrivateMode.edc + UrlHistoryList.edc + ) +endif (${PROFILE} MATCHES "mobile") foreach(edec ${edcFiles}) - string(REPLACE ".edc" ".edj" target_name ${edec}) + string(REGEX REPLACE "(_mob)?.edc" ".edj" target_name ${edec}) EDJ_TARGET(${target_name} - ${CMAKE_CURRENT_SOURCE_DIR}/edc/${edec} - ${CMAKE_CURRENT_BINARY_DIR}) + ${CMAKE_CURRENT_SOURCE_DIR}/edc/${edec} + ${CMAKE_CURRENT_BINARY_DIR}) endforeach(edec) diff --git a/services/WebPageUI/edc/LeftButtonBar_mob.edc b/services/WebPageUI/edc/LeftButtonBar_mob.edc new file mode 100644 index 0000000..76de12f --- /dev/null +++ b/services/WebPageUI/edc/LeftButtonBar_mob.edc @@ -0,0 +1,103 @@ +#include "ImageButton.edc" +#include "Spacer.edc" + +collections { + + FOUR_STATE_IMAGE_BUTTON("browser/toolbar_prev", 64, 64, "btn_bar_back_nor_mob.png") + + FOUR_STATE_IMAGE_BUTTON("browser/toolbar_next", 64, 64, "btn_bar_forward_nor_mob.png") + + FOUR_STATE_IMAGE_BUTTON("browser/toolbar_reload", 64, 64, "btn_bar_reload_nor_mob.png") + + FOUR_STATE_IMAGE_BUTTON("browser/toolbar_stop", 64, 64, "btn_bar_stop_nor_mob.png") + + group { + name: "left_button_bar"; + + parts { + + part { + name: "prev_button"; + type : SWALLOW; + scale: 1; + description { + state: "default" 0.0; + visible: 1; + align: 0.0 0.0; + fixed: 1 1; + min: 64 64; + max: 64 64; + rel1 { relative: 0.0 0.0; } + rel2 { relative: 0.0 0.0; } + } + description { + state: "hidden" 0.0; + inherit: "default" 0.0; + visible: 0; + } + description { + state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + + ADD_SPACER("spacer_1", "prev_button", 10, 64) + + part { + name: "next_button"; + type : SWALLOW; + scale: 1; + description { + state: "default" 0.0; + visible: 1; + align: 0.0 0.0; + fixed: 1 1; + min: 64 64; + max: 64 64; + rel1 { relative: 1.0 0.0; to: "spacer_1"; } + rel2 { relative: 0.0 0.0; } + } + description { + state: "hidden" 0.0; + inherit: "default" 0.0; + visible: 0; + } + description { + state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + + ADD_SPACER("spacer_2", "next_button", 10, 64) + + part { + name: "refresh_stop_button"; + type : SWALLOW; + scale: 1; + description { + state: "default" 0.0; + visible: 1; + align: 0.0 0.0; + fixed: 1 1; + min: 64 64; + max: 64 64; + rel1 { relative: 1.0 0.0; to: "spacer_2"; } + rel2 { relative: 0.0 0.0; } + } + description { + state: "hidden" 0.0; + inherit: "default" 0.0; + visible: 0; + } + description { + state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + + } +} +} diff --git a/services/WebPageUI/edc/RightButtonBar_mob.edc b/services/WebPageUI/edc/RightButtonBar_mob.edc new file mode 100644 index 0000000..426c337 --- /dev/null +++ b/services/WebPageUI/edc/RightButtonBar_mob.edc @@ -0,0 +1,86 @@ +#include "ImageButton.edc" +#include "Spacer.edc" +collections { + FOUR_STATE_IMAGE_BUTTON("browser/toolbar_tab", 64, 64, "btn_bar_manager_nor_mob.png") + FOUR_STATE_IMAGE_BUTTON("browser/toolbar_setting", 64, 64, "btn_bar_more_nor_mob.png") + group { + name: "right_button_bar"; + parts { + part { + name: "tab_button"; + type : SWALLOW; + scale: 1; + description { + state: "default" 0.0; + visible: 1; + fixed: 1 1; + align: 0.0 0.0; + min: 70 70; + max: 70 70; + rel1 { relative: 0.0 0.0; } + rel2 { relative: 0.0 0.0; } + } + description { + state: "hidden" 0.0; + inherit: "default" 0.0; + visible: 0; + } + description { + state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { + name: "tabs_number"; + type: TEXT; + scale: 1; + repeat_events: 1; + description{ + state: "default" 0.0; + visible: 1; + fixed: 1 1; + align: 0.0 0.0; + min: 70 70; + max: 70 70; + color: 86 86 86 255; + rel1 { relative: 0.0 0.0; to: "tab_button"; } + rel2 { relative: 1.0 1.0; to: "tab_button"; } + text { + text: ""; + font: "Tizen:style=Bold"; + size: 19; + align: 0.5 0.5; + } + } + } + ADD_SPACER("spacer_1", "tab_button", 10, 70) + part { + name: "setting_button"; + type : SWALLOW; + scale: 1; + description { + state: "default" 0.0; + visible: 1; + fixed: 1 1; + align: 0.0 0.0; + min: 70 70; + max: 70 70; + fixed: 1 1; + rel1 { relative: 1.0 0.0; to: "spacer_1"; } + rel2 { relative: 0.0 0.0; } + } + description { + state: "hidden" 0.0; + inherit: "default" 0.0; + visible: 0; + } + description { + state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + } +} +} diff --git a/services/WebPageUI/edc/URIEntry_mob.edc b/services/WebPageUI/edc/URIEntry_mob.edc new file mode 100644 index 0000000..34bbcb7 --- /dev/null +++ b/services/WebPageUI/edc/URIEntry_mob.edc @@ -0,0 +1,269 @@ +#define URI_INPUTBOX_LENGTH 518 +#define URI_INPUTBOX_LENGTH_SMALL 320 +#define URI_INPUTBOX_WIDTH 64 +collections { + group { + name: "elm/entry/selection/browser_entry"; + parts { + part { + name: "bg"; + scale:1; + type: RECT; + mouse_events: 0; + description { + state: "default" 0.0; + color: 255 255 255 255; + } + } + } + } + group { + name: "elm/entry/cursor/browser_entry"; + parts { + part { + name: "bg"; + scale:1; + type: RECT; + mouse_events: 0; + description { + state: "default" 0.0; + color: 22 120 237 255; + min: 2 36; + max: 2 36; + visible: 0; + } + description { + state: "focused" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + } + programs { + program { + name: "focused"; + signal: "elm,action,focus"; + source: "elm"; + action: STATE_SET "focused" 0.0; + target: "bg"; + } + program { + name: "unfocused"; + signal: "elm,action,unfocus"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "bg"; + } + } + } + group { + name: "elm/entry/base-single/uri_entry"; + styles { + style { + name: "browser-entry-uri-style-unselected"; + base: "font=Sans:style=SVD_Medium font_size="42" wrap=none color=#969696"; + } + style { + name: "browser-entry-uri-style-selected"; + base: "font=Sans:style=SVD_Medium font_size="42" wrap=none color=#4088d3"; + } + } + data { + item: focus_highlight "off"; + } + parts { + + part { + name: "bg"; + scale:1; + type: RECT; + mouse_events: 0; + description { + state: "default" 0.0; + color: 255 255 255 255; + } + } + + part { + name: "elm.guide"; + scale:1; + type: TEXTBLOCK; + mouse_events: 0; + description { + state: "default" 0.0; + rel1.relative: 0.0 0.0; + rel2.relative: 1.0 1.0; + align: 0.0 0.0; + text { + style: "browser-entry-uri-style-unselected"; + min: 0 1; + } + } + description { + state: "hidden" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + part { + name: "label.text.clip"; + scale:1; + type: RECT; + description { + state: "default" 0.0; + } + } + part { + name: "elm.text"; + scale:1; + multiline: 0; + entry_mode: EDITABLE; + select_mode: DEFAULT; + cursor_mode: BEFORE; + type: TEXTBLOCK; + clip_to: "label.text.clip"; + source: "elm/entry/selection/browser_entry"; + source4: "elm/entry/cursor/browser_entry"; + description { + max: URI_INPUTBOX_LENGTH 82; + state: "default" 0.0; + rel1.relative: 0.0 0.0; + rel2.relative: 1.0 1.0; + align: 0.0 0.0; + text { + style: "browser-entry-uri-style-selected"; + min: 0 1; + } + } + } + } + programs { + program { + name: "focus"; + signal: "load"; + source: ""; + action: FOCUS_SET; + target: "elm.text"; + } + program { + name: "gdisabled"; + signal: "elm,guide,disabled"; + source: "elm"; + action: STATE_SET "hidden" 0.0; + target: "elm.guide"; + } + program { + name: "genabled"; + signal: "elm,guide,enabled"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "elm.guide"; + } + } + }//group + + group { + name: "elm/button/base/entry_btn"; + parts { + part { + name: "bg"; + type: RECT; + description { + state: "default" 0.0; + color: 0 0 0 0; + visible: 1; + } + } + } + programs { + program { + name: "mouse_click"; + signal: "mouse,clicked,1"; + source: "bg"; + script { + emit("elm,action,click", ""); + } + } + } + } + + + group { + name: "uri_entry_layout"; + parts { + part { + name: "uri_entry_swallow"; + type : SWALLOW; + scale: 1; + description { + state: "default" 0.0; + visible: 1; + color: 255 255 255 255; + align: 0.0 0.0; + min: URI_INPUTBOX_LENGTH URI_INPUTBOX_WIDTH; + max: URI_INPUTBOX_LENGTH URI_INPUTBOX_WIDTH; + fixed: 1 1; + rel1 { relative: 0 0; } + rel2 { relative: 1 1; } + } + description { + state: "moveright" 0.0; + inherit: "default" 0.0; + visible: 1; + min: URI_INPUTBOX_LENGTH_SMALL URI_INPUTBOX_WIDTH; + max: URI_INPUTBOX_LENGTH_SMALL URI_INPUTBOX_WIDTH; + } + description { + state: "hidden" 0.0; + inherit: "default" 0.0; + visible: 0; + } + description { + state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { + name: "over"; + type: RECT; + mouse_events: 1; + repeat_events: 1; + description { + state: "default" 0.0; + color: 0 0 0 0; + rel1 { relative: 0 0; } + rel2 { relative: 1 1; } + } + } + part { + name: "uri_entry_btn"; + type: SWALLOW; + mouse_events: 1; + repeat_events: 1; + description { + state: "default" 0.0; + visible: 1; + rel1.to: "uri_entry_swallow"; + rel2.to: "uri_entry_swallow"; + } + } + } + programs { + program { + name: "shiftright_uribarbg"; + signal: "shiftright_uribg"; + source: "ui"; + action: STATE_SET "moveright" 0.0; + target: "uri_entry_swallow"; + } + program { + name: "shiftback_uribarbg"; + signal: "shiftback_uribg"; + source: "ui"; + action: STATE_SET "default" 0.0; + target: "uri_entry_swallow"; + } + } + } +} diff --git a/services/WebPageUI/edc/WebPageUI.edc b/services/WebPageUI/edc/WebPageUI.edc index ae1edaf..4ef11bd 100644 --- a/services/WebPageUI/edc/WebPageUI.edc +++ b/services/WebPageUI/edc/WebPageUI.edc @@ -128,27 +128,17 @@ collections { } } ADD_SPACER("right_spacer", "uri_bar_buttons_right", 74, 102) - part { - name: "web_view"; - type : SWALLOW; - scale: 1; - description { - state: "default" 0.0; - visible: 1; - align: 0.0 0.0; - fixed: 0 0; - rel1 { relative: 0.0 1.0; to: "uri_bar_bg"; } - rel2 { relative: 1.0 1.0; } - } - description { - state: "hidden" 0.0; - inherit: "default" 0.0; - visible: 0; - } + part { + name: "web_view"; + type : SWALLOW; + scale: 1; description { - state: "visible" 0.0; - inherit: "default" 0.0; + state: "default" 0.0; visible: 1; + align: 0.0 0.0; + fixed: 0 0; + rel1 { relative: 0.0 1.0; to: "uri_bar_bg"; } + rel2 { relative: 1.0 1.0; } } } part { @@ -236,22 +226,6 @@ collections { visible: 1; } } - part{ - name: "web_title_bar"; - type: SWALLOW; - scale: 1; - description { - state: "default" 0.0; - min: 1920 87; - max: 1920 87; - fixed: 1 1; - align: 0 1; - rel1 { to: "web_view"; relative: 0.0 1.0; } - rel2 { to: "web_view"; relative: 1.0 1.0; } - } - } - - part { name: "popup_bg"; type: RECT; diff --git a/services/WebPageUI/edc/WebPageUI_mob.edc b/services/WebPageUI/edc/WebPageUI_mob.edc new file mode 100644 index 0000000..701aeac --- /dev/null +++ b/services/WebPageUI/edc/WebPageUI_mob.edc @@ -0,0 +1,215 @@ +#define URI_LENGTH 518 +#define URI_LENGTH_SHORT 320 +#define URI_WIDTH 64 +#define URI_BG_HEIGHT 108 +#define URI_BG_WIDTH 720 +#include "Spacer.edc" + +collections { + group { + name: "main_layout"; + parts { + part { + name: "uri_bar_bg"; + type : RECT; + scale: 1; + description { + state: "default" 0.0; + visible: 1; + fixed: 1 1; + align: 0 0; + min: URI_BG_WIDTH URI_BG_HEIGHT; + max: URI_BG_WIDTH URI_BG_HEIGHT; + color: 255 255 255 255; + rel1 { relative: 0.0 0.0; } + rel2 { relative: 1.0 0.0; } + } + } + ADD_SPACER_OVER("left_spacer", "uri_bar_bg", 32, URI_BG_HEIGHT) + part { + name: "uri_bar_buttons_left"; + type : SWALLOW; + scale: 1; + description { + state: "default" 0.0; + visible: 1; + align: 0 0.5; + min: 196 64; + max: 196 64; + fixed: 1 1; + rel1 { relative: 1.0 1.0; to: "left_spacer"; } + rel2 { relative: 0.0 0.0; to: "left_spacer"; } + } + description { + state: "hidden" 0.0; + inherit: "default" 0.0; + visible: 0; + } + description { + state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + ADD_SPACER("left_buttons_spacer", "uri_bar_buttons_left", 0.5, 102) + part { + name: "uri_entry"; + type : SWALLOW; + scale: 1; + description { + state: "default" 0.0; + visible: 1; + align: 0.0 0.5; + min: URI_LENGTH URI_WIDTH; + max: URI_LENGTH URI_WIDTH; + fixed: 1 1; + rel1 { relative: 1.0 0.5; to: "left_spacer"; } + rel2 { relative: 1.0 0.5; to: "left_spacer"; } + } + description { + state: "moveright" 0.0; + inherit: "default" 0.0; + visible: 1; + min: URI_LENGTH_SHORT URI_WIDTH; + max: URI_LENGTH_SHORT URI_WIDTH; + rel1 { relative: 1.0 0.5; to: "left_buttons_spacer"; } + rel2 { relative: 1.0 0.5; to: "left_buttons_spacer"; } + } + description { + state: "hidden" 0.0; + inherit: "default" 0.0; + visible: 0; + } + description { + state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + ADD_SPACER("right_buttons_spacer", "uri_entry", 24, URI_BG_HEIGHT) + part { + name: "uri_bar_buttons_right"; + type : SWALLOW; + scale: 1; + description { + state: "default" 0.0; + visible: 1; + align: 0.0 0.5; + min: 130 64; + max: 130 64; + fixed: 1 1; + rel1 { relative: 1.0 0.5; to: "right_buttons_spacer"; } + rel2 { relative: 1.0 0.5; to: "right_buttons_spacer"; } + } + description { + state: "hidden" 0.0; + inherit: "default" 0.0; + visible: 0; + } + description { + state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { + name: "TEST_web_view"; + type : RECT; + scale: 1; + description { + color: 0 255 0 255; + state: "default" 0.0; + visible: 1; + align: 0.0 0.0; + fixed: 1 1; + rel1 { relative: 0.0 1.0; to: "uri_bar_bg"; } + rel2 { relative: 1.0 1.0; } + } + } + part { + name: "web_view"; + type : SWALLOW; + scale: 1; + description { + state: "default" 0.0; + visible: 1; + align: 0.0 0.0; + fixed: 1 1; + rel1 { relative: 0.0 1.0; to: "uri_bar_bg"; } + rel2 { relative: 1.0 1.0; } + } + } + part { + name: "progress_bar"; + type: SWALLOW; + scale: 1; + description { + state: "default" 0.0; + visible: 1; + align: 0.0 0.0; + fixed: 0 0; + min: URI_BG_WIDTH 2; + max: URI_BG_WIDTH 2; + rel1 { + relative: 0.0 0.0; + offset: 0 1; + to: "web_view"; + } + rel2 { relative: 1.0 1.0; } + } + } + part { + name: "progress_bar_light_bg"; + type: RECT; + repeat_events: 1; + description { + state: "default" 0.0; + fixed: 1 1; + min: 0 8; + max: URI_BG_WIDTH 8; + align: 0 0; + visible: 0; + rel1.to: "web_view"; + rel1.relative: 0.0 0.0; + rel2.relative: 1.0 0.0; + color: 69 143 255 55; + } + description { + state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + } + programs { + program { + name: "shiftright_uribar"; + signal: "shiftright_uri"; + source: "ui"; + action: STATE_SET "moveright" 0.0; + target: "uri_entry"; + } + program { + name: "shiftback_uribar"; + signal: "shiftback_uri"; + source: "ui"; + action: STATE_SET "default" 0.0; + target: "uri_entry"; + } + program { + name: "hide_progress"; + signal: "hide_progressbar_bg"; + source: "ui"; + action: STATE_SET "default" 0.0; + target: "progress_bar_light_bg"; + } + program { + name: "show_progress"; + signal: "show_progressbar_bg"; + source: "ui"; + action: STATE_SET "visible" 0.0; + target: "progress_bar_light_bg"; + } + } + } +} diff --git a/services/WebPageUI/images/btn_bar_back_nor_mob.png b/services/WebPageUI/images/btn_bar_back_nor_mob.png new file mode 100644 index 0000000..3293745 Binary files /dev/null and b/services/WebPageUI/images/btn_bar_back_nor_mob.png differ diff --git a/services/WebPageUI/images/btn_bar_forward_nor_mob.png b/services/WebPageUI/images/btn_bar_forward_nor_mob.png new file mode 100644 index 0000000..e1c95ed Binary files /dev/null and b/services/WebPageUI/images/btn_bar_forward_nor_mob.png differ diff --git a/services/WebPageUI/images/btn_bar_manager_nor_mob.png b/services/WebPageUI/images/btn_bar_manager_nor_mob.png new file mode 100644 index 0000000..542b127 Binary files /dev/null and b/services/WebPageUI/images/btn_bar_manager_nor_mob.png differ diff --git a/services/WebPageUI/images/btn_bar_more_nor_mob.png b/services/WebPageUI/images/btn_bar_more_nor_mob.png new file mode 100644 index 0000000..a342002 Binary files /dev/null and b/services/WebPageUI/images/btn_bar_more_nor_mob.png differ diff --git a/services/WebPageUI/images/btn_bar_reload_nor_mob.png b/services/WebPageUI/images/btn_bar_reload_nor_mob.png new file mode 100644 index 0000000..28a77ee Binary files /dev/null and b/services/WebPageUI/images/btn_bar_reload_nor_mob.png differ diff --git a/services/WebPageUI/images/btn_bar_stop_nor_mob.png b/services/WebPageUI/images/btn_bar_stop_nor_mob.png new file mode 100644 index 0000000..7c4cc8e Binary files /dev/null and b/services/WebPageUI/images/btn_bar_stop_nor_mob.png differ