summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyerim Bae <hyerim.bae@samsung.com>2012-09-05 21:32:51 +0900
committerHyerim Bae <hyerim.bae@samsung.com>2012-09-05 21:37:01 +0900
commitb58203becf5f6579d79d2481a050d3da716848c3 (patch)
tree042af862a8f7e07ccc31f374f92152f3171919d2
parent2c9628d7e9b9bdb401677ad147c480838a1279bb (diff)
downloadorg.tizen.browser-b58203becf5f6579d79d2481a050d3da716848c3.tar.gz
org.tizen.browser-b58203becf5f6579d79d2481a050d3da716848c3.tar.bz2
org.tizen.browser-b58203becf5f6579d79d2481a050d3da716848c3.zip
[Title] Fix issue that the empty item is flickering when delete most visited item.
[Issue#] N_SE-9119 [Problem] The empty item is flickering when delete most visited item. [Cause] The empty item is added by idler. [Solution] Do not use idler in case of empty item. [Developer] Hyerim Bae Change-Id: I9a292686b2836aa74347727f0276ebf42a75f6df
-rw-r--r--edc/most-visited-sites.edc355
-rw-r--r--images/browser-view-images/most-visited-sites/00_winset_thumbs_bg.pngbin0 -> 3233 bytes
-rw-r--r--images/browser-view-images/most-visited-sites/00_winset_thumbs_focus_bg.pngbin0 -> 3114 bytes
-rw-r--r--src/most-visited-sites/most-visited-sites.cpp16
4 files changed, 256 insertions, 115 deletions
diff --git a/edc/most-visited-sites.edc b/edc/most-visited-sites.edc
index 93cb8e0..5d28a53 100644
--- a/edc/most-visited-sites.edc
+++ b/edc/most-visited-sites.edc
@@ -801,118 +801,247 @@ collections {
}
}
}
- group {
- name: "elm/gengrid/item/default_grid/browser/most_visited_sites/default";
- data.item: "contents" "elm.swallow.icon elm.swallow.end";
- parts {
- part {
- name: "bg";
- type: RECT;
- description {
- state: "default" 0.0;
- color: 0 0 0 0;
- rel1 { relative: 0.0 0.0; }
- rel2 { relative: 1.0 1.0; }
- }
- }
- part {
- name: "left_top_padding";
- type: RECT;
- description {
- state: "default" 0.0;
- min: 8 15;
- align: 0.0 0.0;
- color: 0 0 0 0;
- rel1 { relative: 0.0 0.0; to: "bg"; }
- rel2 { relative: 0.0 0.0; to: "bg"; }
- }
- }
- part {
- name: "right_bottom_padding";
- type: RECT;
- description {
- state: "default" 0.0;
- min: 7 0;
- color: 0 0 0 0;
- align: 1.0 1.0;
- rel1 { relative: 1.0 1.0; to: "bg"; }
- rel2 { relative: 1.0 1.0; to: "bg"; }
- }
- }
- part {
- name: "area_bg";
- type: RECT;
- description {
- state: "default" 0.0;
- color: 0 0 0 0;
- rel1 { relative: 1.0 1.0; to_x: "left_top_padding"; to_y: "left_top_padding";}
- rel2 { relative: 0.0 0.0; to_x: "right_bottom_padding"; to_y: "right_bottom_padding";}
- }
- description {
- state: "enabled" 0.0;
- inherit: "default" 0.0;
- rel1.offset: -6 -6;
- rel2.offset: 5 5;
- }
- }
- part {
- name: "elm.swallow.icon";
- type: SWALLOW;
- description {
- state: "default" 0.0;
- rel1 { relative: 0.0 0.0; offset: 1 1; to: "area_bg"; }
- rel2 { relative: 1.0 1.0; offset: -2 -2; to: "area_bg"; }
- }
- }
-
- part {
- name: "elm.swallow.end";
- type: SWALLOW;
- description {
- state: "default" 0.0;
- rel1 { relative: 0.0 0.0; to: "elm.swallow.icon"; }
- rel2 { relative: 1.0 1.0; to: "elm.swallow.icon"; }
- }
- }
- part {
- name: "reorder_bg";
- type: RECT;
- description {
- state: "default" 0.0;
- color: 0 0 0 0;
- visible: 0;
- align: 0.0 0.0;
- rel1 { relative: 0.075 0.075; to: "area_bg"; }
- rel2 { relative: 0.925 0.925; to: "area_bg"; }
- }
- description {
- state: "enabled" 0.0;
- inherit: "default" 0.0;
- color: 0 0 0 128;
- visible: 1;
- }
- }
- }
- programs {
- program {
- name: "go_reorder_disabled";
- signal: "elm,state,reorder,disabled";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "area_bg";
- target: "reorder_bg";
- transition: ACCELERATE 0.3;
- }
- program {
- name: "go_reorder_enabled";
- signal: "elm,state,reorder,enabled";
- source: "elm";
- action: STATE_SET "enabled" 0.0;
- target: "area_bg";
- target: "reorder_bg";
- transition: ACCELERATE 0.3;
- }
- }
- }
+ group { name: "elm/gengrid/item/default_grid/browser/most_visited_sites/default";
+ data.item: "contents" "elm.swallow.icon elm.swallow.end";
+ images {
+ image : "browser-view-images/most-visited-sites/00_winset_thumbs_bg.png" COMP;
+ image : "browser-view-images/most-visited-sites/00_winset_thumbs_focus_bg.png" COMP;
+ }
+ parts {
+ part { name: "bg";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "left_top_padding";
+ type: RECT;
+ scale : 1;
+ description { state: "default" 0.0;
+ min: 8 18;
+ align: 0.0 0.0;
+ visible: 0;
+ rel1.to: "bg";
+ rel2 {
+ relative: 0.0 0.0;
+ to: "bg";
+ }
+ }
+ }
+ part { name: "right_bottom_padding";
+ type: RECT;
+ scale: 1;
+ description { state: "default" 0.0;
+ min: 8 0;
+ align: 1.0 1.0;
+ visible: 0;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "bg";
+ }
+ rel2.to: "bg";
+ }
+ }
+ part { name: "item_bg";
+ type: IMAGE;
+ description { state: "default" 0.0;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "left_top_padding";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to: "right_bottom_padding";
+ }
+ image.normal: "browser-view-images/most-visited-sites/00_winset_thumbs_bg.png";
+ }
+ }
+ part { name: "item_bg_left_top_padding";
+ type: RECT;
+ scale : 1;
+ description { state: "default" 0.0;
+ min: 2 0;
+ align: 0.0 0.0;
+ visible: 0;
+ rel1.to: "item_bg";
+ rel2 {
+ relative: 0.0 0.0;
+ to: "item_bg";
+ }
+ }
+ }
+ part { name: "item_bg_right_bottom_padding";
+ type: RECT;
+ scale : 1;
+ description { state: "default" 0.0;
+ min: 2 6;
+ align: 1.0 1.0;
+ visible: 0;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "item_bg";
+ }
+ rel2.to: "item_bg";
+ }
+ }
+ part { name: "item_real_bg";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 190 189 189 255;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "item_bg_left_top_padding";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to: "item_bg_right_bottom_padding";
+ }
+ }
+ }
+ part { name: "item_real_bg_left_top_padding";
+ type: RECT;
+ scale : 1;
+ description { state: "default" 0.0;
+ min: 2 2;
+ align: 0.0 0.0;
+ visible: 0;
+ rel1.to: "item_real_bg";
+ rel2 {
+ relative: 0.0 0.0;
+ to: "item_real_bg";
+ }
+ }
+ }
+ part { name: "item_real_bg_right_bottom_padding";
+ type: RECT;
+ scale : 1;
+ description { state: "default" 0.0;
+ min: 2 2;
+ align: 1.0 1.0;
+ visible: 0;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "item_real_bg";
+ }
+ rel2.to: "item_real_bg";
+ }
+ }
+ part { name: "elm.swallow.icon";
+ type: SWALLOW;
+ description { state: "default" 0.0;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "item_real_bg_left_top_padding";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to: "item_real_bg_right_bottom_padding";
+ }
+ }
+ }
+ part { name: "elm.swallow.end";
+ type: SWALLOW;
+ description { state: "default" 0.0;
+ rel1.to: "elm.swallow.icon";
+ rel2.to: "elm.swallow.icon";
+ }
+ }
+ part { name: "reorder_bg";
+ type: RECT;
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ //color: GENGRID_PART_BG_COLOR_INC;
+ color: 0 0 0 0;
+ rel1.to: "item_bg";
+ rel2.to: "item_bg";
+ }
+ description { state: "enabled" 0.0;
+ inherit: "default" 0.0;
+ //color: GENGRID_PART_REORDER_BG_COLOR_INC;
+ color: 0 255 255 255;
+// color: 0 0 0 0;
+ }
+ }
+ part { name: "focus_bg_left_top_padding";
+ type: RECT;
+ scale : 1;
+ description { state: "default" 0.0;
+ min: 8 16;
+ align: 0.0 0.0;
+ visible: 0;
+ rel1.to: "bg";
+ rel2 {
+ relative: 0.0 0.0;
+ to: "bg";
+ }
+ }
+ }
+ part { name: "focus_bg_right_bottom_padding";
+ type: RECT;
+ scale: 1;
+ description { state: "default" 0.0;
+ min: 8 4;
+ align: 1.0 1.0;
+ visible: 0;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "bg";
+ }
+ rel2.to: "bg";
+ }
+ }
+ part { name: "focus_bg";
+ type: IMAGE;
+ description { state: "default" 0.0;
+ visible: 0;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "focus_bg_left_top_padding";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to: "focus_bg_right_bottom_padding";
+ }
+ image.normal: "browser-view-images/most-visited-sites/00_winset_thumbs_focus_bg.png";
+ }
+ description { state: "enabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ }
+ programs {
+ program { name: "go_mouse_down";
+ signal: "mouse,down,1";
+ source: "reorder_bg";
+ action: STATE_SET "enabled" 0.0;
+ target: "focus_bg";
+ transition: ACCELERATE 0.2;
+ }
+ program { name: "go_mouse_up";
+ signal: "mouse,up,1";
+ source: "reorder_bg";
+ action: STATE_SET "default" 0.0;
+ target: "focus_bg";
+ transition: DECELERATE 0.2;
+ }
+ program { name: "go_reorder_disabled";
+ signal: "elm,state,reorder,disabled";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "reorder_bg";
+ target: "focus_bg";
+ transition: ACCELERATE 0.3;
+ }
+ program { name: "go_reorder_enabled";
+ signal: "elm,state,reorder,enabled";
+ source: "elm";
+ action: STATE_SET "enabled" 0.0;
+ target: "reorder_bg";
+ target: "focus_bg";
+ transition: DECELERATE 0.3;
+ }
+ }
+ }
} \ No newline at end of file
diff --git a/images/browser-view-images/most-visited-sites/00_winset_thumbs_bg.png b/images/browser-view-images/most-visited-sites/00_winset_thumbs_bg.png
new file mode 100644
index 0000000..6226c90
--- /dev/null
+++ b/images/browser-view-images/most-visited-sites/00_winset_thumbs_bg.png
Binary files differ
diff --git a/images/browser-view-images/most-visited-sites/00_winset_thumbs_focus_bg.png b/images/browser-view-images/most-visited-sites/00_winset_thumbs_focus_bg.png
new file mode 100644
index 0000000..4f7d66f
--- /dev/null
+++ b/images/browser-view-images/most-visited-sites/00_winset_thumbs_focus_bg.png
Binary files differ
diff --git a/src/most-visited-sites/most-visited-sites.cpp b/src/most-visited-sites/most-visited-sites.cpp
index dc38d9e..15024f6 100644
--- a/src/most-visited-sites/most-visited-sites.cpp
+++ b/src/most-visited-sites/most-visited-sites.cpp
@@ -733,7 +733,19 @@ Evas_Object *Most_Visited_Sites::__gengrid_icon_get_cb(void *data, Evas_Object *
BROWSER_LOGE("elm_layout_add failed");
return NULL;
}
- ecore_idler_add(__gengrid_icon_get_idler_cb, item);
+
+ if (item->history_id) {
+ ecore_idler_add(__gengrid_icon_get_idler_cb, item);
+ } else {
+ if (!elm_layout_file_set(item->layout, BROWSER_EDJE_DIR"/most-visited-sites.edj",
+ "most_visited_sites_empty_item")) {
+ BROWSER_LOGE("elm_layout_file_set failed");
+ return NULL;
+ }
+ evas_object_size_hint_weight_set(item->layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(item->layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ }
+
return item->layout;
}
return NULL;
@@ -1110,7 +1122,7 @@ Evas_Object *Most_Visited_Sites::create_most_visited_sites_main_layout(void)
// elm_gengrid_reorder_mode_set(m_gengrid, EINA_TRUE);
// m_gengrid_item_class = elm_gengrid_item_class_new();
// m_gengrid_item_class->item_style = "default_grid/browser/most_visited_sites";
- m_gengrid_item_class.item_style = "default_grid";
+ m_gengrid_item_class.item_style = "default_grid/browser/most_visited_sites";
m_gengrid_item_class.func.text_get = NULL;
m_gengrid_item_class.func.content_get = __gengrid_icon_get_cb;
m_gengrid_item_class.func.state_get = NULL;