elm_entry_single_line_set(m_entry, EINA_TRUE);
elm_entry_scrollable_set(m_entry, EINA_TRUE);
elm_entry_input_panel_layout_set(m_entry, ELM_INPUT_PANEL_LAYOUT_URL);
- elm_object_signal_callback_add(m_entry_layout, "right_icon_clicked", "ui", _uri_right_icon_clicked, this);
+ elm_object_signal_callback_add(m_entry_layout, "left,icon,clicked", "ui", _uri_left_icon_clicked, this);
+ elm_object_signal_callback_add(m_entry_layout, "right,icon,clicked", "ui", _uri_right_icon_clicked, this);
setUrlGuideText(GUIDE_TEXT_UNFOCUSED);
if (!m_URI.empty()) {
elm_entry_entry_set(m_entry, elm_entry_utf8_to_markup(m_URI.c_str()));
m_rightIconType = RightIconType::NONE;
- } else
+ } else {
elm_entry_entry_set(m_entry, elm_entry_utf8_to_markup(""));
+ hideRightIcon();
+ }
}
updateSecureIcon();
}
self->m_first_click = false;
self->m_entrySelectionState = SelectionState::SELECTION_NONE;
}
+ self->hideLeftIcon();
}
void URIEntry::_fixed_entry_key_down_handler(void* data, Evas* /*e*/, Evas_Object* /*obj*/, void* event_info)
void URIEntry::loadStarted()
{
m_isPageLoading = true;
- elm_object_signal_emit(m_entry_layout, "shiftright_uribg", "ui");
showStopIcon();
}
}
+void URIEntry::_uri_left_icon_clicked(void* data, Evas_Object*, const char*, const char*)
+{
+ BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+ auto self = static_cast<URIEntry*>(data);
+ self->secureIconClicked();
+}
+
void URIEntry::_uri_right_icon_clicked(void* data, Evas_Object* /*obj*/, const char* /*emission*/, const char* /*source*/)
{
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
switch (self->m_rightIconType) {
case RightIconType::CANCEL:
elm_entry_entry_set(self->m_entry, "");
- elm_object_signal_emit(self->m_entry_layout, "hide_icon", "ui");
+ self->hideRightIcon();
break;
case RightIconType::RELOAD:
self->reloadPage();
m_rightIconType = RightIconType::CANCEL;
bool isEntryEmpty = elm_entry_is_empty(m_entry);
if(!isEntryEmpty)
- elm_object_signal_emit(m_entry_layout, "show_cancel_icon", "ui");
+ elm_object_signal_emit(m_entry_layout, "show,cancel,icon", "ui");
else
- elm_object_signal_emit(m_entry_layout, "hide_icon", "ui");
+ hideRightIcon();
}
void URIEntry::updateSecureIcon()
{
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
m_rightIconType = RightIconType::STOP_LOADING;
- elm_object_signal_emit(m_entry_layout, "show_cancel_icon", "ui");
+ elm_object_signal_emit(m_entry_layout, "show,cancel,icon", "ui");
}
void URIEntry::showReloadIcon()
void URIEntry::hideRightIcon()
{
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- elm_object_signal_emit(m_entry_layout, "hide_icon", "ui");
+ elm_object_signal_emit(m_entry_layout, "hide,right,icon", "ui");
+}
+
+void URIEntry::hideLeftIcon()
+{
+ BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+ elm_object_signal_emit(m_entry_layout,"hide,left,icon", "ui");
}
void URIEntry::showSecureIcon(bool show, bool secure)
elm_object_signal_emit(m_entry_layout, "show,secure,icon", "");
else
elm_object_signal_emit(m_entry_layout, "show,unsecure,icon", "");
- }
- else {
- // TODO: new signal for left side secure icon needed
+ } else {
+ hideLeftIcon();
}
}
STOP_LOADING
};
+ static void _uri_left_icon_clicked(void* data, Evas_Object*, const char*, const char*);
static void _uri_right_icon_clicked(void* data, Evas_Object*, const char*, const char*);
void showCancelIcon();
void showStopIcon();
void showReloadIcon();
void hideRightIcon();
+ void hideLeftIcon();
private:
Evas_Object* m_parent;
evas_object_show(elm_object_part_content_get(m_mainLayout, "uri_bar_buttons_right"));
if (m_statesMgr->equals(WPUState::QUICK_ACCESS)) {
- evas_object_hide(m_bottomButtonBar->getContent());
elm_object_signal_emit(m_mainLayout, "shiftback_uri", "ui");
showQuickAccess();
}
BROWSER_LOGD("[%s:%d,%d] ", __PRETTY_FUNCTION__, __LINE__, incognito);
if (incognito) {
elm_object_signal_emit(m_mainLayout, "incognito,true", "ui");
- elm_object_signal_emit(m_URIEntry->getEntryWidget(), "uri_entry_incognito", "ui");
- elm_object_signal_emit(m_URIEntry->getContent(), "uri_entry_incognito", "ui");
}
else {
elm_object_signal_emit(m_mainLayout, "incognito,false", "ui");
- elm_object_signal_emit(m_URIEntry->getEntryWidget(), "uri_entry_normal", "ui");
- elm_object_signal_emit(m_URIEntry->getContent(), "uri_entry_normal", "ui");
}
}
setMainContent(m_errorLayout);
evas_object_show(m_bottomButtonBar->getContent());
elm_object_signal_emit(m_mainLayout, "shiftright_uri", "ui");
- elm_object_signal_emit(m_URIEntry->getContent(), "shiftright_uribg", "ui");
setErrorButtons();
}
createPrivateLayout();
setMainContent(m_privateLayout);
orientationChanged();
- evas_object_show(m_bottomButtonBar->getContent());
elm_object_signal_emit(m_mainLayout, "shiftright_uri", "ui");
- elm_object_signal_emit(m_URIEntry->getContent(), "shiftright_uribg", "ui");
setPrivateButtons();
m_URIEntry->changeUri("");
}
m_statesMgr->set(WPUState::MAIN_WEB_PAGE);
}
setMainContent(content);
- evas_object_show(m_bottomButtonBar->getContent());
elm_object_signal_emit(m_mainLayout, "shiftright_uri", "ui");
- elm_object_signal_emit(m_URIEntry->getContent(), "shiftright_uribg", "ui");
updateURIBar(uri);
}
m_statesMgr->set(WPUState::QUICK_ACCESS);
toIncognito(false);
setMainContent(content);
- evas_object_hide(m_bottomButtonBar->getContent());
elm_object_signal_emit(m_mainLayout, "shiftback_uri", "ui");
- elm_object_signal_emit(m_URIEntry->getContent(), "shiftback_uribg", "ui");
hideProgressBar();
m_URIEntry->changeUri("");
m_URIEntry->showSecureIcon(false, false);
m_forward = sharedAction(new Action(_("IDS_BR_SK_NEXT")));
m_forward->setIcon("toolbar_next");
- m_addTab = sharedAction(new Action("Add tab"));
+ m_addTab = sharedAction(new Action("New tab"));
m_addTab->setIcon("add_tab");
m_homePage = sharedAction(new Action("Home"));
void WebPageUI::mobileEntryUnfocused()
{
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- if (m_statesMgr->equals(WPUState::QUICK_ACCESS)) {
- elm_object_signal_emit(m_mainLayout, "decrease_unfocused_uri", "ui");
- } else {
- elm_object_signal_emit(m_mainLayout, "decrease_unfocused_uri_wp", "ui");
- }
+ elm_object_signal_emit(m_mainLayout, "decrease_unfocused_uri", "ui");
// delay hiding on one efl loop iteration to enable genlist item selected callback to come
ecore_timer_add(0.0, _hideDelay, this);
}
collections { base_scale: 2.6;
-RESOURCE_IMAGE_LOSSY("input_ic_incognito.png")
RESOURCE_IMAGE_LOSSY("toolbar_input_ic_cancel.png")
-RESOURCE_IMAGE_LOSSY("ic_lock.png")
-RESOURCE_IMAGE_LOSSY("ic_lock_unsecure.png")
+RESOURCE_IMAGE_LOSSY("toolbar_input_ic_security.png")
+RESOURCE_IMAGE_LOSSY("toolbar_input_ic_security_off.png")
RESOURCE_IMAGE_LOSSY("toolbar_input_ic_refresh.png")
group {
name: "elm/entry/selection/browser_entry";
data {
item: focus_highlight "off";
}
- images {
- image: "input_ic_incognito.png" COMP;
- }
parts {
part {
action: STATE_SET "default" 0.0;
target: "elm.guide";
}
- program {
- name: "normal_mode_uri_entry";
- source: "ui";
- signal: "uri_entry_normal";
- }
program {
name: "incognito_mode_uri_entry";
source: "ui";
min: 0 URI_INPUTBOX_HEIGHT;
max: -1 URI_INPUTBOX_HEIGHT;
fixed: 0 1;
- color: 244 244 244 255;
+ color: 255 255 255 255;
rel1 { relative: 0.0 0.0; }
rel2 { relative: 1.0 1.0; }
}
- description {
- state: "moveright" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
description {
state: "hidden" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
- part {
- name: "over_icon";
+ rect {
+ name: "left_spacer";
scale: 1;
- type: RECT;
mouse_events: 0;
description {
state: "default" 0.0;
+ min: 16 URI_INPUTBOX_HEIGHT;
+ max: 16 URI_INPUTBOX_HEIGHT;
+ rel1.to: "left_spacer";
+ rel1.relative: 0.0 0.0;
+ rel2.to: "uri_entry_space";
+ rel2.relative: 1.0 1.0;
+ align: 0 0;
+ visible: 0;
+ }
+ description {
+ state: "hidden" 0.0;
+ inherit: "default" 0.0;
min: 0 0;
max: 0 0;
- rel1.to: "uri_entry_space";
- rel1.relative: 0.0 0.0;
+ }
+ }
+ rect {
+ name: "left_icon_bg";
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ min: 0 0;
+ max: 0 0;
+ rel1.to: "left_spacer";
+ rel1.relative: 1.0 0.0;
rel2.to: "uri_entry_space";
rel2.relative: 1.0 1.0;
align: 0 0;
- color: 244 244 244 255;
+ color: 255 255 255 255;
}
description {
- state: "incognito" 0.0;
+ state: "visible" 0.0;
inherit: "default" 0.0;
- min: 38 URI_INPUTBOX_HEIGHT;
- max: 38 URI_INPUTBOX_HEIGHT;
+ min: 82 URI_INPUTBOX_HEIGHT;
+ max: 82 URI_INPUTBOX_HEIGHT;
}
+
}
part {
- name: "incognito_icon";
+ name: "left_icon";
type: IMAGE;
scale: 1;
description {
visible: 0;
min: 0 0;
max: 0 0;
+ color: 105 105 105 255;
rel1 {
- to: "over_icon";
+ to: "left_icon_bg";
relative: 0.0 0.0;
}
rel2 {
+ to: "left_icon_bg";
relative: 1.0 1.0;
}
- image.normal: "input_ic_incognito.png";
- align: 0 0.5;
+ align: 0.5 0.5;
}
description {
- state: "incognito" 0.0;
+ state: "visible" 0.0;
inherit: "default" 0.0;
- min: 38 38;
- max: 38 38;
+ min: 50 50;
+ max: 50 50;
visible: 1;
}
+ description {
+ state: "secure" 0.0;
+ inherit: "visible" 0.0;
+ image.normal: "toolbar_input_ic_security.png";
+ }
+ description {
+ state: "unsecure" 0.0;
+ inherit: "visible" 0.0;
+ image.normal: "toolbar_input_ic_security_off.png";
+ }
+ }
+ rect {
+ name: "left_icon_over";
+ scale: 1;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ rel1.to: "left_icon_bg";
+ rel1.relative: 0.0 0.0;
+ rel2.to: "left_icon_bg";
+ rel2.relative: 1.0 1.0;
+ align: 0 0;
+ color: 0 0 0 0;
+ }
}
part {
name: "over";
relative: 1.0 1.0;
}
visible: 1;
- color: 244 244 244 255;
+ color: 255 255 255 255;
}
description {
state: "focused" 0.0;
visible: 1;
color: 224 237 251 255;
}
- description {
- state: "moveright" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
}
part {
name: "uri_entry_swallow";
visible: 1;
align: 0.0 0.0;
fixed: 1 1;
- rel1 { relative: 1.0 0.0; to: "over_icon"; }
+ rel1 { relative: 1.0 0.0; to: "left_icon_bg"; }
rel2 { relative: 0.0 1.0; to: "right_icon_bg"; }
min: 0 URI_INPUTBOX_HEIGHT;
max: -1 URI_INPUTBOX_HEIGHT;
}
- description {
- state: "moveright" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
description {
state: "hidden" 0.0;
inherit: "default" 0.0;
inherit: "visible" 0.0;
image.normal: "toolbar_input_ic_cancel.png";
}
- description {
- state: "secure" 0.0;
- inherit: "visible" 0.0;
- image.normal: "ic_lock.png";
- }
- description {
- state: "unsecure" 0.0;
- inherit: "visible" 0.0;
- image.normal: "ic_lock_unsecure.png";
- }
description {
state: "reload" 0.0;
inherit: "visible" 0.0;
}
}
part {
- name: "cancel_over";
+ name: "right_icon_over";
scale:1;
type: RECT;
mouse_events: 1;
}
color: 0 0 0 0;
}
- description {
- state: "moveright" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
description {
state: "visible" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
- part {
- name: "cancel_click";
- scale:1;
- mouse_events: 1;
- repeat_events: 1;
- type: SWALLOW;
- description {
- state: "default" 0.0;
- visible: 1;
- align: 0 0;
- fixed: 1 1;
- min: URI_INPUTBOX_HEIGHT URI_INPUTBOX_HEIGHT;
- max: URI_INPUTBOX_HEIGHT URI_INPUTBOX_HEIGHT;
- rel1 { relative: 0.0 0.0; to: "cancel_over";}
- rel2 { relative: 1.0 1.0; to: "cancel_over";}
- color: 0 0 0 0;
- }
- }
}
programs {
- program {
- name: "shiftright_uribarbg";
- signal: "shiftright_uribg";
- source: "ui";
- action: STATE_SET "moveright" 0.0;
- target: "uri_entry_swallow";
- target: "right_icon";
- target: "cancel_over";
- target: "right_icon_bg";
- target: "uri_entry_space";
- }
- program {
- name: "shiftback_uribarbg";
- signal: "shiftback_uribg";
- source: "ui";
- action: STATE_SET "default" 0.0;
- target: "uri_entry_swallow";
- target: "right_icon";
- target: "cancel_over";
- target: "uri_entry_space";
- }
program {
name: "mouse_in_right_icon";
signal: "mouse,down,*";
- source: "cancel_over";
+ source: "right_icon_over";
action: STATE_SET "focused" 0.0;
target: "right_icon_bg";
}
program {
name: "mouse_out_right_icon";
signal: "mouse,up,*";
- source: "cancel_over";
+ source: "right_icon_over";
action: STATE_SET "visible" 0.0;
target: "right_icon_bg";
}
signal: "show,secure,icon";
source: "";
action: STATE_SET "secure" 0.0;
- target: "right_icon";
- after: "show_icon_bg";
+ target: "left_icon";
+ after: "show_left_icon_bg";
}
program {
name: "show_unsecure_icon";
signal: "show,unsecure,icon";
source: "";
action: STATE_SET "unsecure" 0.0;
- target: "right_icon";
- after: "show_icon_bg";
+ target: "left_icon";
+ after: "show_left_icon_bg";
}
program {
name: "show_reload_icon";
source: "";
action: STATE_SET "reload" 0.0;
target: "right_icon";
- after: "show_icon_bg";
+ after: "show_right_icon_bg";
+ }
+ program {
+ name: "mouse_clicked_left_icon";
+ signal: "mouse,clicked,*";
+ source: "left_icon_over";
+ action: SIGNAL_EMIT "left,icon,clicked" "ui";
}
program {
name: "mouse_clicked_right_icon";
signal: "mouse,clicked,*";
- source: "cancel_over";
+ source: "right_icon_over";
after: "call_on_right_icon_clicked_cb";
}
program {
name: "call_on_right_icon_clicked_cb";
- signal: "call_on_right_icon_clicked_cb";
source: "ui";
- action: SIGNAL_EMIT "right_icon_clicked" "ui";
+ action: SIGNAL_EMIT "right,icon,clicked" "ui";
}
program {
- name: "normal_mode_uri_entry";
+ name: "hide_left_icon";
source: "ui";
- signal: "uri_entry_normal";
+ signal: "hide,left,icon";
action: STATE_SET "default" 0.0;
- target: "incognito_icon";
- target: "over_icon";
- }
- program {
- name: "incognito_mode_uri_entry";
- source: "ui";
- signal: "uri_entry_incognito";
- action: STATE_SET "incognito" 0.0;
- target: "incognito_icon";
- target: "over_icon";
+ target: "left_icon";
+ target: "left_icon_bg";
+ target: "left_spacer";
}
program {
name: "show_cancel_icon";
source: "ui";
- signal: "show_cancel_icon";
+ signal: "show,cancel,icon";
action: STATE_SET "cancel" 0.0;
target: "right_icon";
- after: "show_icon_bg";
+ after: "show_right_icon_bg";
}
program {
- name: "show_icon_bg";
- signal: "show_icon_bg";
+ name: "show_right_icon_bg";
action: STATE_SET "visible" 0.0;
target: "right_icon_bg";
- target: "cancel_over";
+ target: "right_icon_over";
}
program {
- name: "hide_icon";
+ name: "hide_right_icon";
source: "ui";
- signal: "hide_icon";
+ signal: "hide,right,icon";
action: STATE_SET "default" 0.0;
target: "right_icon";
target: "right_icon_bg";
- target: "cancel_over";
+ target: "right_icon_over";
+ }
+ program {
+ name: "show_left_icon_bg";
+ action: STATE_SET "visible" 0.0;
+ target: "left_icon_bg";
+ after: "hide_left_spacer";
+ }
+ program {
+ name: "hide_left_spacer";
+ action: STATE_SET "hidden" 0.0;
+ target: "left_spacer";
}
}
}
inherit: "default" 0.0;
visible: 1;
}
- description {
- state: "entry_decreased_wp" 0.0;
- inherit: "moveright" 0.0;
- }
}
part {
inherit: "default" 0.0;
visible: 1;
}
- description {
- state: "entry_decreased_wp" 0.0;
- inherit: "default" 0.0;
- }
}
part {
target: "uri_entry";
target: "uri_bar_buttons_right";
}
- program {
- name: "decrease_unfocused_uribar_wp";
- signal: "decrease_unfocused_uri_wp";
- source: "ui";
- action: STATE_SET "entry_decreased_wp" 0.0;
- target: "uri_entry";
- target: "uri_bar_buttons_right";
- }
program {
name: "hide_uri_bar_landscape";
signal: "hide_uri_bar_landscape";