/*********************************************************************** * Attachment **************************************************************************/ #define MSG_COMPOSER_ATTACHMENT_H 90 #define MSG_COMPOSER_ATTACHMENT_FIELD_H 74 #define ATTACHMENT_DELBUTTON_SIZE 48 48 #define ATTACHMENT_IMAGE_SIZE 48 48 #define COLOR_BODY_ATTACH_TEXT 251 85 40 255 group { name: "composer/attachment/main"; images { image: IMG_BODY_ATTACH_INPUT_FIELD COMP; } parts { part { name: "rect"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; min: 0 MSG_COMPOSER_ATTACHMENT_H; fixed: 0 1; color: 0 0 0 0; } } PADDING_TOP("padding_top_16", 16); PADDING_TOP("padding_top", 29); PADDING_LEFT("padding_left", 16); PADDING_RIGHT("padding_right", 16); PADDING_RIGHT("padding_right_32", 32); PADDING_BOTTOM("padding_bottom", 13); part { name: "img.body"; type: IMAGE; mouse_events: 1; scale: 1; description { state: "default" 0.0; min: 0 MSG_COMPOSER_ATTACHMENT_FIELD_H; fixed: 1 0; rel1 { to_y: "padding_top_16"; relative: 0.0 1.0; } rel2 { to_x: "padding_right"; relative: 0.0 1.0; } image { normal: IMG_BODY_ATTACH_INPUT_FIELD; border: BORDER_ATTACH_INPUT_FIELD; } } } part { name: "swl.image"; type: SWALLOW; scale: 1; description { state: "default" 0.0; min: ATTACHMENT_IMAGE_SIZE; max: ATTACHMENT_IMAGE_SIZE; fixed: 1 1; rel1 { to_x: "padding_left"; to_y: "padding_top"; relative: 1.0 1.0; } rel2 { to_x: "padding_left"; to_y: "padding_bottom"; relative: 1.0 0.0; } align: 0.0 0.5; } } part { name: "text.filename"; type: TEXT; scale: 1; mouse_events: 0; description { state: "default" 0.0; rel1 { to_x: "swl.image"; to_y: "padding_top"; relative: 1.0 1.0; offset: 16 0; } rel2 { to_x: "padding_right_32"; to_y: "padding_bottom"; relative: 0.0 0.0; offset: 0 0; } align: 0.0 0.5; color: COLOR_BODY_ATTACH_TEXT; text { font: SLP_FONT_REGULAR; text_class: FONT_TEXT_CLASS_REGULAR; size: 34; align: 0.0 0.5; text: ""; } } } programs { program { name: "img_body_clicked"; source: "img.body"; signal: "mouse,clicked,1"; script { new st[31]; new Float:vl; get_state(PART:"img.body", st, 30, vl) if (!strcmp(st, "default")) emit ("attach_clicked", ""); } } } } } group { name: "composer/attachment/item"; images { image: IMG_BODY_ATTACH_INPUT_FIELD COMP; } parts { part { name: "rect"; type: RECT; scale: 1; mouse_events: 0; description { state: "default" 0.0; min: 0 MSG_COMPOSER_ATTACHMENT_H; fixed: 0 1; color: 0 0 0 0; } } PADDING_TOP("padding_top_16", 16); PADDING_TOP("padding_top", 29); PADDING_LEFT("padding_left", 16); PADDING_RIGHT("padding_right", 16); PADDING_RIGHT("padding_right_32", 32); PADDING_BOTTOM("padding_bottom", 13); part { name: "img.body"; type: IMAGE; scale: 1; description { state: "default" 0.0; min: 0 MSG_COMPOSER_ATTACHMENT_FIELD_H; fixed: 1 0; rel1 { to_y: "padding_top_16"; relative: 0.0 1.0; } rel2 { to_x: "padding_right"; relative: 0.0 1.0; } image { normal: IMG_BODY_ATTACH_INPUT_FIELD; border: BORDER_ATTACH_INPUT_FIELD; } } } part { name: "swl.image"; type: SWALLOW; scale: 1; description { state: "default" 0.0; min: ATTACHMENT_IMAGE_SIZE; max: ATTACHMENT_IMAGE_SIZE; fixed: 1 1; rel1 { to_x: "padding_left"; to_y: "padding_top"; relative: 1.0 1.0; } rel2 { to_x: "padding_left"; to_y: "padding_bottom"; relative: 1.0 0.0; } align: 0.0 0.5; } } part { name: "text.filename"; type: TEXT; scale: 1; mouse_events: 0; description { state: "default" 0.0; rel1 { to_x: "swl.image"; to_y: "padding_top"; relative: 1.0 1.0; offset: 16 0; } rel2 { to_x: "swl.delete_btn"; to_y: "padding_bottom"; relative: 0.0 0.0; offset: -16 0; } align: 0.0 0.5; color: COLOR_BODY_ATTACH_TEXT; text { font: SLP_FONT_REGULAR; text_class: FONT_TEXT_CLASS_REGULAR; size: 32; align: 0.0 0.5; text: ""; } } } part { name: "rect.delete_btn"; type: RECT; scale: 1; description { state: "default" 0.0; min: ATTACHMENT_DELBUTTON_SIZE; max: ATTACHMENT_DELBUTTON_SIZE; fixed: 1 1; rel1 { to_x: "padding_right_32"; to_y: "padding_top"; relative: 0.0 1.0; } rel2 { to_x: "padding_right_32"; to_y: "padding_bottom"; relative: 0.0 0.0; } align: 1.0 0.0; color: 155 55 155 255; visible: 0; } } part { name: "swl.delete_btn"; type: SWALLOW; scale: 1; description { state: "default" 0.0; min: ATTACHMENT_DELBUTTON_SIZE; max: ATTACHMENT_DELBUTTON_SIZE; fixed: 1 1; rel1 { to_x: "padding_right_32"; to_y: "padding_top"; relative: 0.0 1.0; } rel2 { to_x: "padding_right_32"; to_y: "padding_top"; relative: 0.0 1.0; } align: 1.0 0.0; } } } }