From a588c5819e5136fca99f696c6fb6fe0b6bc8179a Mon Sep 17 00:00:00 2001 From: "artem.popov" Date: Tue, 17 Jul 2012 18:42:22 +0300 Subject: [PATCH] [ctxpopup] added new defines and states for sizes of text for white theme Change-Id: Ia44463ddd7954e6195a8256c2426c3212531de9d --- themes/inc/tizen-hd-inc.edc | 5 ++++ themes/widgets/ctxpopup.edc | 69 ++++++++++++++++++++++++++++++++++++++------- 2 files changed, 64 insertions(+), 10 deletions(-) diff --git a/themes/inc/tizen-hd-inc.edc b/themes/inc/tizen-hd-inc.edc index ed1732b..98b6c98 100644 --- a/themes/inc/tizen-hd-inc.edc +++ b/themes/inc/tizen-hd-inc.edc @@ -65,6 +65,10 @@ #define POPUP_CUSTOMSTYLE_TITLE_BOTTOM_LINE_COLOR_INC 70 82 102 255 #define POPUP_CUSTOMSTYLE_TITLE_TEXT_COLOR_INC 249 249 249 255 +#define CTXPOPUP_BUBBLE_BG_IMAGE "00_popup_bubble_bg.png" +#define CTXPOPUP_BG_IMAGE "00_popup_bg.png" +#define CTXPOPUP_BUBBLE_BG_IMAGE_BORDER 13 13 13 13 +#define CTXPOPUP_BG_IMAGE_BORDER 3 3 3 3 #define CTXPOPUP_BG_COLOR_INC 0 0 0 255 #define CTXPOPUP_BG_PRESS_COLOR_INC 0 140 210 255 #define CTXPOPUP_MAIN_TEXT_UNREAD_COLOR_INC 249 249 249 255 @@ -72,6 +76,7 @@ #define CTXPOPUP_SEPARATOR_COLOR_INC 70 70 70 255 #define CTXPOPUP_TP_BG_COLOR_INC 0 140 210 255 #define CTXPOPUP_ITEM_TEXT_SIZE_INC 44 +#define CTXPOPUP_ITEM_MAIN_TEXT_SIZE_INC 44 #define CTXPOPUP_ITEM_HEIGHT_INC 110 #define CTXPOPUP_ITEM_ICON_INC 160 110 #define CTXPOPUP_ICON_WIDTH_INC 80 diff --git a/themes/widgets/ctxpopup.edc b/themes/widgets/ctxpopup.edc index 3479cee..a1149b6 100644 --- a/themes/widgets/ctxpopup.edc +++ b/themes/widgets/ctxpopup.edc @@ -590,8 +590,8 @@ group { name: "elm/ctxpopup/base/default"; images { - image: "00_popup_bubble_bg.png" COMP; - image: "00_popup_bg.png" COMP; + image: CTXPOPUP_BUBBLE_BG_IMAGE COMP; + image: CTXPOPUP_BG_IMAGE COMP; } parts { part { @@ -639,8 +639,8 @@ to:"frame_shadow_right_bottom_padding"; } image { - normal: "00_popup_bubble_bg.png"; - border: 13 13 13 13; + normal: CTXPOPUP_BUBBLE_BG_IMAGE; + border: CTXPOPUP_BUBBLE_BG_IMAGE_BORDER; border_scale: 1; } } @@ -895,8 +895,8 @@ rel1 {to:"ctxpopup_frame_left_top";} rel2 {to:"ctxpopup_frame_right_bottom";} image { - normal: "00_popup_bg.png"; - border: 3 3 3 3; + normal: CTXPOPUP_BG_IMAGE; + border: CTXPOPUP_BG_IMAGE_BORDER; border_scale: 1; } } @@ -1227,6 +1227,17 @@ } } description { + state: "horizontal" 0.0; + inherit: "default" 0.0; + text { + font: "SLP:style=Roman"; + size: CTXPOPUP_ITEM_MAIN_TEXT_SIZE_INC; + align: 0 0.5; + min: 1 1; + text_class: "slp_roman"; + } + } + description { state: "compress" 0.0; inherit: "default" 0.0; max: -1 -1; @@ -1235,10 +1246,27 @@ } } description { + state: "compress.horizontal" 0.0; + inherit: "default" 0.0; + max: -1 -1; + text { + min: 0 1; + size: CTXPOPUP_ITEM_MAIN_TEXT_SIZE_INC; + } + } + description { state: "clicked" 0.0; inherit: "default" 0.0; color: CTXPOPUP_MAIN_TEXT_PRESS_COLOR_INC; } + description { + state: "clicked.horizontal" 0.0; + inherit: "default" 0.0; + color: CTXPOPUP_MAIN_TEXT_PRESS_COLOR_INC; + text { + size: CTXPOPUP_ITEM_MAIN_TEXT_SIZE_INC; + } + } } part { name: "right_padding"; @@ -1317,8 +1345,15 @@ name: "compress"; signal: "elm,state,compress"; source: "elm"; - action: STATE_SET "compress" 0.0; - target: "elm.text"; + script { + new st[31]; + new Float:vl; + get_state(PART:"separator", st, 30, vl); + if (!strcmp(st, "horizontal")) + set_state(PART:"elm.text", "compress.horizontal", 0.0); + else + set_state(PART:"elm.text", "compress", 0.0); + } } program { name: "vertical"; @@ -1326,6 +1361,7 @@ source: "elm"; script { set_state(PART:"separator", "vertical", 0.0); + set_state(PART:"elm.text", "vertical", 0.0); } } program { @@ -1334,6 +1370,7 @@ source: "elm"; script { set_state(PART:"separator", "horizontal", 0.0); + set_state(PART:"elm.text", "horizontal", 0.0); } } program { @@ -1341,7 +1378,13 @@ signal: "mouse,down,1"; source: "over2"; script { - set_state(PART:"elm.text", "clicked", 0.0); + new st[31]; + new Float:vl; + get_state(PART:"separator", st, 30, vl); + if (!strcmp(st, "horizontal")) + set_state(PART:"elm.text", "clicked.horizontal", 0.0); + else + set_state(PART:"elm.text", "clicked", 0.0); set_state(PART:"bg", "clicked", 0.0); } } @@ -1350,7 +1393,13 @@ signal: "mouse,up,1"; source: "over2"; script { - set_state(PART:"elm.text", "compress", 0.0); + new st[31]; + new Float:vl; + get_state(PART:"separator", st, 30, vl); + if (!strcmp(st, "horizontal")) + set_state(PART:"elm.text", "compress.horizontal", 0.0); + else + set_state(PART:"elm.text", "compress", 0.0); set_state(PART:"bg", "default", 0.0); } } -- 2.7.4