From: Kamil Nowac Date: Thu, 15 Oct 2015 11:03:20 +0000 (+0200) Subject: Add incognito screen and icon to the url bar X-Git-Tag: submit/tizen_tv/20151020.234143~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0faeda4443c973339e07e41bafbb61ce32bb48e2;p=profile%2Ftv%2Fapps%2Fweb%2Fbrowser.git Add incognito screen and icon to the url bar [Issue] https://bugs.tizen.org/jira/browse/TT-185 [Problem] Incognito screen and icons are not implemented [Solution] Added screen and icons [Verification] 1. Open incognito tab Incognito start screen and incognito icon should be visible in the url bar Change-Id: I18cf592433ebedd5e6a85b1b5d7809f1e4802562 --- diff --git a/core/AbstractWebEngine/AbstractWebEngine.h b/core/AbstractWebEngine/AbstractWebEngine.h index 22e9c55..554c115 100644 --- a/core/AbstractWebEngine/AbstractWebEngine.h +++ b/core/AbstractWebEngine/AbstractWebEngine.h @@ -198,8 +198,30 @@ public: */ virtual void setPrivateMode(bool) = 0; + /** + * Set the state of private mode for a specific tab + * + * \param id of snapshot + * \param state to set + */ + virtual void setPrivateMode(const TabId&, bool) = 0; + + /** + * Get the state of private mode + */ virtual bool isPrivateMode() const = 0; + /** + * Get the state of private mode for a specific tab + * + * /param id of snapshot + * /return state of private mode where: + * -1 is "Not set" + * 0 is "False" + * 1 is "True" + */ + virtual int isPrivateMode(const TabId&) = 0; + virtual bool isLoadError() const = 0; /** diff --git a/services/SimpleUI/SimpleUI.cpp b/services/SimpleUI/SimpleUI.cpp index bf02679..084de51 100644 --- a/services/SimpleUI/SimpleUI.cpp +++ b/services/SimpleUI/SimpleUI.cpp @@ -71,6 +71,7 @@ SimpleUI::SimpleUI() , m_initialised(false) , m_wvIMEStatus(false) , m_ewkContext(ewk_context_new()) + , m_incognito(false) { BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); elm_init(0, nullptr); @@ -245,6 +246,7 @@ void SimpleUI::connectUISignals() m_webPageUI->reloadPage.connect(boost::bind(&tizen_browser::basic_webengine::AbstractWebEngine::reload, m_webEngine.get())); m_webPageUI->showQuickAccess.connect(boost::bind(&SimpleUI::showQuickAccess, this)); m_webPageUI->hideQuickAccess.connect(boost::bind(&QuickAccess::hideUI, m_quickAccess)); + m_webPageUI->bookmarkManagerClicked.connect(boost::bind(&SimpleUI::showBookmarkManagerUI, this)); M_ASSERT(m_quickAccess.get()); @@ -258,9 +260,11 @@ void SimpleUI::connectUISignals() M_ASSERT(m_tabUI.get()); m_tabUI->closeTabUIClicked.connect(boost::bind(&SimpleUI::closeTabUI, this)); m_tabUI->newTabClicked.connect(boost::bind(&SimpleUI::newTabClicked, this)); + m_tabUI->newTabClicked.connect(boost::bind(&SimpleUI::settingsPrivateModeSwitch, this, false)); m_tabUI->tabClicked.connect(boost::bind(&SimpleUI::tabClicked, this,_1)); m_tabUI->closeTabsClicked.connect(boost::bind(&SimpleUI::closeTabsClicked, this,_1)); - m_tabUI->newIncognitoTabClicked.connect(boost::bind(&SimpleUI::newTabClicked, this)); + m_tabUI->newIncognitoTabClicked.connect(boost::bind(&SimpleUI::settingsPrivateModeSwitch, this, true)); + m_tabUI->newIncognitoTabClicked.connect(boost::bind(&SimpleUI::switchViewToIncognitoPage, this)); m_tabUI->tabsCount.connect(boost::bind(&SimpleUI::tabsCount, this)); M_ASSERT(m_historyUI.get()); @@ -471,6 +475,16 @@ void SimpleUI::switchViewToQuickAccess() m_viewManager->popStackTo(m_webPageUI.get()); } +void SimpleUI::switchViewToIncognitoPage() +{ + BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); + M_ASSERT(m_viewManager); + m_webPageUI->toIncognito(m_incognito); + m_webPageUI->switchViewToIncognitoPage(); + m_webEngine->disconnectCurrentWebViewSignals(); + m_viewManager->popStackTo(m_webPageUI.get()); +} + void SimpleUI::checkTabId(const tizen_browser::basic_webengine::TabId& id){ BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); if(m_webEngine->currentTabId() != id || isErrorPageActive()){ @@ -482,7 +496,9 @@ void SimpleUI::checkTabId(const tizen_browser::basic_webengine::TabId& id){ void SimpleUI::openNewTab(const std::string &uri, bool desktopMode) { BROWSER_LOGD("[%s:%d] uri =%s", __PRETTY_FUNCTION__, __LINE__, uri.c_str()); - switchToTab(m_webEngine->addTab(uri, nullptr, desktopMode)); + tizen_browser::basic_webengine::TabId tab = m_webEngine->addTab(uri, nullptr, desktopMode); + applyPrivateModeToTab(tab); + switchToTab(tab); } void SimpleUI::closeTab() @@ -738,6 +754,7 @@ void SimpleUI::tabClicked(const tizen_browser::basic_webengine::TabId& tabId) { BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); m_viewManager->popStackTo(m_webPageUI.get()); + applyPrivateModeToTab(tabId); switchToTab(tabId); } @@ -940,8 +957,18 @@ void SimpleUI::closeBookmarkManagerUI() void SimpleUI::settingsPrivateModeSwitch(bool newState) { BROWSER_LOGD("%s: Setting Private mode to: %s", __func__, (newState ? "true" : "false")); - m_webEngine->setPrivateMode(newState); - BROWSER_LOGD("[%s:%d] webEngine private mode: %s", __PRETTY_FUNCTION__, __LINE__, (m_webEngine->isPrivateMode() ? "true" : "false")); + m_incognito = newState; +} + +void SimpleUI::applyPrivateModeToTab(const tizen_browser::basic_webengine::TabId& tabId) +{ + if (m_webEngine->isPrivateMode(tabId) < 0) { + m_webEngine->setPrivateMode(tabId, m_incognito); + m_webPageUI->toIncognito(m_incognito); + } else { + m_webEngine->setPrivateMode(tabId, m_webEngine->isPrivateMode(tabId)); + m_webPageUI->toIncognito(m_webEngine->isPrivateMode(tabId)); + } } void SimpleUI::settingsDeleteSelectedData(const std::string& str) diff --git a/services/SimpleUI/SimpleUI.h b/services/SimpleUI/SimpleUI.h index 74c425a..5e4ecd4 100644 --- a/services/SimpleUI/SimpleUI.h +++ b/services/SimpleUI/SimpleUI.h @@ -104,6 +104,7 @@ private: void showQuickAccess(); void switchViewToQuickAccess(); + void switchViewToIncognitoPage(); void switchViewToWebPage(); void updateView(); @@ -211,6 +212,7 @@ private: void closeTab(const tizen_browser::basic_webengine::TabId& id); void settingsPrivateModeSwitch(bool newState); + void applyPrivateModeToTab(const tizen_browser::basic_webengine::TabId& id); void settingsDeleteSelectedData(const std::string& str); void settingsResetMostVisited(); void settingsResetBrowser(); @@ -248,6 +250,7 @@ private: int m_tabLimit; int m_favoritesLimit; bool m_wvIMEStatus; + bool m_incognito; //helper object used to view management ViewManager* m_viewManager; diff --git a/services/WebKitEngineService/WebKitEngineService.cpp b/services/WebKitEngineService/WebKitEngineService.cpp index 923ddf3..11cd07a 100644 --- a/services/WebKitEngineService/WebKitEngineService.cpp +++ b/services/WebKitEngineService/WebKitEngineService.cpp @@ -414,6 +414,18 @@ void WebKitEngineService::setPrivateMode(bool state) it->second->setPrivateMode(state); } +void WebKitEngineService::setPrivateMode(const TabId& id, bool state) +{ + BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__); + m_tabs[id]->setPrivateMode(state); +} + +int WebKitEngineService::isPrivateMode(const TabId& id) +{ + BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__); + return m_tabs[id]->isPrivateMode(); +} + bool WebKitEngineService::isPrivateMode() const { return m_privateMode; diff --git a/services/WebKitEngineService/WebKitEngineService.h b/services/WebKitEngineService/WebKitEngineService.h index ed1fc6d..00ec6c7 100644 --- a/services/WebKitEngineService/WebKitEngineService.h +++ b/services/WebKitEngineService/WebKitEngineService.h @@ -108,8 +108,20 @@ public: std::shared_ptr getSnapshotData(TabId id, int width, int height); void setPrivateMode(bool); + void setPrivateMode(const TabId& id, bool state); bool isPrivateMode() const; + /** + * @brief Get the state of private mode for a specific tab + * + * @param id of snapshot + * @return state of private mode where: + * -1 is "Not set" + * 0 is "False" + * 1 is "True" + */ + int isPrivateMode(const TabId& id); + /** * @brief Check if current tab has load error. diff --git a/services/WebKitEngineService/WebView.cpp b/services/WebKitEngineService/WebView.cpp index 33170c5..bb42ec7 100644 --- a/services/WebKitEngineService/WebView.cpp +++ b/services/WebKitEngineService/WebView.cpp @@ -71,6 +71,7 @@ WebView::WebView(Evas_Object * obj, TabId tabId) , m_ewkView(nullptr) , m_isLoading(false) , m_loadError(false) + , m_private(-1) { config.load("whatever"); } @@ -292,30 +293,32 @@ void WebView::setPrivateMode(bool state) { BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__); M_ASSERT(m_ewkView); - + if(m_private < 0){ #if defined(USE_EWEBKIT) #if PLATFORM(TIZEN) - Ewk_Settings * settings = ewk_view_settings_get(m_ewkView); + Ewk_Settings * settings = ewk_view_settings_get(m_ewkView); #else - Ewk_Settings * settings = ewk_page_group_settings_get(ewk_view_page_group_get(m_ewkView)); + Ewk_Settings * settings = ewk_page_group_settings_get(ewk_view_page_group_get(m_ewkView)); #endif - ewk_settings_private_browsing_enabled_set(settings, state); - if (m_ewkView) - { - Ewk_Context *context = ewk_view_context_get(m_ewkView); - if (context) + ewk_settings_private_browsing_enabled_set(settings, state); + if (m_ewkView) { - if(state) - { - ewk_cookie_manager_accept_policy_set(ewk_context_cookie_manager_get(context), EWK_COOKIE_ACCEPT_POLICY_NEVER); - } - else + Ewk_Context *context = ewk_view_context_get(m_ewkView); + if (context) { - ewk_cookie_manager_accept_policy_set(ewk_context_cookie_manager_get(context), EWK_COOKIE_ACCEPT_POLICY_ALWAYS); + if(state) + { + ewk_cookie_manager_accept_policy_set(ewk_context_cookie_manager_get(context), EWK_COOKIE_ACCEPT_POLICY_NEVER); + } + else + { + ewk_cookie_manager_accept_policy_set(ewk_context_cookie_manager_get(context), EWK_COOKIE_ACCEPT_POLICY_ALWAYS); + } } } - } #endif + m_private = static_cast(state); + } } void WebView::confirmationResult(WebConfirmationPtr confirmation) diff --git a/services/WebKitEngineService/WebView.h b/services/WebKitEngineService/WebView.h index 07fdcdc..61f6c68 100644 --- a/services/WebKitEngineService/WebView.h +++ b/services/WebKitEngineService/WebView.h @@ -66,6 +66,16 @@ public: void setPrivateMode(bool); + /** + * @brief Get the state of private mode + * + * @return state of private mode where: + * -1 is "Not set" + * 0 is "False" + * 1 is "True" + */ + int isPrivateMode() {return m_private;} + std::shared_ptr captureSnapshot(int width, int height); /** * \brief Sets Focus to URI entry. @@ -213,6 +223,7 @@ private: bool m_loadError; // true if desktop view is enabled, false if mobile bool m_desktopMode; + int m_private; config::DefaultConfig config; diff --git a/services/WebPageUI/CMakeLists.txt b/services/WebPageUI/CMakeLists.txt index e410517..ddcb2e9 100644 --- a/services/WebPageUI/CMakeLists.txt +++ b/services/WebPageUI/CMakeLists.txt @@ -58,6 +58,7 @@ set(edcFiles LeftButtonBar.edc RightButtonBar.edc URIEntry.edc + PrivateMode.edc ) foreach(edec ${edcFiles}) diff --git a/services/WebPageUI/WebPageUI.cpp b/services/WebPageUI/WebPageUI.cpp index a1456d2..43649b3 100644 --- a/services/WebPageUI/WebPageUI.cpp +++ b/services/WebPageUI/WebPageUI.cpp @@ -31,9 +31,11 @@ WebPageUI::WebPageUI() : m_parent(nullptr) , m_mainLayout(nullptr) , m_errorLayout(nullptr) + , m_privateLayout(nullptr) , m_progressBar(nullptr) , m_URIEntry(new URIEntry()) , m_homePageActive(false) + , m_bookmarkManagerButton(nullptr) { BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); } @@ -131,6 +133,20 @@ void WebPageUI::setPageTitle(const std::string& title) m_URIEntry->setPageTitle(title); } +bool WebPageUI::isIncognitoPageActive() +{ + return elm_object_part_content_get(m_mainLayout, "web_view") == m_privateLayout; +} + +void WebPageUI::toIncognito(bool incognito) +{ + BROWSER_LOGD("[%s:%d,%d] ", __PRETTY_FUNCTION__, __LINE__, incognito); + if(incognito) + elm_object_signal_emit(m_mainLayout, "incognito,true", "ui"); + else + elm_object_signal_emit(m_mainLayout, "incognito,false", "ui"); +} + void WebPageUI::setMainContent(Evas_Object* content) { BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); @@ -150,6 +166,15 @@ void WebPageUI::switchViewToErrorPage() refreshFocusChain(); } +void WebPageUI::switchViewToIncognitoPage() +{ + BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); + m_homePageActive = false; + setMainContent(m_privateLayout); + evas_object_show(m_leftButtonBar->getContent()); + refreshFocusChain(); +} + void WebPageUI::switchViewToWebPage(Evas_Object* content, const std::string uri, const std::string title) { BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); @@ -212,6 +237,7 @@ void WebPageUI::createLayout() elm_layout_file_set(m_mainLayout, edjePath("WebPageUI/WebPageUI.edj").c_str(), "main_layout"); createErrorLayout(); + createPrivateLayout(); createActions(); // left buttons @@ -252,6 +278,29 @@ void WebPageUI::createErrorLayout() elm_layout_file_set(m_errorLayout, edjePath("WebPageUI/ErrorMessage.edj").c_str(), "error_message"); } +void WebPageUI::createPrivateLayout() +{ + BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); + m_privateLayout = elm_layout_add(m_mainLayout); + evas_object_size_hint_weight_set(m_privateLayout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(m_privateLayout, EVAS_HINT_FILL, EVAS_HINT_FILL); + elm_layout_file_set(m_privateLayout, edjePath("WebPageUI/PrivateMode.edj").c_str(), "inco_message"); + + m_bookmarkManagerButton = elm_button_add(m_privateLayout); + elm_object_style_set(m_bookmarkManagerButton, "invisible_button"); + evas_object_smart_callback_add(m_bookmarkManagerButton, "clicked", _bookmark_manager_clicked, this); + evas_object_show(m_bookmarkManagerButton); + + elm_object_part_content_set(m_privateLayout, "bookmarkmanager_click", m_bookmarkManagerButton); +} + +void WebPageUI::_bookmark_manager_clicked(void * data, Evas_Object *, void *) +{ + BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__); + WebPageUI* webpageUI = static_cast(data); + webpageUI->bookmarkManagerClicked(); +} + void WebPageUI::createActions() { BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__); @@ -362,6 +411,7 @@ void WebPageUI::refreshFocusChain() elm_object_focus_custom_chain_append(m_mainLayout, m_rightButtonBar->getContent(), NULL); if (!m_homePageActive) { elm_object_focus_custom_chain_append(m_mainLayout, m_leftButtonBar->getContent(), NULL); + elm_object_focus_custom_chain_append(m_mainLayout, m_bookmarkManagerButton, NULL); } else { m_reload->setEnabled(false); } diff --git a/services/WebPageUI/WebPageUI.h b/services/WebPageUI/WebPageUI.h index de0612f..07a3672 100644 --- a/services/WebPageUI/WebPageUI.h +++ b/services/WebPageUI/WebPageUI.h @@ -42,9 +42,12 @@ public: void progressChanged(double progress); void loadFinished(); bool isErrorPageActive(); + bool isIncognitoPageActive(); bool isHomePageActive() { return m_homePageActive; } + void toIncognito(bool); void switchViewToErrorPage(); void switchViewToWebPage(Evas_Object* content, const std::string uri, const std::string title); + void switchViewToIncognitoPage(); void switchViewToQuickAccess(Evas_Object* content); URIEntry& getURIEntry() const { return *m_URIEntry.get(); } void setPageTitle(const std::string& title); @@ -63,12 +66,14 @@ public: boost::signals2::signal showMoreMenu; boost::signals2::signal hideQuickAccess; boost::signals2::signal showQuickAccess; + boost::signals2::signal bookmarkManagerClicked; static void faviconClicked(void* data, Evas_Object* obj, const char* emission, const char* source); private: void createLayout(); void createErrorLayout(); + void createPrivateLayout(); void createActions(); void connectActions(); void showProgressBar(); @@ -80,6 +85,8 @@ private: std::string edjePath(const std::string& file); void refreshFocusChain(); + static void _bookmark_manager_clicked(void * data, Evas_Object *, void *); + // wrappers to call singal as a reaction to other signal void backPageConnect() { backPage(); } void forwardPageConnect() { forwardPage(); } @@ -91,7 +98,9 @@ private: Evas_Object* m_parent; Evas_Object* m_mainLayout; Evas_Object* m_errorLayout; + Evas_Object* m_privateLayout; Evas_Object* m_progressBar; + Evas_Object* m_bookmarkManagerButton; std::unique_ptr m_leftButtonBar; std::unique_ptr m_rightButtonBar; std::unique_ptr m_URIEntry; diff --git a/services/WebPageUI/edc/PrivateMode.edc b/services/WebPageUI/edc/PrivateMode.edc new file mode 100644 index 0000000..d00fb30 --- /dev/null +++ b/services/WebPageUI/edc/PrivateMode.edc @@ -0,0 +1,374 @@ + +collections { + styles { + style { + name: "message_style"; + base: "font=Sans font_size=36 color=#676767 wrap=word align=0.5"; + } + style { + name: "message_hint_style"; + base: "font=Sans font_size=28 color=#676767 wrap=word align=0.0"; + } + } + group { + name: "inco_message"; + parts { + part { + name: "message_background"; + type: RECT; + mouse_events: 1; + description{ + state: "default" 0.0; + visible: 1; + rel1.relative: 0 0; + rel2.relative: 1 1; + } + } + part { + name: "inco_message_background"; + type:RECT; + description{ + state: "default" 0.0; + visible: 1; + min: 920 356; + max: 920 356; + fixed: 1 1; + align: 0.5 0.5; + } + } + part { + name: "inco_dot"; + images { + image: "ic_text_form.png" COMP; + } + type: "IMAGE"; + description { + state: "default" 0.0; + visible: 1; + min: 20 28; + max: 20 28; + align: 0 0; + image.normal: "ic_text_form.png"; + rel1 { + offset: 0 100; + relative: 0 0; + to: "inco_message_background"; + } + rel2 { + relative: 1 1; + to: "inco_message_background"; + } + } + } + part { + name: "inco_dot2"; + images { + image: "ic_text_form.png" COMP; + } + type: "IMAGE"; + description { + state: "default" 0.0; + visible: 1; + min: 20 28; + max: 20 28; + align: 0 0; + image.normal: "ic_text_form.png"; + rel1 { + offset: 0 216; + relative: 0 0; + to: "inco_message_background"; + } + rel2 { + relative: 1 1; + to: "inco_message_background"; + } + } + } + part { + name: "inco_dot3"; + images { + image: "ic_text_form.png" COMP; + } + type: "IMAGE"; + description { + state: "default" 0.0; + visible: 1; + min: 20 28; + max: 20 28; + align: 0 0; + image.normal: "ic_text_form.png"; + rel1 { + offset: 0 298; + relative: 0 0; + to: "inco_message_background"; + } + rel2 { + relative: 1 1; + to: "inco_message_background"; + } + } + } + part { + name: "inco_text"; + type: TEXTBLOCK; + description { + state: "default" 0.0; + visible: 1; + fixed: 1 1; + min: 864 36; + max: 864 36; + align: 0.5 0; + color: 103 103 103 255; + rel1 { + relative: 0 0; + to: "inco_message_background"; + } + rel2 { + relative: 1 1; + to: "inco_message_background"; + } + text { + min: 0 1; + max: 0 1; + style: "message_style"; + text: "Start Incognito Browsing"; + } + } + } + part { + name: "inco_hint"; + type: TEXTBLOCK; + description { + state: "default" 0.0; + visible: 1; + fixed: 0 1; + min: 864 68; + max: 864 68; + color: 103 103 103 179; + align: 0 0; + rel1 { + relative: 0 0; + offset: 28 90; + to_y: "inco_message_background"; + to_x: "inco_dot"; + } + rel2 { + relative: 1 1; + to_y: "inco_message_background"; + } + text { + min: 0 1; + max: 0 1; + style: "message_hint_style"; + text: "You can browse internet in incognito tabs without any traces including browsing history, cookie or search history."; + } + } + } + part { + name: "inco_hint2"; + type: TEXTBLOCK; + description { + state: "default" 0.0; + visible: 1; + fixed: 1 1; + min: 864 28; + max: 864 28; + color: 103 103 103 179; + align: 0.0 0; + rel1 { + relative: 0 0; + offset: 28 206; + to_y: "inco_message_background"; + to_x: "inco_dot2"; + } + rel2 { + relative: 1 1; + to_y: "inco_message_background"; + } + text { + min: 0 1; + max: 0 1; + style: "message_hint_style"; + text: "Bookmarks or downloaded files will not be removed."; + } + } + } + part { + name: "inco_hint3"; + type: TEXTBLOCK; + description { + state: "default" 0.0; + visible: 1; + fixed: 1 1; + min: 864 68; + max: 864 68; + color: 103 103 103 179; + align: 0.0 0; + rel1 { + relative: 0 0; + offset: 28 288; + to_y: "inco_message_background"; + to_x: "inco_dot3"; + } + rel2 { + relative: 1 1; + to_y: "inco_message_background"; + } + text { + min: 0 1; + max: 0 1; + style: "message_hint_style"; + text: "You can not remove traces from your employer, internet service provider or websites you visit even you go incognito."; + } + } + } + part { + name: "bookmarkmanager_button"; + scale:1; + mouse_events: 1; + type: RECT; + description { + state: "default" 0.0; + visible: 1; + fixed: 1 1; + align: 0.5 1.0; + min: 348 65; + max: 348 65; + color: 192 192 192 255; + rel1 { relative: 0.0 0.0; to: "message_background";} + rel2 { relative: 1.0 1.0; to: "message_background"; offset: 0 -60;} + } + description { + state: "highlight" 0.0; + inherit: "default" 0.0; + color_class: focusBgColor; + visible: 1; + } + description { + state: "focus" 0.0; + inherit: "default" 0.0; + color_class: focusbtBgColor; + 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: 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_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";} + } + } + }//parts + 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"; + } + } +} + +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/WebPageUI/edc/URIEntry.edc b/services/WebPageUI/edc/URIEntry.edc index f3f1da0..0eae949 100644 --- a/services/WebPageUI/edc/URIEntry.edc +++ b/services/WebPageUI/edc/URIEntry.edc @@ -125,6 +125,7 @@ collections { source: "elm/entry/selection/browser_entry"; source4: "elm/entry/cursor/browser_entry"; description { + max: 1378 82; state: "default" 0.0; rel1.relative: 0.0 0.0; rel2.relative: 1.0 1.0; diff --git a/services/WebPageUI/edc/WebPageUI.edc b/services/WebPageUI/edc/WebPageUI.edc index 13983f4..ae1edaf 100644 --- a/services/WebPageUI/edc/WebPageUI.edc +++ b/services/WebPageUI/edc/WebPageUI.edc @@ -21,6 +21,7 @@ collections { name: "main_layout"; images { image: "web_shadow.png" COMP; + image: "btn_bar_incognito.png" COMP; } parts { part { @@ -167,6 +168,33 @@ collections { rel2 { relative: 1.0 1.0; } } } + part { + name: "incognito"; + type: IMAGE; + repeat_events: 1; + scale: 1; + description { + state: "default" 0.0; + visible: 0; + rel1 { + relative: 0.0 0.0; + to: "uri_bar_bg"; + offset: 1623 0; + } + rel2 { + relative: 0.0 0.0; + to: "uri_bar_bg"; + offset: 1623+82 0+102; + } + align: 0.5 0.5; + image.normal: "btn_bar_incognito.png"; + } + description { + state: "visible" 1.0; + inherit: "default" 0.0; + visible: 1; + } + } part { name: "progress_bar"; type: SWALLOW; @@ -295,6 +323,20 @@ collections { action: STATE_SET "visible" 0.0; target: "progress_bar_light_bg"; } + program { + name: "show_incognito_ico"; + signal: "incognito,true"; + source: "ui"; + action: STATE_SET "visible" 1.0; + target: "incognito"; + } + program { + name: "hide_incognito_ico"; + signal: "incognito,false"; + source: "ui"; + action: STATE_SET "default" 0.0; + target: "incognito"; + } program { name: "show_popup"; signal: "elm,state,show"; diff --git a/services/WebPageUI/images/btn_bar_incognito.png b/services/WebPageUI/images/btn_bar_incognito.png new file mode 100644 index 0000000..1f5d11c Binary files /dev/null and b/services/WebPageUI/images/btn_bar_incognito.png differ diff --git a/services/WebPageUI/images/ic_text_form.png b/services/WebPageUI/images/ic_text_form.png new file mode 100644 index 0000000..af49e26 Binary files /dev/null and b/services/WebPageUI/images/ic_text_form.png differ