little theme adjustments for terminology - cursor loses striped fill -

clear empty, but gets blue glow. use subtle blue glow to show focuwed
term - useful for multi-term grid.



SVN revision: 83362
devs/lucas/wip
Carsten Haitzler 10 years ago
parent 524d62d2f3
commit 7f6ae2a441
  1. 70
      data/themes/default.edc
  2. 3
      data/themes/images/Makefile.am
  3. BIN
      data/themes/images/bg_glow_in.png
  4. BIN
      data/themes/images/cr_fill.png
  5. BIN
      data/themes/images/cr_glow.png
  6. BIN
      data/themes/images/cr_out.png
  7. 37
      src/bin/config.c
  8. 1
      src/bin/config.h
  9. 92
      src/bin/main.c
  10. 1
      src/bin/main.h

@ -7,6 +7,7 @@ collections {
image: "bg_bevel.png" COMP;
image: "bg_shine.png" COMP;
image: "bg_glint.png" COMP;
image: "bg_glow_in.png" COMP;
image: "bg_shadow.png" COMP;
image: "bg_led_glow.png" COMP;
image: "bg_led_base.png" COMP;
@ -124,6 +125,24 @@ collections {
////////////////////////////////////////////////////////////////////
// overlayed prettiness
part { name: "glow";
mouse_events: 0;
description { state: "default" 0.0;
image.normal: "bg_glow_in.png";
image.border: 7 7 7 7;
image.middle: 0;
fill.smooth: 0;
color: 51 153 255 0;
}
description { state: "focused" 0.0;
inherit: "default" 0.0;
color: 51 153 255 255;
}
description { state: "focused2" 0.0;
inherit: "default" 0.0;
color: 51 153 255 64;
}
}
part { name: "bevel";
mouse_events: 0;
description { state: "default" 0.0;
@ -133,7 +152,6 @@ collections {
image.border: 3 3 5 3;
image.middle: 0;
fill.smooth: 0;
visible: 1;
}
}
part { name: "glintclip"; type: RECT;
@ -174,7 +192,7 @@ collections {
align: 0.5 0.0;
aspect: (255/120) (255/120);
aspect_preference: HORIZONTAL;
color: 255 255 255 128;
color: 255 255 255 64;
}
description { state: "focused" 0.0;
inherit: "default" 0.0;
@ -186,15 +204,23 @@ collections {
source: "terminology";
action: STATE_SET "focused" 0.0;
target: "glint";
target: "glow";
target: "shine";
after: "focus_in2";
}
program { name: "focus_out";
signal: "focus,out";
source: "terminology";
action: STATE_SET "default" 0.0;
target: "glint";
target: "glow";
target: "shine";
}
program { name: "focus_in2";
action: STATE_SET "focused2" 0.0;
transition: DECELERATE 0.5;
target: "glow";
}
////////////////////////////////////////////////////////////////////
// visual bell - spinning red siren light
@ -2059,12 +2085,14 @@ target: "4.bottom"
//// the cursor to show where text is typed
group { name: "terminology/cursor";
images {
image: "cr_fill.png" COMP;
// image: "cr_fill.png" COMP;
image: "cr_key.png" COMP;
image: "cr_out.png" COMP;
image: "cr_pulse.png" COMP;
image: "cr_glow.png" COMP;
}
parts {
/*
part { name: "fill";
mouse_events: 0;
description { state: "default" 0.0;
@ -2082,6 +2110,7 @@ target: "4.bottom"
color: 255 255 255 255;
}
}
*/
part { name: "key";
mouse_events: 0;
description { state: "default" 0.0;
@ -2097,11 +2126,11 @@ target: "4.bottom"
normal: "cr_key.png";
border: 4 4 4 4;
}
color: 255 255 255 0;
color: 51 153 255 0;
}
description { state: "on" 0.0;
inherit: "default" 0.0;
color: 255 255 255 255;
color: 51 153 255 255;
}
description { state: "out" 0.0;
inherit: "default" 0.0;
@ -2125,11 +2154,11 @@ target: "4.bottom"
normal: "cr_pulse.png";
border: 4 4 4 4;
}
color: 255 255 255 0;
color: 51 153 255 0;
}
description { state: "on" 0.0;
inherit: "default" 0.0;
color: 255 255 255 255;
color: 51 153 255 255;
}
description { state: "out" 0.0;
inherit: "default" 0.0;
@ -2138,6 +2167,22 @@ target: "4.bottom"
rel2.offset: 7 7;
}
}
part { name: "glow";
mouse_events: 0;
description { state: "default" 0.0;
rel1.offset: -4 -4;
rel2.offset: 3 3;
image {
normal: "cr_glow.png";
border: 9 9 9 9;
}
color: 51 153 255 40;
}
description { state: "focused" 0.0;
inherit: "default" 0.0;
color: 51 153 255 255;
}
}
part { name: "outline";
mouse_events: 0;
description { state: "default" 0.0;
@ -2157,14 +2202,14 @@ target: "4.bottom"
signal: "focus,in,noblink";
source: "terminology";
action: STATE_SET "focused" 0.0;
target: "fill";
target: "glow";
target: "outline";
}
program { name: "focus_in";
signal: "focus,in";
source: "terminology";
action: STATE_SET "focused" 0.0;
target: "fill";
target: "glow";
target: "outline";
after: "focus2";
after: "pulse";
@ -2172,14 +2217,15 @@ target: "4.bottom"
program { name: "focus2";
in: 0.5 0.0;
action: STATE_SET "default" 0.0;
target: "fill";
transition: DECELERATE 0.2;
target: "glow";
target: "outline";
after: "focus3";
}
program { name: "focus3";
in: 0.5 0.0;
action: STATE_SET "focused" 0.0;
target: "fill";
target: "glow";
target: "outline";
after: "focus2";
after: "pulse";
@ -2207,7 +2253,7 @@ target: "4.bottom"
}
program { name: "focus_out2";
action: STATE_SET "default" 0.0;
target: "fill";
target: "glow";
target: "outline";
}
program { name: "key";

@ -5,12 +5,13 @@ ab_shell.png \
bg_bevel.png \
bg_shine.png \
bg_glint.png \
bg_glow_in.png \
bg_led.png \
bg_led_base.png \
bg_led_glow.png \
bg_led_strobe.png \
bg_shadow.png \
cr_fill.png \
cr_glow.png \
cr_key.png \
cr_out.png \
cr_pulse.png \

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 B

After

Width:  |  Height:  |  Size: 189 B

@ -103,7 +103,11 @@ config_save(Config *config, const char *key)
EINA_SAFETY_ON_NULL_RETURN(config);
if (config->temporary) return;
if (config->temporary)
{
main_config_sync(config);
return;
}
if (!key) key = config->config_key;
config->font.orig_size = config->font.size;
eina_stringshare_del(config->font.orig_name);
@ -123,6 +127,37 @@ config_save(Config *config, const char *key)
eet_close(ef);
if (ok) ecore_file_mv(buf, buf2);
}
main_config_sync(config);
}
void
config_sync(const Config *config_src, Config *config)
{
// SOME fields have to be consistent between configs
config->font.size = config_src->font.size;
eina_stringshare_replace(&(config->font.name), config_src->font.name);
config->font.bitmap = config_src->font.bitmap;
config->helper.inline_please = config_src->helper.inline_please;
eina_stringshare_replace(&(config->helper.email), config_src->helper.email);
eina_stringshare_replace(&(config->helper.url.general), config_src->helper.url.general);
eina_stringshare_replace(&(config->helper.url.video), config_src->helper.url.video);
eina_stringshare_replace(&(config->helper.url.image), config_src->helper.url.image);
eina_stringshare_replace(&(config->helper.local.general), config_src->helper.local.general);
eina_stringshare_replace(&(config->helper.local.video), config_src->helper.local.video);
eina_stringshare_replace(&(config->helper.local.image), config_src->helper.local.image);
eina_stringshare_replace(&(config->theme), config_src->theme);
eina_stringshare_replace(&(config->wordsep), config_src->wordsep);
config->scrollback = config_src->scrollback;
config->vidmod = config_src->vidmod;
config->jump_on_keypress = config_src->jump_on_keypress;
config->jump_on_change = config_src->jump_on_change;
config->flicker_on_key = config_src->flicker_on_key;
config->disable_cursor_blink = config_src->disable_cursor_blink;
config->disable_visual_bell = config_src->disable_visual_bell;
config->mute = config_src->mute;
config->urg_bell = config_src->urg_bell;
config->multi_instance = config_src->multi_instance;
config->temporary = config_src->temporary;
}
Config *

@ -46,6 +46,7 @@ struct _Config
void config_init(void);
void config_shutdown(void);
void config_sync(const Config *config_src, Config *config);
void config_save(Config *config, const char *key);
Config *config_load(const char *key);
void config_del(Config *config);

@ -984,32 +984,56 @@ _cb_cmd_hints_changed(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED_
edje_object_part_swallow(wn->base, "terminology.cmdbox", wn->cmdbox);
}
static void
_win_trans(Win *wn, Term *term, Eina_Bool trans)
{
if (term->config->translucent)
edje_object_signal_emit(term->bg, "translucent,on", "terminology");
else
edje_object_signal_emit(term->bg, "translucent,off", "terminology");
if (trans)
{
elm_win_alpha_set(wn->win, EINA_TRUE);
evas_object_hide(wn->backbg);
}
else
{
elm_win_alpha_set(wn->win, EINA_FALSE);
evas_object_show(wn->backbg);
}
}
void
main_trans_update(const Config *config)
{
Win *wn;
Term *term;
Term *term, *term2;
Eina_List *l, *ll;
EINA_LIST_FOREACH(wins, l, wn)
{
if (config->translucent)
{
EINA_LIST_FOREACH(wn->terms, ll, term)
{
edje_object_signal_emit(term->bg, "translucent,on", "terminology");
}
elm_win_alpha_set(wn->win, EINA_TRUE);
evas_object_hide(wn->backbg);
}
else
EINA_LIST_FOREACH(wn->terms, ll, term)
{
EINA_LIST_FOREACH(wn->terms, ll, term)
if (term->config == config)
{
edje_object_signal_emit(term->bg, "translucent,off", "terminology");
if (config->translucent)
_win_trans(wn, term, EINA_TRUE);
else
{
Eina_Bool trans_exists = EINA_FALSE;
EINA_LIST_FOREACH(wn->terms, ll, term2)
{
if (term2->config->translucent)
{
trans_exists = EINA_TRUE;
break;
}
}
_win_trans(wn, term, trans_exists);
}
return;
}
elm_win_alpha_set(wn->win, EINA_FALSE);
evas_object_show(wn->backbg);
}
}
}
@ -1098,6 +1122,44 @@ main_media_mute_update(const Config *config)
}
}
void
main_config_sync(const Config *config)
{
Win *wn;
Term *term;
Eina_List *l, *ll;
EINA_LIST_FOREACH(wins, l, wn)
{
if (wn->config != config)
{
config_sync(config, wn->config);
}
EINA_LIST_FOREACH(wn->terms, ll, term)
{
if (term->config != config)
{
Evas_Coord mw = 1, mh = 1, w, h, tsize_w = 0, tsize_h = 0;
config_sync(config, term->config);
evas_object_geometry_get(term->term, NULL, NULL,
&tsize_w, &tsize_h);
evas_object_data_del(term->term, "sizedone");
termio_config_update(term->term);
evas_object_size_hint_min_get(term->term, &mw, &mh);
if (mw < 1) mw = 1;
if (mh < 1) mh = 1;
w = tsize_w / mw;
h = tsize_h / mh;
evas_object_data_del(term->term, "sizedone");
evas_object_size_hint_request_set(term->term,
w * mw, h * mh);
}
}
}
}
static void
main_win_free(Win *wn)
{

@ -10,5 +10,6 @@ void main_close(Evas_Object *win, Evas_Object *term);
void main_trans_update(const Config *config);
void main_media_update(const Config *config);
void main_media_mute_update(const Config *config);
void main_config_sync(const Config *config);
#endif

Loading…
Cancel
Save