diff options
author | jinwoo.shin <jw0227.shin@samsung.com> | 2015-07-20 19:50:59 +0900 |
---|---|---|
committer | jinwoo.shin <jw0227.shin@samsung.com> | 2015-07-21 10:21:22 +0900 |
commit | 9c640b0dad0fd4e043aa3e6597607616222089c5 (patch) | |
tree | 2fd0d6e81ba7c89b05dd5b1b16ff99afbb64afd9 | |
parent | b43b26cce65667525e1c8db55ab399d3ad121926 (diff) | |
download | air_infosquare-9c640b0dad0fd4e043aa3e6597607616222089c5.tar.gz air_infosquare-9c640b0dad0fd4e043aa3e6597607616222089c5.tar.bz2 air_infosquare-9c640b0dad0fd4e043aa3e6597607616222089c5.zip |
Update notification grid
Change-Id: Ib3658e6f1548dac7661a973bdbbac16f34526b85
Signed-off-by: jinwoo.shin <jw0227.shin@samsung.com>
-rw-r--r-- | data/infosquare-theme.edc | 1 | ||||
-rw-r--r-- | data/view/notification_view.edc | 5 | ||||
-rw-r--r-- | data/widget/gengrid.edc | 679 | ||||
-rw-r--r-- | images/btn_bar_clearall_dis.png | bin | 3429 -> 3529 bytes | |||
-rw-r--r-- | images/btn_bar_clearall_foc.png | bin | 3423 -> 3458 bytes | |||
-rw-r--r-- | images/btn_bar_clearall_nor.png | bin | 3450 -> 3545 bytes | |||
-rw-r--r-- | images/btn_noti_list_clearall_dis.png | bin | 1532 -> 1617 bytes | |||
-rw-r--r-- | images/btn_noti_list_clearall_foc.png | bin | 1549 -> 1610 bytes | |||
-rw-r--r-- | images/btn_noti_list_clearall_nor.png | bin | 1574 -> 1630 bytes | |||
-rw-r--r-- | include/define.h | 4 | ||||
-rw-r--r-- | src/main.c | 2 | ||||
-rw-r--r-- | src/notification_view.c | 13 |
12 files changed, 694 insertions, 10 deletions
diff --git a/data/infosquare-theme.edc b/data/infosquare-theme.edc index 52e787d..f92291c 100644 --- a/data/infosquare-theme.edc +++ b/data/infosquare-theme.edc @@ -17,4 +17,5 @@ #include "../include/define.h" collections { + #include "widget/gengrid.edc" } diff --git a/data/view/notification_view.edc b/data/view/notification_view.edc index 96ae15f..ced0b19 100644 --- a/data/view/notification_view.edc +++ b/data/view/notification_view.edc @@ -31,7 +31,6 @@ group { min, 0 104; align, 0.0 0.0; fixed, 1 1; - visible, 1; } } part { @@ -249,7 +248,6 @@ group { color, 77 77 77 255; align, 0.0 0.0; fixed, 0 1; - visible, 1; } description { state, "focused" 0.0; @@ -293,8 +291,7 @@ group { } min, 0 614; align, 0.0 0.0; - fixed, 0 1; - visible, 1; + fixed, 1 1; } } } diff --git a/data/widget/gengrid.edc b/data/widget/gengrid.edc new file mode 100644 index 0000000..b2cc004 --- /dev/null +++ b/data/widget/gengrid.edc @@ -0,0 +1,679 @@ +/* + * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define SOURCE_EDC "edc" +#define SIGNAL_ITEM_SELECTED "item,selected" +#define COLOR_TEXT_TITLE 51 51 51 255 +#define COLOR_TEXT_FOCUS 255 255 255 255 +#define COLOR_TEXT_INFO 153 153 153 255 +#define COLOR_ITEM_DEFAULT 119 169 202 255 +#define COLOR_ITEM_FOCUS 0 119 246 255 +#define COLOR_ITEM_FOCUS_0 0 119 246 0 +#define COLOR_ITEM_BG 255 255 255 255 +#define COLOR_ITEM_BORDER 194 194 194 255 + +group { + name: "elm/gengrid/item/notification_item/default"; + data.item: "selectraise" "on"; + data.item: "texts" "elm.text elm.text1 elm.text2"; + data.item: "contents" "elm.swallow.icon"; + data.item: "focus_highlight" "on"; + images { + image: "ic_thumb_connection.png" COMP; + } + parts { + part { + name: "elm.padding.bottom_right"; + type: SPACER; + scale: 1; + description { + state: "default" 0.0; + rel1.relative: 1.0 1.0; + min: 26 26; + align: 1.0 1.0; + fixed: 1 1; + } + } + part { + name: "map"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + perspective { + zplane: 0; + focal: 1000; + } + visible: 0; + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + perspective.zplane: -100; + } + } + part { + name: "bg"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + rel2 { + to: "elm.padding.bottom_right"; + relative: 0.0 0.0; + } + fixed: 1 1; + visible: 0; + } + } + part { + name: "defaultbg"; + type: RECT; + scale: 1; + mouse_events: 1; + description { + state: "default" 0.0; + rel1.to: "bg"; + rel2 { + to: "elm.bg.text"; + relative: 0.0 1.0; + } + color: COLOR_ITEM_DEFAULT; + map { + perspective_on: 1; + perspective: "map"; + } + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + map.on: 1; + } + } + part { + name: "default_image"; + type: IMAGE; + scale: 1; + mouse_events: 1; + description { + state: "default" 0.0; + rel1 { + to: "defaultbg"; + relative: 0.5 0.5; + } + rel2 { + to: "defaultbg"; + relative: 0.5 0.5; + } + image.normal: "ic_thumb_connection.png"; + min: 80 80; + fixed: 1 1; + map { + perspective_on: 1; + perspective: "map"; + } + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + map.on: 1; + } + } + part { + name: PART_ICON; + type: SWALLOW; + scale: 1; + mouse_events: 1; + description { + state : "default" 0.0; + rel1.to: "defaultbg"; + rel2.to: "defaultbg"; + map { + perspective_on: 1; + perspective: "map"; + } + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + map.on: 1; + } + } + part { + name: "part_focus1"; + type: RECT; + mouse_events: 0; + scale: 1; + description { + state: "default" 0.0; + rel1.to: "bg"; + rel2 { + to: "elm.bg.text"; + relative: 0.0 0.0; + } + min: 0 6; + align: 0.5 0.0; + color: COLOR_ITEM_FOCUS; + fixed: 0 1; + visible: 0; + map { + perspective_on: 1; + perspective: "map"; + } + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + map.on: 1; + visible: 1; + } + description { + state: "selected_0" 0.0; + inherit: "default" 0.0; + visible: 1; + color: COLOR_ITEM_FOCUS_0; + } + } + part { + name: "part_focus2"; + type: RECT; + mouse_events: 0; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: "part_focus1"; + relative: 0.0 1.0; + } + rel2 { + to: "bg"; + relative: 0.0 1.0; + } + min: 6 0; + align: 0.0 0.5; + color: COLOR_ITEM_FOCUS; + fixed: 1 0; + visible: 0; + map { + perspective_on: 1; + perspective: "map"; + } + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + map.on: 1; + visible: 1; + } + description { + state: "selected_0" 0.0; + inherit: "default" 0.0; + visible: 1; + color: COLOR_ITEM_FOCUS_0; + } + } + part { + name: "part_focus3"; + type: RECT; + mouse_events: 0; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: "part_focus2"; + relative: 1.0 1.0; + } + rel2 { + to: "elm.bg.text"; + relative: 0.0 1.0; + } + min: 0 6; + align: 0.5 1.0; + color: COLOR_ITEM_FOCUS; + fixed: 1 0; + visible: 0; + map { + perspective_on: 1; + perspective: "map"; + } + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + map.on: 1; + visible: 1; + } + description { + state: "selected_0" 0.0; + inherit: "default" 0.0; + visible: 1; + color: COLOR_ITEM_FOCUS_0; + } + } + part { + name: "defaultbg_text"; + type: RECT; + mouse_events: 0; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: "bg"; + relative: 1.0 0.0; + } + rel2.to: "bg"; + min: 354 0; + align: 1.0 0.5; + color: COLOR_ITEM_BG; + fixed: 1 0; + map { + perspective_on: 1; + perspective: "map"; + } + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + color: COLOR_ITEM_FOCUS; + map.on: 1; + } + } + part { + name: "elm.bg.text"; + type: RECT; + mouse_events: 0; + scale: 1; + description { + state: "default" 0.0; + rel1.to: "defaultbg_text"; + rel2.to: "defaultbg_text"; + color: COLOR_ITEM_BG; + map { + perspective_on: 1; + perspective: "map"; + } + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + color: COLOR_ITEM_FOCUS; + map.on: 1; + } + description { + state: "selected_0" 0.0; + inherit: "default" 0.0; + color: COLOR_ITEM_FOCUS_0; + } + } + part { + name: "elm.padding.title.left"; + type: SPACER; + scale: 1; + description { + state: "default" 0.0; + rel1.to: "elm.bg.text"; + rel2 { + to: "elm.bg.text"; + relative: 0.0 0.0; + } + min: 28 22; + align: 0.0 0.0; + fixed: 1 1; + } + } + part { + name: "elm.padding.title.right"; + type: SPACER; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: "elm.bg.text"; + relative: 1.0 0.0; + } + rel2 { + to: "elm.bg.text"; + relative: 1.0 0.0; + } + min: 102 22; + align: 1.0 0.0; + fixed: 1 1; + } + } + part { + name: PART_TITLE; + type: TEXT; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: "elm.padding.title.left"; + relative: 1.0 1.0; + } + rel2 { + to: "elm.padding.title.right"; + relative: 0.0 1.0; + } + text { + font: FONT_LIGHT; + size: 28; + align: 0.0 0.5; + } + min: 0 28; + align: 0.5 0.0; + color: COLOR_TEXT_TITLE; + fixed: 0 1; + map { + perspective_on: 1; + perspective: "map"; + } + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + color: COLOR_TEXT_FOCUS; + map.on: 1; + } + description { + state: "selected_0" 0.0; + inherit: "selected" 0.0; + } + } + part { + name: "elm.padding.text1.left"; + type: SPACER; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: PART_TITLE; + relative: 0.0 1.0; + } + rel2 { + to: PART_TITLE; + relative: 0.0 1.0; + } + min: 0 14; + align: 0.0 0.0; + fixed: 1 1; + } + } + part { + name: "elm.padding.text1.right"; + type: SPACER; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: PART_TITLE; + relative: 1.0 1.0; + } + rel2.to: PART_TITLE; + min: 78 14; + align: 0.0 0.0; + fixed: 1 1; + } + } + part { + name: PART_TEXT1; + type: TEXT; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: "elm.padding.text1.left"; + relative: 1.0 1.0; + } + rel2.to: "elm.padding.text1.right"; + text { + font: FONT_LIGHT; + size: 24; + align: 0.0 0.5; + } + min: 0 24; + align: 0.5 0.0; + color: COLOR_TEXT_INFO; + fixed: 0 1; + map { + perspective_on: 1; + perspective: "map"; + } + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + color: COLOR_TEXT_FOCUS; + map.on: 1; + } + description { + state: "selected_0" 0.0; + inherit: "selected" 0.0; + } + } + part { + name: "elm.padding.text2"; + type: SPACER; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: PART_TEXT1; + relative: 0.0 1.0; + } + rel2.to: PART_TEXT1; + min: 0 4; + align: 0.5 0.0; + fixed: 0 1; + } + } + part { + name: PART_TEXT2; + type: TEXT; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: "elm.padding.text2"; + relative: 0.0 1.0; + } + rel2.to: "elm.padding.text2"; + text { + font: FONT_LIGHT; + size: 24; + align: 0.0 0.5; + } + min: 0 24; + align: 0.5 0.0; + color: COLOR_TEXT_INFO; + fixed: 0 1; + map { + perspective_on: 1; + perspective: "map"; + } + } + description { + state: "selected" 0.0; + inherit: "default" 0.0; + color: COLOR_TEXT_FOCUS; + map.on: 1; + } + description { + state: "selected_0" 0.0; + inherit: "selected"; + } + } + part { + name: "border_up"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + rel1.to: "bg"; + rel2 { + to: "bg"; + relative: 1.0 0.0; + } + min: 0 1; + align: 0.5 0.0; + color: COLOR_ITEM_BORDER; + fixed: 0 1; + } + } + part { + name: "border_left"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: "border_up"; + relative: 0.0 1.0; + } + rel2 { + to: "bg"; + relative: 0.0 1.0; + } + min: 1 0; + align: 0.0 0.5; + color: COLOR_ITEM_BORDER; + fixed: 1 0; + } + } + part { + name: "border_right"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: "border_up"; + relative: 1.0 1.0; + } + rel2.to: "bg"; + min: 1 0; + align: 1.0 0.5; + color: COLOR_ITEM_BORDER; + fixed: 1 0; + } + } + part { + name: "border_down"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + rel1 { + to: "border_left"; + relative: 1.0 1.0; + } + rel2 { + to: "border_right"; + relative: 0.0 1.0; + } + min: 0 1; + align: 0.5 1.0; + color: COLOR_ITEM_BORDER; + fixed: 0 1; + } + } + } + programs { + program { + name: "go_active"; + signal: "elm,state,focused"; + source: "elm"; + action: STATE_SET "selected_0" 0.0; + target: "part_focus1"; + target: "part_focus2"; + target: "part_focus3"; + target: "elm.bg.text"; + target: PART_TITLE; + target: PART_TEXT1; + target: PART_TEXT2; + after: "focus,in,anim"; + } + program { + name: "focus,in,anim"; + action: STATE_SET "selected" 0.0; + target: "defaultbg"; + target: PART_ICON; + target: "default_image"; + target: "part_focus1"; + target: "part_focus2"; + target: "part_focus3"; + target: "elm.bg.text"; + transition: LINEAR 0.17; + after: "focus,in,anim,2"; + } + program { + name: "focus,in,anim,2"; + action: STATE_SET "selected" 0.0; + target: "defaultbg_text"; + } + program { + name: "go_passive"; + signal: "elm,state,unfocused"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: PART_TITLE; + target: PART_TEXT1; + target: PART_TEXT2; + target: "defaultbg_text"; + after: "focus,out,anim"; + } + program { + name: "focus,out,anim"; + action: STATE_SET "selected_0" 0.0; + target: "part_focus1"; + target: "part_focus2"; + target: "part_focus3"; + target: "elm.bg.text"; + transition: LINEAR 0.17; + after: "focus,out,anim,2"; + } + program { + name: "focus,out,anim,2"; + action: STATE_SET "default" 0.0; + target: PART_ICON; + target: "default_image"; + target: "defaultbg"; + target: "part_focus1"; + target: "part_focus2"; + target: "part_focus3"; + target: "elm.bg.text"; + } + program { + name: "selected"; + signal: "elm,state,selected"; + source: "elm"; + action: STATE_SET "selected" 0.0; + target: "map"; + transition: DECELERATE 0.2; + after: "after_selected"; + } + program { + name: "after_selected"; + action: STATE_SET "default" 0.0; + target: "map"; + transition: DECELERATE 0.2; + after: "item_selected"; + } + program { + name: "item_selected"; + action: SIGNAL_EMIT SIGNAL_ITEM_SELECTED SOURCE_EDC; + } + } +} diff --git a/images/btn_bar_clearall_dis.png b/images/btn_bar_clearall_dis.png Binary files differindex fb138ea..cca62e5 100644 --- a/images/btn_bar_clearall_dis.png +++ b/images/btn_bar_clearall_dis.png diff --git a/images/btn_bar_clearall_foc.png b/images/btn_bar_clearall_foc.png Binary files differindex 950c901..14f1614 100644 --- a/images/btn_bar_clearall_foc.png +++ b/images/btn_bar_clearall_foc.png diff --git a/images/btn_bar_clearall_nor.png b/images/btn_bar_clearall_nor.png Binary files differindex 8b63be7..fab57d7 100644 --- a/images/btn_bar_clearall_nor.png +++ b/images/btn_bar_clearall_nor.png diff --git a/images/btn_noti_list_clearall_dis.png b/images/btn_noti_list_clearall_dis.png Binary files differindex bc1739f..0d9e7c4 100644 --- a/images/btn_noti_list_clearall_dis.png +++ b/images/btn_noti_list_clearall_dis.png diff --git a/images/btn_noti_list_clearall_foc.png b/images/btn_noti_list_clearall_foc.png Binary files differindex 8ee25f6..c44fc47 100644 --- a/images/btn_noti_list_clearall_foc.png +++ b/images/btn_noti_list_clearall_foc.png diff --git a/images/btn_noti_list_clearall_nor.png b/images/btn_noti_list_clearall_nor.png Binary files differindex e97cd6d..d21e1d5 100644 --- a/images/btn_noti_list_clearall_nor.png +++ b/images/btn_noti_list_clearall_nor.png diff --git a/include/define.h b/include/define.h index d9203e6..aa4ae9e 100644 --- a/include/define.h +++ b/include/define.h @@ -22,14 +22,18 @@ /* Definitions for common */ #define SOURCE_PROGRAM "program" #define SOURCE_ELM "elm" +#define SOURCE_EDC "edc" #define PART_CONTENT "elm.swallow.content" #define PART_ICON "elm.swallow.icon" #define PART_TITLE "elm.text" +#define PART_TEXT1 "elm.text1" +#define PART_TEXT2 "elm.text2" #define SIGNAL_FOCUSED "elm,action,focus" #define SIGNAL_UNFOCUSED "elm,action,unfocus" #define SIGNAL_DISABLED "elm,state,disabled" +#define SIGNAL_ITEM_SELECTED "item,selected" #define SIGNAL_NO_NOTIFICATION "signal.no_notification" #define SIGNAL_NOTIFICATION "signal.notification" @@ -126,7 +126,7 @@ static void _control(app_control_h control, void *data) if (ad->win) elm_win_activate(ad->win); - viewmgr_push_view(SQUARE_VIEW); + viewmgr_push_view(NOTIFICATION_VIEW); } int main(int argc, char *argv[]) diff --git a/src/notification_view.c b/src/notification_view.c index dbe15e7..01326f5 100644 --- a/src/notification_view.c +++ b/src/notification_view.c @@ -23,8 +23,7 @@ #include "define.h" -#define STYLE_GRID_ITEM "default_2text" -#define PART_ITEM_CONTENT "elm.text2" +#define STYLE_GRID_ITEM "notification_item" #define NOTIFICATION_CATEGORY_PADDING_X 62 #define NOTIFICATION_CATEGORY_PADDING_Y 0 @@ -116,7 +115,8 @@ static void _draw_category(struct _priv *priv, int category, priv->category[category] = elm_gengrid_add(ly); elm_gengrid_item_size_set(priv->category[category], - NOTIFICATION_ITEM_WIDTH, NOTIFICATION_ITEM_HEIGHT); + NOTIFICATION_ITEM_WIDTH + NOTIFICATION_ITEM_PADDING, + NOTIFICATION_ITEM_HEIGHT + NOTIFICATION_ITEM_PADDING); elm_gengrid_align_set(priv->category[category], 0.0, 0.0); elm_gengrid_horizontal_set(priv->category[category], EINA_TRUE); elm_scroller_policy_set(priv->category[category], @@ -141,7 +141,9 @@ static void _draw_category(struct _priv *priv, int category, w = col * NOTIFICATION_ITEM_WIDTH + (col - 1) * NOTIFICATION_ITEM_PADDING; evas_object_size_hint_min_set(priv->category[category], - w, NOTIFICATION_CATEGORY_HEIGHT); + w + NOTIFICATION_ITEM_PADDING, + NOTIFICATION_CATEGORY_HEIGHT + + NOTIFICATION_ITEM_PADDING); } static void _update_list(struct _priv *priv) @@ -180,9 +182,10 @@ static char *_grid_label_get(void *data, notification_get_pkgname(noti, &buf); return buf ? strdup(buf) : NULL; - } else if (!strcmp(part, PART_ITEM_CONTENT)) { + } else if (!strcmp(part, PART_TEXT1)) { notification_get_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT, &buf); + return buf ? strdup(buf) : NULL; } |