to_y, PART_NOTIFICATION_CONTENT_BG;
relative, 1.0 0.0;
}
- min, 0 132;
+ min, 0 116;
fixed, 1 1;
}
description {
to, "padding.notification.content";
relative, 1.0 1.0;
}
- min, 0 678;
+ min, 0 694;
align, 0.0 0.0;
fixed, 0 1;
visible, 1;
}
part {
name, PART_NOTIFICATION_CATEGORY_TITLE;
- type, TEXT;
+ type, SWALLOW;
scale, 1;
description {
state, "default" 0.0;
relative, 1.0 0.0;
}
rel2.relative, 1.0 0.0;
- text {
- font, FONT_LIGHT;
- size, 36;
- align, 0.0 0.5;
- min, 1 1;
- ellipsis, -1;
- }
- min, 0 36;
- color, 77 77 77 255;
+ min, 0 68;
align, 0.0 0.0;
fixed, 0 1;
}
- description {
- state, "focused" 0.0;
- inherit, "default" 0.0;
- color, 255 255 255 255;
- }
}
part {
name, "padding.notification.category.content";
--- /dev/null
+/*
+ * 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 TRANSITION_TIME 0.17
+#define COLOR_ITEM_FOCUS 0 119 246 255
+#define COLOR_TEXT_INDEX 77 77 77 255
+#define COLOR_TEXT_FOCUS 255 255 255 255
+
+group {
+ name: "elm/button/base/category_btn";
+ data.item: "focus_highlight" "on";
+ parts {
+ part {
+ name: "bg";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ part {
+ name: "bg_text";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1.to: "padding.left_top";
+ rel2.to: "padding.right_bottom";
+ color: 0 0 0 0;
+ }
+ description {
+ state: "focused" 0.0;
+ inherit: "default" 0.0;
+ color: COLOR_ITEM_FOCUS;
+ }
+ }
+ part {
+ name: "padding.left_top";
+ type: SPACER;
+ description {
+ state: "default" 0.0;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 0.0 0.0;
+ align: 0.0 0.0;
+ min: 16 16;
+ fixed: 1 1;
+ }
+ }
+ part {
+ name: "padding.right_bottom";
+ type: SPACER;
+ description {
+ state: "default" 0.0;
+ rel1 {
+ to: "elm.text";
+ relative: 1.0 1.0;
+ }
+ rel2 {
+ to: "elm.text";
+ relative: 1.0 1.0;
+ }
+ align: 0.0 0.0;
+ min: 16 16;
+ fixed, 1 1;
+ }
+ }
+ part {
+ name: "elm.text";
+ type: TEXT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1 {
+ to: "padding.left_top";
+ relative: 1.0 1.0;
+ }
+ rel2 {
+ to: "padding.left_top";
+ relative: 1.0 1.0;
+ }
+ text {
+ font: FONT_LIGHT;
+ size: 36;
+ min: 1 0;
+ align: 0.0 0.7;
+ ellipsis: -1;
+ }
+ min: 0 36;
+ align: 0.0 0.0;
+ color: COLOR_TEXT_INDEX;
+ fixed: 1 1;
+ }
+ description {
+ state: "focused" 0.0;
+ inherit: "default" 0.0;
+ text.font: FONT_REGULAR;
+ color: COLOR_TEXT_FOCUS;
+ }
+ }
+ }
+ programs {
+ program {
+ name: "focused";
+ signal: "elm,action,focus";
+ source: "elm";
+ action: STATE_SET "focused" 0.0;
+ target: "bg_text";
+ target: "elm.text";
+ transition: LINEAR TRANSITION_TIME;
+ }
+ program {
+ name: "unfocused";
+ signal: "elm,action,unfocus";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "bg_text";
+ target: "elm.text";
+ transition: LINEAR TRANSITION_TIME;
+ }
+ }
+}
#include "define.h"
+#define STYLE_CATEGORY_TITLE "category_btn"
#define STYLE_GRID_ITEM "notification_item"
#define NOTIFICATION_CATEGORY_PADDING_X 62
}
}
+static void _draw_category_title(Evas_Object *base, int category)
+{
+ Evas_Object *btn;
+
+ btn = elm_button_add(base);
+ if (!btn) {
+ _ERR("failed to create button object");
+ return;
+ }
+
+ elm_object_style_set(btn, STYLE_CATEGORY_TITLE);
+ elm_object_text_set(btn, _get_category_title(category));
+
+ elm_object_part_content_set(base,
+ PART_NOTIFICATION_CATEGORY_TITLE, btn);
+}
+
static void _draw_category(struct _priv *priv, int category,
notification_list_h noti_list)
{
elm_layout_file_set(ly, EDJEFILE, GRP_NOTIFICATION_CATEGORY);
evas_object_size_hint_align_set(ly, 0.0, 0.0);
- elm_object_part_text_set(ly, PART_NOTIFICATION_CATEGORY_TITLE,
- _get_category_title(category));
+ _draw_category_title(ly, category);
priv->category[category] = elm_gengrid_add(ly);
elm_gengrid_item_size_set(priv->category[category],
priv = (struct _priv *) view_data;
- _update_list(priv);
-
evas_object_show(priv->base);
+
+ _update_list(priv);
}
static void _hide(void *view_data)