--- /dev/null
+
+#define BUTTON_NAVIFRAME_BACK_CORNER_RADIUS "10"
+#define BUTTON_NAVIFRAME_BACK_BUTTON_SIZE_INC 80 80
+#define BUTTON_NAVIFRAME_BACK_BUTTON_EFFECT_MAX_SIZE_INC 80 80
+#define GLIDE_EASE_OUT(duration) CUBIC_BEZIER (duration) 0.25 0.46 0.45 1.0
+
+collections { base_scale: 2.6;
+
+ color_classes {
+ color_class {
+ name: "button_normal";
+ color: 105 105 105 255;
+ }
+ color_class {
+ name: "button_secret";
+ color: 250 250 250 255;
+ }
+ }
+}
+
+#define TOOLBAR_BUTTON(NAME, ICON, WIDTH, HEIGHT, TOP_PADDING) \
+ group { name: __CONCAT("elm/button/base/", NAME); \
+ data.item: "vector_ux" "no_bg"; \
+ data.item: "corner_radius" BUTTON_NAVIFRAME_BACK_CORNER_RADIUS; \
+ images { \
+ set { \
+ name: __CONCAT("image_file_", NAME); \
+ image { \
+ image: ICON COMP; \
+ } \
+ } \
+ } \
+ script { \
+ public mouse_down = 0; \
+ public multi_down = 0; \
+ public animate = 0; \
+ public disabled = 0; \
+ } \
+ parts { \
+ part { name: "button_bg"; \
+ type: SPACER; \
+ scale: 1; \
+ mouse_events: 0; \
+ description { state: "default" 0.0; \
+ min: WIDTH HEIGHT; \
+ max: WIDTH HEIGHT; \
+ fixed: 1 1; \
+ } \
+ } \
+ part { name: "effect_spacer"; \
+ type: SPACER; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ fixed: 1 1; \
+ rel1.relative: 0.5 0.5; \
+ rel2.relative: 0.5 0.5; \
+ min: WIDTH HEIGHT; \
+ max: WIDTH HEIGHT; \
+ } \
+ } \
+ part { name: "tizen_vg_shape"; \
+ type: SWALLOW; \
+ clip_to: "tizen_vg_shape_clipper"; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ fixed: 1 1; \
+ rel1.relative: 0.5 0.5; \
+ rel2.relative: 0.5 0.5; \
+ } \
+ description { state: "ready" 0.0; \
+ rel1.to: "effect_spacer"; \
+ rel2.to: "effect_spacer"; \
+ rel1.relative: 0.15 0.15; \
+ rel2.relative: 0.85 0.85; \
+ } \
+ description { state: "pressed" 0.0; \
+ inherit: "ready" 0.0; \
+ rel1.relative: 0.0 0.0; \
+ rel2.relative: 1.0 1.0; \
+ } \
+ } \
+ part { name: "tizen_vg_shape_clipper"; \
+ type: RECT; \
+ description { state: "default" 0.0; \
+ color: 0 0 0 0; \
+ visible: 0; \
+ fixed: 1 1; \
+ rel1.to: "tizen_vg_shape"; \
+ rel2.to: "tizen_vg_shape"; \
+ } \
+ description { state: "ready" 0.0; \
+ inherit: "default" 0.0; \
+ visible: 1; \
+ } \
+ description { state: "pressed" 0.0; \
+ inherit: "default" 0.0; \
+ color: 0 0 0 77; \
+ visible: 1; \
+ } \
+ } \
+ part { name: "icon_spacer"; \
+ type: RECT; \
+ scale: 1; \
+ mouse_events: 0; \
+ description { \
+ visible: 0; \
+ align: 0.0 0.0; \
+ min: 0 TOP_PADDING; \
+ max: -1 TOP_PADDING; \
+ rel1 { relative: 0.0 0.0; to: "button_bg"; } \
+ rel2 { relative: 1.0 1.0; to: "button_bg"; } \
+ } \
+ } \
+ part { name: "button_icon"; \
+ type: IMAGE; \
+ scale: 1; \
+ mouse_events: 0; \
+ description { state: "default" 0.0; \
+ min: ICON_SIZE ICON_SIZE; \
+ max: ICON_SIZE ICON_SIZE; \
+ fixed: 1 1; \
+ color_class: "button_normal"; \
+ image.normal: __CONCAT("image_file_", NAME); \
+ align: 0.5 0.0; \
+ rel1 { relative: 0.0 1.0; to: "icon_spacer"; } \
+ rel2 { relative: 1.0 1.0; to: "button_bg"; } \
+ } \
+ description { state: "secret" 0.0; \
+ inherit: "default" 0.0; \
+ color_class: "button_secret"; \
+ } \
+ } \
+ part { name: "button_text"; \
+ type: TEXT; \
+ scale: 1; \
+ mouse_events: 0; \
+ description { state: "default" 0.0; \
+ align: 0.5 0.0; \
+ color_class: "button_normal"; \
+ rel1 { relative: 0.0 1.0; \
+ to_x: "button_bg"; \
+ to_y: "button_icon"; \
+ } \
+ text { \
+ text: ""; \
+ font: "Tizen"; \
+ size: 22; \
+ align: 0.5 0.0; \
+ } \
+ } \
+ description { state: "secret" 0.0; \
+ inherit: "default" 0.0; \
+ color_class: "button_secret"; \
+ } \
+ } \
+ part { name: "event"; \
+ type: RECT; \
+ description { state: "default" 0.0; \
+ rel1.to: "button_bg"; \
+ rel2.to: "button_bg"; \
+ color: 0 0 0 0; \
+ } \
+ } \
+ } \
+ programs { \
+ program { name: "pressed_effect"; \
+ action: STATE_SET "ready" 0.0; \
+ target: "tizen_vg_shape_clipper"; \
+ target: "tizen_vg_shape"; \
+ after: "pressed_effect2"; \
+ } \
+ program { name: "pressed_effect2"; \
+ action: STATE_SET "pressed" 0.0; \
+ target: "tizen_vg_shape_clipper"; \
+ target: "tizen_vg_shape"; \
+ transition: GLIDE_EASE_OUT(0.15); \
+ after: "pressed_effect3"; \
+ } \
+ program { name: "pressed_effect3"; \
+ script { \
+ set_int(animate, 0); \
+ } \
+ } \
+ program { name: "delay_unpressed_effect"; \
+ in: 0.1 0.0; \
+ after: "unpressed_effect"; \
+ } \
+ program { name: "unpressed_effect"; \
+ script { \
+ run_program(PROGRAM:"unpressed_effect2"); \
+ } \
+ } \
+ program { name: "unpressed_effect2"; \
+ action: STATE_SET "ready" 0.0; \
+ target: "tizen_vg_shape_clipper"; \
+ transition: GLIDE_EASE_OUT(0.45); \
+ after: "unpressed_effect3"; \
+ } \
+ program { name: "unpressed_effect3"; \
+ action: STATE_SET "default" 0.0; \
+ target: "tizen_vg_shape"; \
+ target: "tizen_vg_shape_clipper"; \
+ } \
+ program { name: "pressed"; \
+ signal: "mouse,down,1*"; \
+ source: "event"; \
+ script { \
+ if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0) && (get_int(disabled) == 0)) { \
+ stop_program(PROGRAM:"delay_unpressed_effect"); \
+ set_int(mouse_down, 1); \
+ set_int(animate, 1); \
+ emit("elm,action,press", ""); \
+ run_program(PROGRAM:"pressed_effect"); \
+ } \
+ } \
+ } \
+ program { name: "unpressed"; \
+ signal: "mouse,up,1"; \
+ source: "event"; \
+ script { \
+ if (get_int(mouse_down) == 1) { \
+ set_int(mouse_down, 0); \
+ if (get_int(disabled) == 0) { \
+ if (get_int(animate) == 0) { \
+ run_program(PROGRAM:"unpressed_effect"); \
+ } else { \
+ set_state(PART:"tizen_vg_shape", "pressed", 0.0); \
+ set_state(PART:"tizen_vg_shape_clipper", "pressed", 0.0); \
+ set_int(animate, 0); \
+ run_program(PROGRAM:"delay_unpressed_effect"); \
+ } \
+ emit("elm,action,unpress", ""); \
+ } \
+ } \
+ } \
+ } \
+ program { name: "button_click"; \
+ signal: "mouse,clicked,1"; \
+ source: "event"; \
+ script { \
+ if ((get_int(multi_down) == 0) && (get_int(disabled) == 0)) { \
+ run_program(PROGRAM:"play_sound"); \
+ run_program(PROGRAM:"clicked_signal"); \
+ } \
+ } \
+ } \
+ program { name: "play_sound"; \
+ action: RUN_PLUGIN "touch_sound"; \
+ } \
+ program { name: "clicked_signal"; \
+ in: 0.001 0.0; \
+ action: SIGNAL_EMIT "elm,action,click" ""; \
+ } \
+ program { name: "enable"; \
+ signal: "elm,state,enabled"; \
+ source: "elm"; \
+ script { \
+ set_int(disabled, 0); \
+ } \
+ } \
+ program { name: "disable"; \
+ signal: "elm,state,disabled"; \
+ source: "elm"; \
+ script { \
+ set_int(disabled, 1); \
+ } \
+ } \
+ program { \
+ name: "multi_down"; \
+ signal: "elm,action,multi,down"; \
+ source: "elm"; \
+ script { \
+ set_int(multi_down, 1); \
+ } \
+ } \
+ program { \
+ name: "multi_up"; \
+ signal: "elm,action,multi,up"; \
+ source: "elm"; \
+ script { \
+ set_int(multi_down, 0); \
+ } \
+ } \
+ program { name: "pass_event_enable"; \
+ signal: "elm,event,pass,enabled"; \
+ source: "elm"; \
+ script { \
+ set_mouse_events(PART:"event", 0); \
+ } \
+ } \
+ program { name: "pass_event_disable"; \
+ signal: "elm,event,pass,disabled"; \
+ source:"elm"; \
+ script { \
+ set_mouse_events(PART:"event", 1); \
+ } \
+ } \
+ program { name: "repeat_event_enable"; \
+ signal: "elm,event,repeat,enabled"; \
+ source: "elm"; \
+ script { \
+ set_repeat_events(PART:"event", 1); \
+ } \
+ } \
+ program { name: "repeat_event_disable"; \
+ signal: "elm,event,repeat,disabled"; \
+ source:"elm"; \
+ script { \
+ set_repeat_events(PART:"event", 0); \
+ } \
+ } \
+ program { \
+ name: "set_normal_mode"; \
+ signal: "set_normal_mode"; \
+ source: "ui"; \
+ action: STATE_SET "default" 0.0; \
+ target: "button_icon"; \
+ target: "button_text"; \
+ } \
+ program { \
+ name: "set_secret_mode"; \
+ signal: "set_secret_mode"; \
+ source: "ui"; \
+ action: STATE_SET "secret" 0.0; \
+ target: "button_icon"; \
+ target: "button_text"; \
+ } \
+ } \
+ }
ActionButton actionButton;
std::shared_ptr<EAction> eAction = std::make_shared<EAction>(action);
actionButton.eAction = eAction;
- Evas_Object* button = elm_button_add(m_layout);
-
- Evas_Object* box = elm_box_add(button);
- evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_box_homogeneous_set(box, EINA_FALSE);
-
- // Set a source file to fetch pixel data
- Evas_Object *img = elm_layout_add(box);
- elm_layout_file_set(img, m_edjFilePath.c_str(), action->getIcon().c_str());
- evas_object_size_hint_min_set(img, 0, BUTTON_WITH_ICON_HEIGHT);
- elm_box_pack_end(box, img);
- evas_object_show(img);
- m_imgMap[buttonName] = img;
-
- Evas_Object *label = elm_label_add(box);
- elm_object_text_set(label, action->getText().c_str());
- elm_box_pack_end(box, label);
- evas_object_show(label);
- evas_object_show(box);
- elm_object_part_content_set(button, "elm.swallow.content", box);
+ auto button = elm_button_add(m_layout);
+ elm_object_style_set(button, action->getIcon().c_str());
+ elm_object_part_text_set(button, "button_text", action->getText().c_str());
elm_object_disabled_set(button, action->isEnabled() ? EINA_FALSE : EINA_TRUE);
evas_object_smart_callback_add(button, "clicked", EAction::callbackFunction, eAction.get());
evas_object_show(button);
void ButtonBar::setButtonsColor(bool secretMode)
{
- for (const auto& it : m_buttonsMap) {
- if (secretMode) {
- //TODO works, state is changed but get gray scale only, why?
- //elm_object_signal_emit(m_imgMap[it.first], "set_secret_mode", "ui");
- evas_object_color_set(it.second.button, 97, 97, 97, 255);
- } else {
- evas_object_color_set(it.second.button, 240, 240, 240, 255);
- elm_object_signal_emit(m_imgMap[it.first], "set_normal_mode", "ui");
- }
- }
+ std::string signal = secretMode ? "set_secret_mode" : "set_normal_mode";
+ elm_object_signal_emit(m_layout, signal.c_str(), "ui");
+ for (const auto& it : m_buttonsMap)
+ elm_object_signal_emit(it.second.button, signal.c_str(), "ui");
}
}
std::map<std::string, sharedAction> m_actionsMap;
//map button name to struct ActionButton which contains Evas_Object of button
std::map<std::string, ActionButton> m_buttonsMap;
- std::map<std::string, Evas_Object*> m_imgMap;
Evas_Object* m_layout;
void refreshButton(const std::string& buttonName);
void onEnabledChanged(const std::string& buttonName, sharedAction action);
#endif
}
-
void WebPageUI::hideUI()
{
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
M_ASSERT(m_parent);
- // set white base background for button
- edje_color_class_set("elm/widget/button/default/bg-default", 255, 255, 255, 255,
- 255, 255, 255, 255,
- 255, 255, 255, 255);
- edje_color_class_set("elm/widget/button/default/bg-disabled", 255, 255, 255, 255,
- 255, 255, 255, 255,
- 255, 255, 255, 255);
-
// create web layout
m_mainLayout = elm_layout_add(m_parent);
evas_object_size_hint_weight_set(m_mainLayout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
#include "ImageButton.edc"
#include "../../../core/Tools/edc/Spacer.edc"
+#include "../../../core/Tools/edc/ToolbarButton.edc"
#define BUTTON_WIDTH 120
#define BUTTON_HEIGHT 94
+#define BUTTON_TOP_PADDING 10
#define TOOLBAR_HEIGHT 96
#define SPACER_SIZE 20
#define SPACER_LANDSCAPE 160
collections { base_scale: 2.6;
- IMAGE_BUTTON("toolbar_prev", ICON_SIZE, ICON_SIZE, "toolbar_ic_back.png")
-
- IMAGE_BUTTON("toolbar_next", ICON_SIZE, ICON_SIZE, "toolbar_ic_forward.png")
-
- IMAGE_BUTTON("toolbar_home", ICON_SIZE, ICON_SIZE, "toolbar_ic_home.png")
-
- IMAGE_BUTTON("toolbar_bookmark", ICON_SIZE, ICON_SIZE, "toolbar_ic_bookmark.png")
-
- IMAGE_BUTTON("toolbar_tabs", ICON_SIZE, ICON_SIZE, "toolbar_ic_tabs.png")
+ TOOLBAR_BUTTON("toolbar_prev" ,"toolbar_ic_back.png", BUTTON_WIDTH, BUTTON_HEIGHT, BUTTON_TOP_PADDING)
+ TOOLBAR_BUTTON("toolbar_next" ,"toolbar_ic_forward.png", BUTTON_WIDTH, BUTTON_HEIGHT, BUTTON_TOP_PADDING)
+ TOOLBAR_BUTTON("toolbar_home" ,"toolbar_ic_home.png", BUTTON_WIDTH, BUTTON_HEIGHT, BUTTON_TOP_PADDING)
+ TOOLBAR_BUTTON("toolbar_bookmark" ,"toolbar_ic_bookmark.png", BUTTON_WIDTH, BUTTON_HEIGHT, BUTTON_TOP_PADDING)
+ TOOLBAR_BUTTON("toolbar_tabs" ,"toolbar_ic_tabs.png", BUTTON_WIDTH, BUTTON_HEIGHT, BUTTON_TOP_PADDING)
group {
name: "bottom_button_bar";
visible: 1;
fixed: 1 1;
align: 0.0 0.0;
- color: 255 255 255 255;
+ color_class: "button_secret";
min: BUTTON_WIDTH BUTTON_HEIGHT*3/4;
max: BUTTON_WIDTH BUTTON_HEIGHT*3/4;
rel1 { relative: 0.0 0.0; to: "tabs_button"; }
align: 0.5 0.5;
}
}
+ description {
+ state: "secret" 0.0;
+ inherit: "default" 0.0;
+ color_class: "button_normal";
+ }
}
}
target: "spacer_3";
target: "spacer_4";
}
+ program {
+ name: "set_normal_mode";
+ signal: "set_normal_mode";
+ source: "ui";
+ action: STATE_SET "default" 0.0;
+ target: "tabs_number";
+ }
+ program {
+ name: "set_secret_mode";
+ signal: "set_secret_mode";
+ source: "ui";
+ action: STATE_SET "secret" 0.0;
+ target: "tabs_number";
+ }
}
}
}
image.normal: IMG; \
color: 105 105 105 255; \
} \
- description { \
- state: "secret" 0.0; \
- inherit: "default" 0.0; \
- color: 250 250 250 255; \
- } \
- } \
- } \
- programs { \
- program { \
- name: "set_normal_mode"; \
- signal: "set_normal_mode"; \
- source: "ui"; \
- action: STATE_SET "default" 0.0; \
- target: "image"; \
- } \
- program { \
- name: "set_secret_mode"; \
- signal: "set_secret_mode"; \
- source: "ui"; \
- action: STATE_SET "secret" 0.0; \
- target: "image"; \
- } \
- } \
- }
-
-#define FOUR_STATE_IMAGE_BUTTON(CLASS_NAME, W, H, IMG_NORMAL, R, G, B) \
- group { \
- name: __CONCAT("elm/button/base/", CLASS_NAME); \
- min: W H; \
- max: W H; \
- data { item: "focus_highlight" "off"; } \
- images { \
- image: IMG_NORMAL COMP; \
- image: "round_rectangle_4X4.png" COMP; \
- } \
- parts { \
- part { \
- name: "bg"; \
- scale: 1; \
- type: RECT; \
- description { state: "default" 0.0; \
- min: W H; \
- max: W H; \
- fixed: 1 1; \
- align: 0 0; \
- color: 255 255 255 153; \
- } \
- description { state: "disabled" 0.0; \
- inherit: "default" 0.0; \
- color: 255 255 255 51; \
- } \
- description { state: "highlight" 0.0; \
- inherit: "default" 0.0; \
- color: 0 0 255 255; \
- } \
- } \
- part { name: high_layer; \
- scale:1; \
- type : IMAGE; \
- repeat_events: 1; \
- description { \
- state: "default" 0.0; \
- visible: 0; \
- color: R G B 255; \
- rel1 { to: "bg"; relative: 0.1 0.1; } \
- rel2 { to: "bg"; relative: 0.9 0.9; } \
- image.normal: "round_rectangle_4X4.png"; \
- image.border: 14 14 14 14; \
- image.border_scale: 1; \
- image.middle: 1; \
- } \
- description { state: "highlight" 0.0; \
- inherit: "default" 0.0; \
- visible: 1; \
- } \
- description { state: "disabled" 0.0; \
- inherit: "highlight" 0.0; \
- visible: 1; \
- color: R G B 102; \
- } \
- } \
- part { \
- name: "top_spacer"; \
- scale: 1; \
- type: RECT; \
- description { \
- visible: 0; \
- min: 0 10; \
- max: -1 10; \
- align: 0 0; \
- rel1 {to: "bg"; relative: 0 0; } \
- rel2 {to: "bg"; relative: 1 1; } \
- } \
- } \
- part { \
- name: "img"; \
- scale: 1; \
- type: IMAGE; \
- description { state: "default" 0.0; \
- rel1 { to: "top_spacer"; relative: 0 1; } \
- rel2 { to: "bg"; relative: 1 1; } \
- fixed: 1 1; \
- align: 0.5 0; \
- min: 48 48; \
- max: 48 48; \
- image.normal: IMG_NORMAL; \
- color: 105 105 105 255; \
- } \
- description { state: "disabled" 0.0; \
- inherit: "default" 0.0; \
- color: 0 255 0 51; \
- } \
- description { state: "highlight" 0.0; \
- inherit: "default" 0.0; \
- color: 255 0 0 255; \
- } \
- } \
- part { \
- name: "text_spacer"; \
- scale: 1; \
- type: RECT; \
- repeat_events: 1; \
- description { \
- visible: 0; \
- min: 0 60; \
- max: -1 60; \
- align: 0 0; \
- rel1 {to: "bg"; relative: 0 0; } \
- rel2 {to: "bg"; relative: 1 1; } \
- } \
- } \
- part { \
- name: "elm.swallow.text"; \
- scale: 1; \
- type: TEXT; \
- repeat_events: 1; \
- description { state: "default" 0.0; \
- visible: 1; \
- rel1 { to: "text_spacer"; relative: 0 1; } \
- rel2 { to: "bg"; relative: 1 1; } \
- fixed: 1 1; \
- align: 0 0; \
- color: 0 0 0 255; \
- text { \
- text: "Bookmarks"; \
- font: "ATO005"; \
- size: 24; \
- align: 0.0 0.0; \
- } \
- } \
- } \
- part { name: "over2"; \
- type: RECT; \
- scale:1; \
- mouse_events: 1; \
- repeat_events: 1; \
- ignore_flags: ON_HOLD; \
- description { state: "default" 0.0; \
- color: 0 0 0 0; \
- rel1 { relative: 0 0; to: "bg"; } \
- rel2 { relative: 1 1; to: "bg"; } \
- } \
- } \
- part { name: "over3"; \
- scale:1; \
- type: RECT; \
- mouse_events: 1; \
- repeat_events: 1; \
- description { state: "default" 0.0; \
- color: 0 0 0 0; \
- rel1 { relative: 0 0; to: "bg"; } \
- rel2 { relative: 1 1; to: "bg"; } \
- } \
- } \
- part { name: "disabler"; \
- scale:1; \
- type: RECT; \
- repeat_events: 0; \
- mouse_events: 1; \
- description { state: "default" 0.0; \
- color: 0 0 0 0; \
- visible: 0; \
- rel1 { relative: 0 0; to: "bg"; } \
- rel2 { relative: 1 1; to: "bg"; } \
- } \
- description { state: "disabled" 0.0; \
- inherit: "default" 0.0; \
- visible: 1; \
- } \
- } \
- } \
- programs { \
- program { \
- name: "disable"; \
- signal: "elm,state,disabled"; \
- source: "elm"; \
- action: STATE_SET "disabled" 0.0; \
- target: "bg"; \
- target: "disabler"; \
- } \
- program { \
- name: "enable"; \
- signal: "elm,state,enabled"; \
- source: "elm"; \
- action: STATE_SET "default" 0.0; \
- target: "bg"; \
- target: "disabler"; \
- } \
- program { \
- name: "mouse_down"; \
- signal: "mouse,down,1"; \
- source: "over2"; \
- script { \
- emit("elm,action,press", ""); \
- } \
- after: "focused"; \
- } \
- program { \
- name: "mouse_up"; \
- signal: "mouse,up,1"; \
- source: "over2"; \
- script { \
- emit("elm,action,unpress", ""); \
- } \
- after: "unfocused"; \
- } \
- program { \
- name: "mouse_click"; \
- signal: "mouse,clicked,1"; \
- source: "over2"; \
- script { \
- emit("elm,action,click", ""); \
- } \
- } \
- program { \
- name: "mouse_down_disabled"; \
- signal: "mouse,down,*"; \
- source: "disabler"; \
- action: STATE_SET "disabled" 0.0; \
- target: "high_layer"; \
- target: "bg"; \
- } \
- program { \
- name: "mouse_up_disabled"; \
- signal: "mouse,up,*"; \
- source: "disabler"; \
- action: STATE_SET "default" 0.0; \
- target: "high_layer"; \
- } \
- program { \
- name: "focused"; \
- action: STATE_SET "highlight" 0.0; \
- target: "high_layer"; \
- target: "bg"; \
- } \
- program { \
- name: "unfocused"; \
- action: STATE_SET "default" 0.0; \
- target: "high_layer"; \
- target: "bg"; \
} \
} \
}
#include "ImageButton.edc"
#include "../../../core/Tools/edc/Spacer.edc"
+#include "../../../core/Tools/edc/ToolbarButton.edc"
+
+#define BUTTON_WIDTH 100
+#define BUTTON_HEIGHT 106
+#define BUTTON_TOP_PADDING 16
+
collections { base_scale: 2.6;
- IMAGE_BUTTON("add_tab", 50, 50, "internet_ic_add.png")
+ TOOLBAR_BUTTON("add_tab" ,"internet_ic_add.png", BUTTON_WIDTH, BUTTON_HEIGHT, BUTTON_TOP_PADDING)
group {
name: "right_button_bar";
visible: 1;
fixed: 1 1;
align: 0.0 0.0;
- min: 100 106;
- max: 100 106;
+ min: BUTTON_WIDTH BUTTON_HEIGHT;
+ max: BUTTON_WIDTH BUTTON_HEIGHT;
rel1 { relative: 0.0 0.0; }
}
}
-#define URI_LENGTH 518
-#define URI_WIDTH 80
+#define URI_HEIGHT 80
#define URI_BG_HEIGHT 108
-#define URI_BG_WIDTH 720
+#define ADD_TAB_WIDTH 100
+#define ADD_TAB_HEIGHT 106
#define BOTTOM_TOOLBAR_HEIGHT 96
-#define MORE_HEIGHT_VERTICAL 586
-#define MORE_HEIGHT_LANDSCAPE 373
#define FINDONPAGE_HEIGHT 104
#define FINDONPAGE_WIDTH 720
#define SPACER_SIZE 16
color_class: "secret";
}
}
- ADD_SPACER_OVER("left_spacer", "uri_bar_bg", SPACER_SIZE, SPACER_SIZE)
part {
- name: "uri_entry";
- type : SWALLOW;
+ name: "right_spacer";
+ type: RECT;
scale: 1;
description {
state: "default" 0.0;
- visible: 1;
- align: 0.0 0.0;
- min: 0 URI_WIDTH;
- max: -1 URI_WIDTH;
+ visible: 0;
fixed: 0 1;
- rel1 { relative: 1.0 1.0; to: "left_spacer"; }
- rel2 { relative: 0.0 1.0; to: "spacer_after_uri_entry"; }
+ align: 1 1;
+ min: 14 URI_BG_HEIGHT;
+ max: 14 URI_BG_HEIGHT;
+ rel1 { relative: 0.0 0.0; to: "uri_bar_bg"; }
+ rel2 { relative: 1.0 1.0; to: "uri_bar_bg"; }
}
description {
- state: "moveright" 0.0;
+ state: "entry_enlarged" 0.0;
inherit: "default" 0.0;
- visible: 1;
- rel1 { relative: 1.0 1.0; to: "left_spacer"; }
- rel2 { relative: 0.0 1.0; to: "spacer_after_uri_entry"; }
+ min: 0 URI_BG_HEIGHT;
+ max: 0 URI_BG_HEIGHT;
}
+ }
+
+ part {
+ name: "uri_bar_buttons_right";
+ type : SWALLOW;
+ scale: 1;
description {
- state: "entry_enlarged" 0.0;
- inherit: "default" 0.0;
+ state: "default" 0.0;
visible: 1;
- max: -1 URI_WIDTH;
- rel2 {
- to: "spacer_after_uri_entry";
- relative: 0.0 1.0;
- }
+ align: 1.0 0.0;
+ min: ADD_TAB_WIDTH ADD_TAB_HEIGHT;
+ max: ADD_TAB_WIDTH ADD_TAB_HEIGHT;
+ fixed: 1 1;
+ rel1 { relative: 0.0 0.0; to: "uri_bar_bg"; }
+ rel2 { relative: 0.0 1.0; to: "right_spacer"; }
}
description {
state: "hidden" 0.0;
inherit: "default" 0.0;
+ min: 0 ADD_TAB_HEIGHT;
+ max: 0 ADD_TAB_HEIGHT;
visible: 0;
}
description {
- state: "visible" 0.0;
- inherit: "default" 0.0;
- visible: 1;
+ state: "entry_enlarged" 0.0;
+ inherit: "hidden" 0.0;
}
}
}
}
+ ADD_SPACER_OVER("left_spacer", "uri_bar_bg", SPACER_SIZE, SPACER_SIZE)
+
part {
- name: "uri_bar_buttons_right";
+ name: "uri_entry";
type : SWALLOW;
scale: 1;
description {
state: "default" 0.0;
visible: 1;
- align: 1.0 1.0;
- min: 100 URI_BG_HEIGHT;
- max: 100 URI_BG_HEIGHT;
- fixed: 1 1;
- rel1 { relative: 0.0 0.0; to: "uri_bar_bg"; }
- rel2 { relative: 1.0 1.0; to: "uri_bar_bg"; }
+ align: 0.0 0.0;
+ min: 0 URI_HEIGHT;
+ max: -1 URI_HEIGHT;
+ fixed: 0 1;
+ rel1 { relative: 1.0 1.0; to: "left_spacer"; }
+ rel2 { relative: 0.0 1.0; to: "spacer_after_uri_entry"; }
}
description {
- state: "hidden" 0.0;
+ state: "moveright" 0.0;
inherit: "default" 0.0;
- min: 0 URI_BG_HEIGHT;
- max: 0 URI_BG_HEIGHT;
- visible: 0;
+ visible: 1;
+ rel1 { relative: 1.0 1.0; to: "left_spacer"; }
+ rel2 { relative: 0.0 1.0; to: "spacer_after_uri_entry"; }
}
description {
state: "entry_enlarged" 0.0;
inherit: "default" 0.0;
- min: 0 URI_BG_HEIGHT;
- max: 0 URI_BG_HEIGHT;
- visible: 0;
+ visible: 1;
+ max: -1 URI_HEIGHT;
+ rel2 {
+ to: "spacer_after_uri_entry";
+ relative: 0.0 1.0;
+ }
}
description {
- state: "visible" 0.0;
+ state: "hidden" 0.0;
inherit: "default" 0.0;
- visible: 1;
+ visible: 0;
}
}
color_class: "secret";
}
}
+ rect {
+ name: "swallow_spacer";
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ min: 0 2;
+ max: -1 2;
+ align: 0.0 0.0;
+ rel1 { relative: 0.0 0.0; to: "bottom_toolbar"; }
+ rel2 { relative: 1.0 1.0; to: "bottom_toolbar"; }
+ }
+ }
part {
name: "bottom_swallow";
type: SWALLOW;
description {
state: "default" 0.0;
visible: 1;
- rel1 { relative: 0.0 0.0; to: "bottom_toolbar"; }
+ rel1 { relative: 0.0 1.0; to: "swallow_spacer"; }
rel2 { relative: 1.0 1.0; to: "bottom_toolbar"; }
}
}
action: STATE_SET "entry_enlarged" 0.0;
target: "uri_entry";
target: "uri_bar_buttons_right";
+ target: "right_spacer";
}
program {
name: "decrease_unfocused_uribar";
action: STATE_SET "default" 0.0;
target: "uri_entry";
target: "uri_bar_buttons_right";
+ target: "right_spacer";
}
program {
name: "hide_uri_bar_landscape";