#define STATE_SAVED "state_saved"
#define PART_UNSAVED_BTNS "swallow.unsaved_btns"
-#define COLOR_UNSAVED_BUTTON_NORMAL 0, 0, 0, 40
+#define LAYOUT_ICON_CALL "icon_call"
+#define LAYOUT_ICON_MESSAGE "icon_message"
-#define GROUP_ICON_CALL "icon_call"
-#define GROUP_ICON_MESSAGE "icon_message"
+#define LAYOUT_LOG_TYPE "log_type"
+#define PART_LOG_TYPE "swallow.log_type"
+
+#define COLOR_UNSAVED_BUTTON_NORMAL 0, 0, 0, 40
+#define UNSAVED_BTN_PAD_BETWEEN 16
#endif /* LOGS_DETAILS_ITEM_LAYOUT_H */
+++ /dev/null
-/*
- * Copyright (c) 2015-2016 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.
- *
- */
-
-#ifndef LOGS_DETAILS_ITEM_LAYOUT_METRICS_H
-#define LOGS_DETAILS_ITEM_LAYOUT_METRICS_H
-
-#define UNSAVED_BTN_PAD_T 46
-#define UNSAVED_BTN_PAD_BETWEEN 16
-#define UNSAVED_BTN_PAD_B 30
-
-#define UNSAVED_BTN_H 78
-
-#endif /* LOGS_DETAILS_ITEM_LAYOUT_METRICS_H */
*/
#include "LogsDetailsItemLayout.h"
-#include "LogsDetailsItemLayoutMetrics.h"
#include "../../../../lib-apps-common/res/apps-common/edje/apps-common-utils.edc"
#include "../../../../lib-common/res/details/edje/details-item-layout.edc"
+#define UNSAVED_BTN_H 78
+#define UNSAVED_BTN_T 46
+#define UNSAVED_BTN_B 30
+
+#define LOG_TYPE_WH 45
+#define LOG_TYPE_T 6
+
collections
{
base_scale: 2.6;
- IMAGE_WITH_COLOR_AND_TOUCH(GROUP_ICON_CALL, DETAILS_ICON_CALL,
+ IMAGE_WITH_COLOR_AND_TOUCH(LAYOUT_ICON_CALL, DETAILS_ICON_CALL,
"touch_icon_normal", "touch_icon_pressed");
- IMAGE_WITH_COLOR_AND_TOUCH(GROUP_ICON_MESSAGE, DETAILS_ICON_MESSAGE,
+ IMAGE_WITH_COLOR_AND_TOUCH(LAYOUT_ICON_MESSAGE, DETAILS_ICON_MESSAGE,
"touch_icon_normal", "touch_icon_pressed");
group {
parts {
spacer { "spacer.unsaved.top"; scale;
desc { "default";
- min: 0 UNSAVED_BTN_PAD_T;
+ min: 0 UNSAVED_BTN_T;
align: 0.5 0.0;
rel1 { relative: 0.0 1.0; to_y: PART_THUMBNAIL; }
rel2 { relative: 1.0 1.0; to_y: PART_THUMBNAIL; }
}
spacer { "spacer.unsaved.bottom"; scale;
desc { "default";
- min: 0 UNSAVED_BTN_PAD_B;
+ min: 0 UNSAVED_BTN_B;
align: 0.5 0.0;
rel1 { relative: 0.0 1.0; to_y: PART_UNSAVED_BTNS; }
rel2 { relative: 1.0 1.0; }
}
}
}
+
+ group { LAYOUT_LOG_TYPE;
+ parts {
+ spacer { "spacer.log_type.top"; scale;
+ desc { "default";
+ align: 0.5 0.0;
+ min: 0.0 LOG_TYPE_T;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 1.0 0.0;
+ }
+ }
+ swallow { PART_LOG_TYPE; scale;
+ desc { "default";
+ align: 0.5 0.0;
+ min: LOG_TYPE_WH LOG_TYPE_WH;
+ rel1 { relative: 0.5 1.0; to_y: "spacer.log_type.top"; }
+ rel2 { relative: 0.5 1.0; to_y: "spacer.log_type.top"; }
+ }
+ }
+ }
+ }
}
{
static const int imageSize = Ui::getScaledValue(ACTION_BTN_WH);
static const char *actionIcons[] = {
- /* ActionCall = */ GROUP_ICON_CALL,
- /* ActionMessage = */ GROUP_ICON_MESSAGE
+ /* ActionCall = */ LAYOUT_ICON_CALL,
+ /* ActionMessage = */ LAYOUT_ICON_MESSAGE
};
Evas_Object *image = elm_image_add(parent);
#include "AppsCommonButtons.h"
#include "LogsDetailsItemLayout.h"
-#include "LogsDetailsItemLayoutMetrics.h"
#include <app_i18n.h>
#include "Logs/Details/LogDetailItem.h"
#include "Logs/Model/Log.h"
#include "Logs/Common/Utils.h"
+#include "LogsDetailsItemLayout.h"
#include "LogItemLayout.h"
#include "LogPath.h"
#include <app_i18n.h>
#define BUFFER_SIZE 64
-#define LOG_TYPE_SIZE 45
#define PART_LOG_TYPE_TEXT "elm.text.sub"
#define PART_LOG_TYPE_ICON "elm.swallow.icon"
namespace
{
const std::string layoutPath = App::getResourcePath(LOG_ITEM_LAYOUT_EDJ);
+ const std::string detailsLayoutPath = App::getResourcePath(LOGS_DETAILS_ITEM_LAYOUT_EDJ);
}
LogDetailItem::LogDetailItem(Log *log)
Evas_Object *LogDetailItem::createIcon(Evas_Object *parent, const char *path)
{
+ Evas_Object *layout = elm_layout_add(parent);
+ elm_layout_file_set(layout, detailsLayoutPath.c_str(), LAYOUT_LOG_TYPE);
+
Evas_Object *icon = elm_image_add(parent);
elm_image_file_set(icon, layoutPath.c_str(), path);
+ elm_layout_content_set(layout, PART_LOG_TYPE, icon);
- static int size = getScaledValue(LOG_TYPE_SIZE);
- evas_object_size_hint_min_set(icon, size, size);
- return icon;
+ return layout;
}
const char *LogDetailItem::getImagePath(int type)