[ctx_popup] added signals, states for horizontal mode, changed separators parameters
authorartem.popov <artem.popov@samsung.com>
Thu, 19 Jul 2012 08:48:12 +0000 (11:48 +0300)
committerartem.popov <artem.popov@samsung.com>
Thu, 19 Jul 2012 08:48:12 +0000 (11:48 +0300)
Change-Id: I3574ec1dd7ee8cc5f69b24d9246c4dfaf28bd9f9

themes/inc/tizen-hd-inc.edc
themes/widgets/ctxpopup.edc

index 4f33a5c..c2b0867 100644 (file)
 #define CTXPOPUP_MAIN_TEXT_UNREAD_COLOR_INC 249 249 249 255
 #define CTXPOPUP_MAIN_TEXT_PRESS_COLOR_INC 249 249 249 255
 #define CTXPOPUP_SEPARATOR_COLOR_INC 70 70 70 255
+#define CTXPOPUP_HORIZONTAL_SEPARATOR_COLOR_INC 70 70 70 255
+#define CTXPOPUP_HORIZONTAL_SEPARATOR_MIN_SIZE_INC 1 0
+#define CTXPOPUP_HORIZONTAL_SEPARATOR_MAX_SIZE_INC 1 999999
+#define CTXPOPUP_VERTICAL_SEPARATOR_MIN_SIZE_INC 0 1
+#define CTXPOPUP_VERTICAL_SEPARATOR_MAX_SIZE_INC 999999 1
 #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
index a1149b6..f1347c5 100644 (file)
                                }
                                description {
                                        state: "horizontal" 0.0;
-                                       color: CTXPOPUP_SEPARATOR_COLOR_INC;
+                                       color: CTXPOPUP_HORIZONTAL_SEPARATOR_COLOR_INC;
                                        align: 0 0.5;
-                                       min: 1 0;
-                                       max: 1 999999;
+                                       min: CTXPOPUP_HORIZONTAL_SEPARATOR_MIN_SIZE_INC;
+                                       max: CTXPOPUP_HORIZONTAL_SEPARATOR_MAX_SIZE_INC;
                                        visible: 1;
                                }
                        description {
                                        }
                                }
                                description {
-                                       state: "horizontal" 0.0;
+                                       state: "text_horizontal" 0.0;
                                        inherit: "default" 0.0;
                                        text {
-                                               font: "SLP:style=Roman";
                                                size: CTXPOPUP_ITEM_MAIN_TEXT_SIZE_INC;
-                                               align: 0 0.5;
+                                               align: 0.5 0.5;
                                                min: 1 1;
-                                               text_class: "slp_roman";
                                        }
                                }
                                description {
                                        }
                                }
                                description {
-                                       state: "compress.horizontal" 0.0;
+                                       state: "compress.text_horizontal" 0.0;
                                        inherit: "default" 0.0;
                                        max: -1 -1;
                                        text {
-                                               min: 0 1;
                                                size: CTXPOPUP_ITEM_MAIN_TEXT_SIZE_INC;
+                                               align: 0.5 0.5;
+                                               min: 0 1;
                                        }
                                }
                                description {
                                        color: CTXPOPUP_MAIN_TEXT_PRESS_COLOR_INC;
                                }
                                description {
-                                       state: "clicked.horizontal" 0.0;
+                                       state: "clicked.text_horizontal" 0.0;
                                        inherit: "default" 0.0;
                                        color: CTXPOPUP_MAIN_TEXT_PRESS_COLOR_INC;
                                        text {
                                                size: CTXPOPUP_ITEM_MAIN_TEXT_SIZE_INC;
+                                               align: 0.5 0.5;
+                                               min: 0 1;
                                        }
                                }
                        }
                                        new Float:vl;
                                        get_state(PART:"separator", st, 30, vl);
                                        if (!strcmp(st, "horizontal"))
-                                               set_state(PART:"elm.text", "compress.horizontal", 0.0);
+                                               set_state(PART:"elm.text", "compress.text_horizontal", 0.0);
                                        else
                                                set_state(PART:"elm.text", "compress", 0.0);
                                }
                                source: "elm";
                                script {
                                        set_state(PART:"separator", "horizontal", 0.0);
-                                       set_state(PART:"elm.text", "horizontal", 0.0);
+                                       set_state(PART:"elm.text", "text_horizontal", 0.0);
+                               }
+                       }
+                       program {
+                               name: "text_horizontal";
+                               signal: "elm,state,text_horizontal";
+                               source: "elm";
+                               script {
+                                       set_state(PART:"separator", "default", 0.0);
+                                       set_state(PART:"elm.text", "text_horizontal", 0.0);
                                }
                        }
                        program {
                                        new Float:vl;
                                        get_state(PART:"separator", st, 30, vl);
                                        if (!strcmp(st, "horizontal"))
-                                               set_state(PART:"elm.text", "clicked.horizontal", 0.0);
+                                               set_state(PART:"elm.text", "clicked.text_horizontal", 0.0);
                                        else
                                                set_state(PART:"elm.text", "clicked", 0.0);
                                        set_state(PART:"bg", "clicked", 0.0);
                                        new Float:vl;
                                        get_state(PART:"separator", st, 30, vl);
                                        if (!strcmp(st, "horizontal"))
-                                               set_state(PART:"elm.text", "compress.horizontal", 0.0);
+                                               set_state(PART:"elm.text", "compress.text_horizontal", 0.0);
                                        else
                                                set_state(PART:"elm.text", "compress", 0.0);
                                        set_state(PART:"bg", "default", 0.0);
                                }
                                description {
                                        state: "horizontal" 0.0;
-                                       color: CTXPOPUP_SEPARATOR_COLOR_INC;
+                                       color: CTXPOPUP_HORIZONTAL_SEPARATOR_COLOR_INC;
                                        align: 0 0.5;
-                                       min: 1 0;
-                                       max: 1 999999;
+                                       min: CTXPOPUP_HORIZONTAL_SEPARATOR_MIN_SIZE_INC;
+                                       max: CTXPOPUP_HORIZONTAL_SEPARATOR_MAX_SIZE_INC;
                                        visible: 1;
                                }
                        description {
                                        state: "vertical" 0.0;
-                                       color: CTXPOPUP_SEPARATOR_COLOR_INC;
+                                       color: CTXPOPUP_HORIZONTAL_SEPARATOR_COLOR_INC;
                                        align: 0.5 0;
-                                       min: 0 1;
-                                       max: 999999 1;
+                                       min: CTXPOPUP_VERTICAL_SEPARATOR_MIN_SIZE_INC;
+                                       max: CTXPOPUP_VERTICAL_SEPARATOR_MAX_SIZE_INC;
                                        visible: 1;
                                }
                        }
                                }
                                description {
                                        state: "horizontal" 0.0;
-                                       color: CTXPOPUP_SEPARATOR_COLOR_INC;
+                                       color: CTXPOPUP_HORIZONTAL_SEPARATOR_COLOR_INC;
                                        align: 0 0.5;
-                                       min: 1 0;
-                                       max: 1 999999;
+                                       min: CTXPOPUP_HORIZONTAL_SEPARATOR_MIN_SIZE_INC;
+                                       max: CTXPOPUP_HORIZONTAL_SEPARATOR_MAX_SIZE_INC;
                                        visible: 1;
                                }
                        description {