hermet pushed a commit to branch master.

http://git.enlightenment.org/games/etypers.git/commit/?id=d23d5393cc5b6d7d26e70f7a9234fa708bd6018e

commit d23d5393cc5b6d7d26e70f7a9234fa708bd6018e
Author: Hermet Park <her...@hermet.pe.kr>
Date:   Thu Feb 11 22:19:55 2016 +0900

    improve ui
---
 data/theme/etypers.edc | 183 +++----------------------------------------------
 src/bin/etypers.c      |  10 ++-
 2 files changed, 15 insertions(+), 178 deletions(-)

diff --git a/data/theme/etypers.edc b/data/theme/etypers.edc
index 09f7083..8ed19e2 100644
--- a/data/theme/etypers.edc
+++ b/data/theme/etypers.edc
@@ -71,7 +71,7 @@ collections {
             scale: 1;
             description { state: "default" 0.0;
                text { font: "Sans:style=Bold";
-                   size: 12;
+                   size: 10;
                    min: 0 0;
                    max: 1 0;
                    align: 0 0;
@@ -89,7 +89,7 @@ collections {
             scale: 1;
             description { state: "default" 0.0;
                text { font: "Sans:style=Bold";
-                   size: 12;
+                   size: 10;
                    min: 0 0;
                    max: 1 0;
                    align: 0 0;
@@ -98,6 +98,7 @@ collections {
                color: 200 200 200 200;
                align: 0 0;
                rel1.to: "score";
+               rel1.offset: 5 0;
                rel1.relative: 1 0;
             }
          }
@@ -106,7 +107,7 @@ collections {
             scale: 1;
             description { state: "default" 0.0;
                text { font: "Sans:style=Bold";
-                   size: 12;
+                   size: 10;
                    min: 0 0;
                    max: 1 0;
                    align: 0 0;
@@ -126,7 +127,7 @@ collections {
             scale: 1;
             description { state: "default" 0.0;
                text { font: "Sans:style=Bold";
-                   size: 12;
+                   size: 10;
                    min: 0 0;
                    max: 1 0;
                    align: 0 0;
@@ -135,6 +136,7 @@ collections {
                color: 200 200 200 200;
                align: 0 0 ;
                rel1.relative: 1 0;
+               rel1.offset: 5 0;
                rel1.to: "level";
             }
          }
@@ -143,7 +145,7 @@ collections {
             scale: 1;
             description { state: "default" 0.0;
                text { font: "Sans:style=Bold";
-                   size: 12;
+                   size: 10;
                    min: 0 0;
                    max: 1 0;
                    align: 0 0;
@@ -160,7 +162,7 @@ collections {
             scale: 1;
             description { state: "default" 0.0;
                text { font: "Sans:style=Bold";
-                   size: 12;
+                   size: 10;
                    min: 0 0;
                    max: 1 0;
                    align: 0 0;
@@ -169,6 +171,7 @@ collections {
                color: 200 200 200 200;
                align: 0 0 ;
                rel1.relative: 1 0;
+               rel1.offset: 5 0;
                rel1.to: "correct";
             }
          }
@@ -176,8 +179,8 @@ collections {
             type: RECT;
             description { state: "default" 0.0;
                align: 0.5 1;
-               min: 170 30;
-               max: 170 30;
+               min: 120 30;
+               max: 120 30;
                fixed: 1 1;
                rel1.relative: 0.5 0.95;
                rel2.relative: 0.5 0.95;
@@ -298,168 +301,4 @@ collections {
          }
       }
    }
-////////////////////////////////////////////////////////////////////////////////
-   group { name: "elm/entry/base/etypers";
-      styles {
-         style { name: "entry_textblock_style";
-            base: "font=Sans font_size=12 color=#000 text_class=entry 
left_margin=2 right_margin=2";
-         }
-         style { name: "entry_textblock_disabled_style";
-            base: "font=Sans font_size=12 color=#00000080 text_class=entry 
left_margin=2 right_margin=2";
-         }
-         style { name: "entry_textblock_guide_style";
-            base: "font=Sans font_size=12 color=#00000040 text_class=entry 
left_margin=2 right_margin=2 ellipsis=0.0";
-         }
-      }
-      parts {
-         part { name: "elm.guide";
-            type: TEXTBLOCK;
-            mouse_events: 0;
-            scale: 1;
-            description { state: "default" 0.0;
-               rel1.to: "elm.text";
-               rel2.to: "elm.text";
-               text {
-                  style: "entry_textblock_guide_style";
-                  min: 0 1;
-                  align: 0.0 0.0;
-               }
-            }
-            description { state: "hidden" 0.0;
-               inherit: "default" 0.0;
-               visible: 0;
-            }
-         }
-         part { name: "elm.text";
-            type: TEXTBLOCK;
-            mouse_events: 1;
-            scale: 1;
-            entry_mode: EDITABLE;
-            select_mode: EXPLICIT;
-            multiline: 1;
-            description { state: "default" 0.0;
-               /* we gotta use 0 0 here, because of scrolled entries */
-               fixed: 0 0;
-               text {
-                  style: "entry_textblock_style";
-                  min: 0 1;
-                  align: 0.0 0.0;
-               }
-            }
-            description { state: "disabled" 0.0;
-               inherit: "default" 0.0;
-               text {
-                  style: "entry_textblock_disabled_style";
-                  min: 0 1;
-               }
-            }
-         }
-      }
-      programs {
-         program { name: "focus";
-            signal: "load";
-            source: "";
-            action: FOCUS_SET;
-            target: "elm.text";
-         }
-         program { name: "disable";
-            signal: "elm,state,disabled";
-            source: "elm";
-            action: STATE_SET "disabled" 0.0;
-            target: "elm.text";
-         }
-         program { name: "enable";
-            signal: "elm,state,enabled";
-            source: "elm";
-            action: STATE_SET "default" 0.0;
-            target: "elm.text";
-         }
-         program { name: "gdisable";
-            signal: "elm,guide,disabled";
-            source: "elm";
-            action: STATE_SET "hidden" 0.0;
-            target: "elm.guide";
-         }
-         program { name: "genable";
-            signal: "elm,guide,enabled";
-            source: "elm";
-            action: STATE_SET "default" 0.0;
-            target: "elm.guide";
-         }
-      }
-   }
-   group { name: "elm/entry/base-single/etypers";
-      inherit: "elm/entry/base/etypers";
-      styles
-      {
-         style { name: "entry_single_textblock_style";
-            base: "font=Sans font_size=13 color=#000000 text_class=entry 
left_margin=2 right_margin=2";
-         }
-         style { name: "entry_single_textblock_disabled_style";
-            base: "font=Sans font_size=13 color=#00000080 text_class=entry 
left_margin=2 right_margin=2";
-         }
-         style { name: "entry_single_textblock_guide_style";
-            base: "font=Sans font_size=13 color=#00000080 text_class=entry 
left_margin=2 right_margin=2 ellipsis=0.0";
-         }
-      }
-      parts {
-         part { name: "elm.guide";
-            type: TEXTBLOCK;
-            mouse_events: 0;
-            scale: 1;
-            description { state: "default" 0.0;
-               rel1.to: "elm.text";
-               rel2.to: "elm.text";
-               text {
-                  style: "entry_single_textblock_guide_style";
-                  min: 0 1;
-                  align: 0.0 0.0;
-               }
-            }
-            description { state: "hidden" 0.0;
-               inherit: "default" 0.0;
-               visible: 0;
-            }
-         }
-         part { name: "elm.text";
-            multiline: 0;
-            description { state: "default" 0.0;
-               text {
-                  style: "entry_single_textblock_style";
-                  min: 0 1;
-                  max: 0 0;
-                  align: 0.0 0.5;
-               }
-            }
-            description { state: "disabled" 0.0;
-               inherit: "default" 0.0;
-               text {
-                  style: "entry_single_textblock_disabled_style";
-               }
-            }
-         }
-      }
-   }
-   group { name: "elm/entry/base-noedit/etypers";
-      inherit: "elm/entry/base/etypers";
-      parts {
-         part { name: "elm.text";
-            entry_mode: PLAIN;
-            description { state: "default" 0.0;
-               fixed: 1 0;
-               text {
-                  style: "entry_textblock_style";
-                  min: 0 1;
-                  align: 0.0 0.0;
-               }
-            }
-            description { state: "disabled" 0.0;
-               inherit: "default" 0.0;
-               text {
-                  style: "entry_textblock_disabled_style";
-               }
-            }
-         }
-      }
-   }
 }
diff --git a/src/bin/etypers.c b/src/bin/etypers.c
index eae9eb6..b177f49 100644
--- a/src/bin/etypers.c
+++ b/src/bin/etypers.c
@@ -20,8 +20,8 @@
 
 #include <Elementary.h>
 
-#define DEFAULT_WIN_W 600
-#define DEFAULT_WIN_H 800
+#define DEFAULT_WIN_W 400
+#define DEFAULT_WIN_H 600
 #define NEW_ENEMY_DURATION_SEC 5
 #define LEVEL_INC_WEIGHT 0.01
 #define DROP_DIST_WEIGHT 10
@@ -123,7 +123,6 @@ _enemy_new(Evas_Object *parent, const char *str, Evas_Coord 
x, Evas_Coord y,
         free(enemy);
         return NULL;
      }
-   elm_object_style_set(entry, "etypers");
 
    //To make layer order same to parent
    evas_object_smart_member_add(entry, parent);
@@ -138,7 +137,7 @@ _enemy_new(Evas_Object *parent, const char *str, Evas_Coord 
x, Evas_Coord y,
    evas_object_textblock_size_formatted_get(tb, &tb_w, &tb_h);
    x = (x + tb_w) > max_w ? (x - ((x + tb_w) - max_w)) : x;
    evas_object_move(entry, x, y);
-   evas_object_resize(entry, tb_w, tb_h);
+   evas_object_resize(entry, tb_w + 10, tb_h);
    evas_object_show(entry);
 
    enemy->entry = entry;
@@ -735,7 +734,6 @@ static Evas_Object *
 _entry_create(Evas_Object *ly, const char *part, AppData *appdata)
 {
    Evas_Object *entry = elm_entry_add(ly);
-   elm_object_style_set(entry, "etypers");
    elm_entry_single_line_set(entry, EINA_TRUE);
    elm_entry_input_panel_enabled_set(entry, EINA_FALSE);
    evas_object_show(entry);
@@ -871,7 +869,7 @@ int elm_main(int argc, char **argv)
    elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
    elm_app_compile_bin_dir_set(PACKAGE_BIN_DIR);
    elm_app_compile_bin_dir_set(PACKAGE_DATA_DIR);
-   snprintf(EDJE_PATH, sizeof(EDJE_PATH), 
"%s/theme/etypers.edj",PACKAGE_DATA_DIR);
+   snprintf(EDJE_PATH, sizeof(EDJE_PATH), "%s/theme/etypers.edj", 
PACKAGE_DATA_DIR);
    elm_theme_extension_add(NULL, EDJE_PATH);
    srand((unsigned int) time(NULL));
    ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _key_down_cb, appdata);

-- 


Reply via email to