From 99af6d4b9e45c8f675797c198d9ccdfc83d68032 Mon Sep 17 00:00:00 2001 From: Jaehyun Cho Date: Wed, 27 Aug 2014 17:00:41 +0900 Subject: [PATCH] enventor: Add customized entry styles for line entry Summary: Add customized entry styles for line entry Reviewers: Hermet Differential Revision: https://phab.enlightenment.org/D1363 --- data/themes/default/images/Makefile.am | 4 +- .../horizontal_separated_bar_small_glow.png | Bin 0 -> 309 bytes .../default/images/white_bar_vert_glow.png | Bin 0 -> 370 bytes data/themes/default/theme_ext.edc | 204 ++++++++++++++++++ src/bin/edc_editor.c | 2 +- 5 files changed, 208 insertions(+), 2 deletions(-) create mode 100644 data/themes/default/images/horizontal_separated_bar_small_glow.png create mode 100644 data/themes/default/images/white_bar_vert_glow.png diff --git a/data/themes/default/images/Makefile.am b/data/themes/default/images/Makefile.am index 87af98c..59b3ffd 100644 --- a/data/themes/default/images/Makefile.am +++ b/data/themes/default/images/Makefile.am @@ -65,4 +65,6 @@ EXTRA_DIST = \ live_text.png \ live_textblock.png \ live_edit.png \ - new.png + new.png \ + white_bar_vert_glow.png \ + horizontal_separated_bar_small_glow.png diff --git a/data/themes/default/images/horizontal_separated_bar_small_glow.png b/data/themes/default/images/horizontal_separated_bar_small_glow.png new file mode 100644 index 0000000000000000000000000000000000000000..31ddfeecaaf21f3feff6500da6e49967b2ee8958 GIT binary patch literal 309 zcmV-50m}Y~P)Yk6i3hfnmGcQvABugVA2kX4Nc;AU848| zra3Qg4?nm^_(4^s*O>eqVF!pF(Azl{5d~VQL`^)xTa^TRE?#3XT}nCzyQ!&;0?PE6 zibSlSD)9||*$`G=oC<^ne3fpN6-6y<6$)>_OW;tXGqy6F>tI=M;26diC)@$(@6`X# z-`n@ETsD^FION^QGenMYjWB%7p={U*KAslrpIr?_aPtf?^aLlGpsRw~D(kmwu~TwZ zS*ub<6SOzaohKD=+dLimZJtC_`V#za9VmfKY!gW500000NkvXX Hu0mjf$K!*Q literal 0 HcmV?d00001 diff --git a/data/themes/default/images/white_bar_vert_glow.png b/data/themes/default/images/white_bar_vert_glow.png new file mode 100644 index 0000000000000000000000000000000000000000..49c67355099590bd888a0bdd1fd03652d3b0fe82 GIT binary patch literal 370 zcmV-&0ge8NP)YbT)CX>t~{0uWWXc0TeeRDV=*gR9IpQD?1eEo)GG9*XD1WX3^xG3i=RW1xp z1-7B*Z5Qw{y(M$RNE%UL$E6o~YP7tt%!FAQkr0#XsEgDRs-mn82$Z2>ZT+I<(%@OYq6o(O&rU=Dl9tCg!K0yFQiz14el^TxXxA?av ztzcppImJ`+GT)n;T}(3!NKv-s=oUzw;*Xnzlz=tDqGV%1z}mjZnq5qYP5akG;f^a2 zdSBW19XE291xy3g3pW`NT*}661oGsLd-FbF(?rJ21?t5B^}3T QoB#j-07*qoM6N<$g8AK*SpWb4 literal 0 HcmV?d00001 diff --git a/data/themes/default/theme_ext.edc b/data/themes/default/theme_ext.edc index f45437d..cf981fc 100644 --- a/data/themes/default/theme_ext.edc +++ b/data/themes/default/theme_ext.edc @@ -11,6 +11,25 @@ #define PANEMIN2 16 #define PANEWID 32 +styles { + style { name: "entry_style"; + base: "font="FN" font_size=10 color=#656565 text_class=entry shadow_color=#00000080 style=shadow,bottom"; + tag: "em" "+ font_style=Oblique"; + tag: "link" "+ color=#800 underline=on underline_color=#8008"; + tag: "hilight" "+ font_weight=Bold"; + tag: "preedit" "+ underline=on underline_color=#000"; + tag: "preedit_sel" "+ backing=on backing_color=#000 color=#FFFFFF"; + } + style { name: "entry_edit_style"; + base: "font="FN" font_size=10 color=#d4d4d4 text_class=entry shadow_color=#00000080 style=shadow,bottom"; + tag: "em" "+ font_style=Oblique"; + tag: "link" "+ color=#800 underline=on underline_color=#8008"; + tag: "hilight" "+ font_weight=Bold"; + tag: "preedit" "+ underline=on underline_color=#000"; + tag: "preedit_sel" "+ backing=on backing_color=#000 color=#FFFFFF"; + } +} + group { name: "elm/scroller/base/enventor"; images.image: "inset_shadow.png" COMP; images.image: "bevel_in.png" COMP; @@ -1117,3 +1136,188 @@ group { name: "elm/panes/vertical/enventor"; } } } + +group { name: "elm/entry/base/enventor"; + alias: "elm/entry/base/about"; +/* + sounds { + sample { name: "key-tap1" LOSSY 64; + source: "kbd-tap.wav"; + } + sample { name: "key-tap2" LOSSY 64; + source: "kbd-tap2.wav"; + } + sample { name: "key-tap3" LOSSY 64; + source: "kbd-tap3.wav"; + } + sample { name: "key-tap4" LOSSY 64; + source: "kbd-tap4.wav"; + } + sample { name: "key-tap5" LOSSY 64; + source: "kbd-tap5.wav"; + } + } +*/ + parts { + part { name: "elm.text"; type: TEXTBLOCK; + scale: 1; + entry_mode: EDITABLE; + select_mode: EXPLICIT; + cursor_mode: BEFORE; + multiline: 1; + source: "elm/entry/selection/enventor"; // selection under + source4: "elm/entry/cursor/enventor"; // cursorover + source6: "elm/entry/anchor/enventor"; // anchor over + description { state: "default" 0.0; + /* we gotta use 0 0 here, because of scrolled entries */ + fixed: 0 0; + rel1.offset: 2 2; + rel2.offset: -3 -3; + text { style: "entry_edit_style"; + min: 0 1; + align: 0.0 0.0; + } + } + } + } + programs { + program { + signal: "load"; source: ""; + action: FOCUS_SET; + target: "elm.text"; + } +/* + program { name: "key-down"; + signal: "entry,keydown"; source: "elm.text"; + script { + new buf[32]; + snprintf(buf, 31, "key-down%i", (rand() % 5) + 1); + run_program(get_program_id(buf)); + } + } + program { name: "key-down1"; + action: PLAY_SAMPLE "key-tap1" 1.0; + } + program { name: "key-down2"; + action: PLAY_SAMPLE "key-tap2" 1.0; + } + program { name: "key-down3"; + action: PLAY_SAMPLE "key-tap3" 1.0; + } + program { name: "key-down4"; + action: PLAY_SAMPLE "key-tap4" 1.0; + } + program { name: "key-down5"; + action: PLAY_SAMPLE "key-tap5" 1.0; + } */ + } +} + +group { name: "elm/entry/base-nowrap-noedit/enventor"; + inherit: "elm/entry/base/enventor"; + parts { + part { name: "elm.text"; + entry_mode: PLAIN; + source: "elm/entry/selection/enventor"; // selection under + source4: ""; // cursorover + source6: "elm/entry/anchor/enventor"; // anchor under + description { state: "default" 0.0; + text { style: "entry_style"; + min: 1 1; + align: 0.0 0.0; + } + } + } + } +} + +group { name: "elm/entry/cursor/enventor"; + min: 1 0; + images.image: "white_bar_vert_glow.png" COMP; + parts { + part { name: "cursor"; mouse_events: 0; + description { state: "default" 0.0; + rel1.offset: -4 -4; + rel2.offset: 3 3; + image.normal: "white_bar_vert_glow.png"; + image.border: 4 4 4 4; + fill.smooth: 0; + color: 255 255 255 0; + min: 9 10; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + } + } + } + programs { + program { + signal: "elm,action,focus"; source: "elm"; + action: ACTION_STOP; + target: "cursor_show"; + target: "cursor_hide"; + target: "cursor_show_timer"; + target: "cursor_hide_timer"; + after: "cursor_show"; + } + program { + signal: "elm,action,unfocus"; source: "elm"; + action: ACTION_STOP; + target: "cursor_show"; + target: "cursor_hide"; + target: "cursor_show_timer"; + target: "cursor_hide_timer"; + after: "cursor_hide_stop"; + } + program { name: "cursor_hide_stop"; + action: STATE_SET "default" 0.0; + target: "cursor"; + } + program { name: "cursor_show"; + action: STATE_SET "visible" 0.0; + target: "cursor"; + after: "cursor_show_timer"; + } + program { name: "cursor_hide"; + action: STATE_SET "default" 0.0; + target: "cursor"; + transition: SINUSOIDAL 0.2; + after: "cursor_hide_timer"; + } + program { name: "cursor_show_timer"; + in: 0.5 0.0; + after: "cursor_hide"; + } + program { name: "cursor_hide_timer"; + in: 0.2 0.0; + after: "cursor_show"; + } + } +} + +group { name: "elm/entry/selection/enventor"; + parts { + part { name: "base"; type: RECT; + description { state: "default" 0.0; + color: 100 100 100 255; + } + } + } +} + +group { name: "elm/entry/anchor/enventor"; + images.image: "horizontal_separated_bar_small_glow.png" COMP; + parts { + part { name: "bar"; + description { state: "default" 0.0; + image.normal: "horizontal_separated_bar_small_glow.png"; + image.border: 4 4 4 4; + fill.smooth: 0; + rel1.relative: 0.0 1.0; + rel1.offset: -3 -5; + rel2.offset: 2 4; + } + } + } +} diff --git a/src/bin/edc_editor.c b/src/bin/edc_editor.c index b97f26e..3c39a7e 100644 --- a/src/bin/edc_editor.c +++ b/src/bin/edc_editor.c @@ -885,7 +885,7 @@ edit_init(Evas_Object *parent) //Line Number Entry Evas_Object *en_line = elm_entry_add(layout); - evas_object_color_set(en_line, 101, 101, 101, 255); + elm_object_style_set(en_line, elm_app_name_get()); elm_entry_editable_set(en_line, EINA_FALSE); elm_entry_line_wrap_set(en_line, ELM_WRAP_NONE); elm_object_focus_allow_set(en_line, EINA_FALSE);