#include "widget/radio.edc"
#include "widget/spinner.edc"
#include "widget/datetime.edc"
+ #include "widget/popup.edc"
}
#define CONTROLS_X1 0.36
#define LABELS_X2 0.32
-#define DATE_ITEM_Y1 0.25
-#define DATE_ITEM_Y2 0.35
+#define DATE_ITEM_Y1 0.15
+#define DATE_ITEM_Y2 0.40
#define DATE_ITEM_X2 0.80
-#define TIME_ITEM_Y1 0.50
-#define TIME_ITEM_Y2 0.60
+#define TIME_ITEM_Y1 0.45
+#define TIME_ITEM_Y2 0.70
#define TIME_ITEM_X2 0.80
-#define _24HOUR_ITEM_Y1 0.70
-#define _24HOUR_ITEM_Y2 0.80
+#define _24HOUR_ITEM_Y1 0.75
+#define _24HOUR_ITEM_Y2 0.85
#define _24HOUR_ITEM_X2 0.55
-
group {
name, GRP_VIEW_CLOCK;
part {
name, "bg";
type, RECT;
+ mouse_events: 1;
scale, 1;
description {
state, "default" 0.0;
color, 244 244 244 255;
+ min: 1920*0.60 1080*0.60;
}
}
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ *
+ * 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 EASY_EASE(duration) CUBIC_BEZIER (duration) 0.33 0.1 0.67 1.0
+#define EASE_IN1(duration) CUBIC_BEZIER (duration) 0.16 0.02 0.0 0.33
+#define EASE_IN2(duration) CUBIC_BEZIER (duration) 0.33 0.33 0.67 0.16
+#define GLIDE_OUT(duration) CUBIC_BEZIER (duration) 0.15 0.0 0.3 1.0
+#define GLIDE_EASE_OUT(duration) CUBIC_BEZIER (duration) 0.25 0.46 0.45 1.0
+#define POPUP_DEFAULT_VI_INC 12
+
+group { "elm/popup/base/settings";
+ nomouse;
+ data.item: "hide_finished_signal" "on";
+ parts {
+ swallow { "elm.swallow.content";
+ mouse;
+ scale;
+ desc { "default";
+ rel1.relative: 0.3 0.0;
+ rel2.relative: 0.7 1.0;
+ }
+ }
+}
switch (ev->keycode) {
case KEY_ID_BACK:
+ case KEY_ID_ENTER:
elm_object_focus_set(obj, EINA_FALSE);
evas_object_focus_set(dt, EINA_TRUE);
dlog_print(DLOG_DEBUG, LOG_TAG, "[%s:%d] btn PRESSED [KEY_ID_BACK]", __FILE__, __LINE__);
-
- Evas_Object *parent = elm_object_focused_object_get(elm_object_parent_widget_get(dt));
- dlog_print(DLOG_DEBUG, LOG_TAG, "[%s:%d] %d %s", __FILE__, __LINE__,
- elm_object_focus_get(dt),
- evas_object_type_get(parent));
break;
case KEY_ID_UP:
elm_spinner_value_set(spinner, value + 1);
switch (ev->keycode) {
case KEY_ID_ENTER:
neighbour = elm_object_focus_next_object_get(obj, ELM_FOCUS_NEXT);
+ elm_object_focus_set(neighbour, EINA_TRUE);
break;
default:
break;
dlog_print(DLOG_INFO, LOG_TAG, "[%s:%d] Datetime %p keydown %s neighbour: %s(%p)", __FILE__, __LINE__,
obj, ev->key, evas_object_type_get(neighbour), neighbour);
-
- evas_object_focus_set(neighbour, EINA_TRUE);
- elm_object_focus_set(neighbour, EINA_TRUE);
}
#define DEFAULT_KEYPAD_POS 636
#define PADDING_VKEYBOARD 30
-#define LAYOUT_SIZE_MULTIPLIER 0.6
enum setup_type {
TYPE_MANUAL = 0,
typedef struct {
Evas_Object *win;
+ Evas_Object *popup;
Evas_Object *base;
Evas_Object *conformant;
Evas_Object *done;
return true;
}
-static void _resize(Evas_Object *win, Evas_Object *base)
-{
- int w = 0;
- int h = 0;
- float move_offset = (1.0 - LAYOUT_SIZE_MULTIPLIER) * 0.5;
-
- evas_object_geometry_get(win, NULL, NULL, &w, &h);
- evas_object_resize(base, LAYOUT_SIZE_MULTIPLIER * w, LAYOUT_SIZE_MULTIPLIER * h);
- evas_object_move(base, move_offset * w, move_offset * h);
-}
-
static Evas_Object *_create(Evas_Object *win, void *data)
{
SETTING_TRACE_BEGIN;
return NULL;
}
+ priv->popup = elm_popup_add(win);
+ if (!priv->popup) {
+ dlog_print(DLOG_ERROR, LOG_TAG, "[%s:%d] priv->popup == NULL", __FILE__, __LINE__);
+ return NULL;
+ }
+
+ elm_object_style_set(priv->popup, "settings");
+
+ Evas_Object *parent = evas_object_smart_parent_get(priv->popup);
+ const char *type1 = evas_object_type_get(parent);
+ parent = elm_object_parent_widget_get(priv->popup);
+ const char *type2 = evas_object_type_get(parent);
+
+ dlog_print(DLOG_DEBUG, LOG_TAG, "[%s:%d] SMP: %s P: %s", __FILE__, __LINE__, type1, type2);
+
base = utils_add_layout(win, GRP_VIEW_CLOCK, EINA_FALSE);
if (!base) {
_ERR("Add layout failed.");
return NULL;
}
- _resize(win, base);
+ elm_object_content_set(priv->popup, base);
priv->win = win;
priv->base = base;
evas_object_smart_callback_add(priv->conformant, "virtualkeypad,state,on", _keypad_up_cb, priv);
evas_object_smart_callback_add(priv->conformant, "virtualkeypad,state,off", _keypad_down_cb, priv);
-
if (!_add_clock_setting(priv)) {
_ERR("failed to add clock setting layout");
evas_object_del(base);
elm_datetime_value_set(priv->date_part, (Elm_Datetime_Time *)¤t_time);
elm_datetime_value_set(priv->time_part, (Elm_Datetime_Time *)¤t_time);
- evas_object_show(priv->base);
+ evas_object_show(priv->popup);
elm_object_focus_set(priv->time_part, EINA_TRUE);
ecore_idler_add(_show_timer_cb, priv);
return;
}
priv = (clock_view_priv_data *)data;
- evas_object_hide(priv->base);
+ evas_object_hide(priv->popup);
}
static void _destroy(void *data)