void msg_ui_composer_change_body_scroll_size(MSG_COMPOSER_VIEW_DATA_S *cd, int keypad_height);
void msg_ui_composer_make_default_body_size(MSG_COMPOSER_VIEW_DATA_S *cd);
+int msg_ui_composer_get_font_size(int type);
void msg_ui_composer_apply_font_size(MSG_COMPOSER_VIEW_DATA_S *cd, bool update_subject);
#endif/*__MSG_COMPOSER_COMMON_H__*/
COMPOSER_ADDR_TYPE_EMAIL
};
+enum {
+ COMPOSER_TYPE_SUBJECT = 0,
+ COMPOSER_TYPE_BODY
+};
+
typedef enum {
COMPOSER_CONTENT_CREATION_NONE,
COMPOSER_CONTENT_CREATION_ALLOWED,
}
/* fix font size */
- elm_entry_text_style_user_push(entry, "DEFAULT='font_size=36'");
+ char font_style[DEF_BUF_LEN_S + 1] = {0,};
+ int font_size = msg_ui_composer_get_font_size(COMPOSER_TYPE_BODY);
+
+ if (font_size > 0)
+ snprintf(font_style, sizeof(font_style), "DEFAULT='font_size=%d'", font_size);
+ else
+ snprintf(font_style, sizeof(font_style), "DEFAULT='font_size=%d'", MSGC_BODY_FONT_SIZE);
+
+ elm_entry_text_style_user_push(entry, font_style);
evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
D_LEAVE;
}
+int msg_ui_composer_get_font_size(int type)
+{
+ D_ENTER;
+
+ int font_size = 0;
+ int converted_size = -1;
+
+ if (type == COMPOSER_TYPE_BODY) {
+ int index = 0;
+
+ if (msg_common_get_font_size(&index) == FALSE) {
+ D_EMSG("msg_common_get_font_size() is failed !!");
+ return -1;
+ } else {
+ D_MSG("selected font_size index = %d", index);
+ }
+
+ font_size = msg_common_get_font_size_from_index(index);
+
+ if (font_size == -1) {
+ D_EMSG("msg_common_get_font_size_from_index() is failed !!");
+ return -1;
+ }
+
+ converted_size = (MSGC_BODY_FONT_SIZE * font_size) / MSG_APP_FONT_SIZE_NORMAL;
+ } else if (type == COMPOSER_TYPE_SUBJECT) {
+ int access_font_index = 0;
+
+ /* get accessibility font index */
+ if (vconf_get_int(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, &access_font_index) < 0) {
+ D_EMSG("vconf_get_int(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE) is failed !!");
+ access_font_index = MSG_SYS_FONT_SIZE_INDEX_NORMAL; /* 1 */
+ }
+
+ font_size = msg_common_get_font_size_from_index(access_font_index);
+ if (font_size == -1) {
+ D_EMSG("msg_common_get_font_size_from_index() is failed !!");
+ return -1;
+ }
+
+ converted_size = (MSGC_SUBJECT_FONT_SIZE * font_size) / MSG_APP_FONT_SIZE_NORMAL;
+ } else {
+ D_EMSG("Invalid type");
+ }
+
+ D_LEAVE;
+ return converted_size;
+}
+
void msg_ui_composer_apply_font_size(MSG_COMPOSER_VIEW_DATA_S *cd, bool update_subject)
{
D_ENTER;
evas_object_size_hint_align_set(entry, 0.0, EVAS_HINT_FILL);
/* fix font size */
char font_style[DEF_BUF_LEN_S + 1] = {0,};
- snprintf(font_style, sizeof(font_style), "DEFAULT='font_size=%d'", MSGC_SUBJECT_FONT_SIZE);
+ int font_size = msg_ui_composer_get_font_size(COMPOSER_TYPE_SUBJECT);
+
+ if (font_size > 0)
+ snprintf(font_style, sizeof(font_style), "DEFAULT='font_size=%d'", font_size);
+ else
+ snprintf(font_style, sizeof(font_style), "DEFAULT='font_size=%d'", MSGC_SUBJECT_FONT_SIZE);
+
elm_entry_text_style_user_push(entry, font_style);
evas_object_show(entry);