show grouped input on inactive tabs

This commit is contained in:
Boris Faure 2020-04-14 22:06:53 +02:00
parent 826801b607
commit cdcc6be05e
Signed by untrusted user who does not match committer: borisfaure
GPG Key ID: 35C0410516166BE8
5 changed files with 129 additions and 10 deletions

View File

@ -29,6 +29,8 @@ Changes since 1.6.0:
enters the tab region.
* In group "terminology/background", signals "grouped,on",
"grouped,off" are received when input is broadcast to multiple terms.
* In group "terminology/tabbar_back", signals "grouped,on",
"grouped,off" are received when input is broadcast to multiple terms.
Changes since 1.5.0:
--------------------

View File

@ -152,6 +152,8 @@ When clicked on it, to notify that the user wants to go to that tab.
To mark the tab as having missed a bell.
### `bell,off`
To unmark the tab as having missed a bell.
### `grouped,on` and `grouped,off`
When input is broadcast to multiple terminals.

View File

@ -9,6 +9,11 @@ group { name: "terminology/tabbar_back";
image: "tab_shad_l2.png" COMP;
image: "tab_shad_r2.png" COMP;
}
set { name: "tab_grouped";
image { image: "tab_grouped_8.png" COMP; size: 0 0 8 8; }
image { image: "tab_grouped_16.png" COMP; size: 8 8 16 16; }
image { image: "tab_grouped_32.png" COMP; size: 16 16 99999 99999; }
}
parts {
part { name: "tab_bevel_shad1";
mouse_events: 0;
@ -106,6 +111,52 @@ group { name: "terminology/tabbar_back";
fixed: 1 0;
}
}
part { name: "tabgrouped"; type: IMAGE;
scale: 1;
description { state: "default" 0.0;
aspect: 1.0 1.0; aspect_preference: BOTH;
align: 0.0 0.5;
min: 0 0;
max: 0 0;
fixed: 1 1;
rel1 {
to: "tab_bevel_top2";
relative: 0.0 0.3;
offset: -1 0;
}
rel2 {
to: "tab_bevel_top2";
relative: 1.0 0.7;
}
visible: 0;
}
description { state: "grouped" 0.0;
inherit: "default" 0.0;
min: 8 8;
max: 32 32;
image.normal: "tab_grouped";
rel1 {
to: "tab_bevel_top2";
relative: 0.0 0.3;
}
rel2 {
to: "tab_bevel_top2";
relative: 1.0 0.7;
}
color: FG_COLOR;
visible: 1;
}
}
program {
signal: "grouped,on"; source: "terminology";
action: STATE_SET "grouped" 0.0;
target: "tabgrouped";
}
program {
signal: "grouped,off"; source: "terminology";
action: STATE_SET "default" 0.0;
target: "tabgrouped";
}
part { name: "terminology.title"; type: TEXT; mouse_events: 0;
scale: 1;
effect: OUTLINE_SOFT_SHADOW;
@ -117,7 +168,12 @@ group { name: "terminology/tabbar_back";
align: 0.5 0.5;
color: 180 180 180 255;
color3: 0 0 0 18;
rel1.to: "tab_bevel_top2";
rel1 {
to_x: "tabgrouped";
to_y: "tab_bevel_top2";
relative: 1.0 0.0;
offset: 2 0;
}
rel2.to: "tab_bevel_top2";
}
description { state: "bell" 0.0;

View File

@ -1072,8 +1072,8 @@ collections {
rel1 {
to_x: "tab_bevel_bg2";
to_y: "tabmiddle";
offset: 0 2;
relative: 0.0 0.3;
offset: -1 0;
}
rel2 {
to_x: "tab_bevel_bg2";
@ -1145,6 +1145,7 @@ collections {
rel1.to_x: "tabgrouped";
rel1.to_y: "tabmiddle";
rel1.relative: 1.0 0.0;
rel1.offset: 2 0;
rel2.to_x: "tabclose";
rel2.to_y: "tabmiddle";
rel2.relative: 0.0 1.0;
@ -1995,6 +1996,52 @@ collections {
fill.smooth: 0;
}
}
part { name: "tabgrouped"; type: IMAGE;
scale: 1;
description { state: "default" 0.0;
aspect: 1.0 1.0; aspect_preference: BOTH;
align: 0.0 0.5;
min: 0 0;
max: 0 0;
fixed: 1 1;
rel1 {
to: "tab_base_top2";
relative: 0.0 0.3;
offset: -1 0;
}
rel2 {
to: "tab_base_top2";
relative: 1.0 0.7;
}
visible: 0;
}
description { state: "grouped" 0.0;
inherit: "default" 0.0;
min: 8 8;
max: 32 32;
image.normal: "tab_grouped";
rel1 {
to: "tab_base_top2";
relative: 0.0 0.3;
}
rel2 {
to: "tab_base_top2";
relative: 1.0 0.7;
}
color: FG_COLOR;
visible: 1;
}
}
program {
signal: "grouped,on"; source: "terminology";
action: STATE_SET "grouped" 0.0;
target: "tabgrouped";
}
program {
signal: "grouped,off"; source: "terminology";
action: STATE_SET "default" 0.0;
target: "tabgrouped";
}
part { name: "terminology.title"; type: TEXT; mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
@ -2004,7 +2051,12 @@ collections {
}
align: 0.5 0.5;
color: 96 96 96 255;
rel1.to: "tab_base_top2";
rel1 {
to_x: "tabgrouped";
to_y: "tab_base_top2";
relative: 1.0 0.0;
offset: 2 0;
}
rel2.to: "tab_base_top2";
}
description { state: "bell" 0.0;

View File

@ -2339,9 +2339,11 @@ _win_toggle_group(Win *wn)
{
GROUPED_INPUT_TERM_FOREACH(wn, l, term)
{
edje_object_signal_emit(term->bg, "focus,in", "terminology");
edje_object_signal_emit(term->bg, "grouped,on", "terminology");
/* TODO: boris tabbar_back */
elm_layout_signal_emit(term->bg, "focus,in", "terminology");
elm_layout_signal_emit(term->bg, "grouped,on", "terminology");
if (term->tab_inactive)
edje_object_signal_emit(term->tab_inactive,
"grouped,on", "terminology");
termio_event_feed_mouse_in(term->termio);
termio_focus_in(term->termio);
}
@ -2352,11 +2354,16 @@ _win_toggle_group(Win *wn)
{
wn->group_input = EINA_FALSE;
DBG("GROUP INPUT is now FALSE");
GROUPED_INPUT_TERM_FOREACH(wn, l, term)
/* Better disable it for all of them in case of change of policy
* between only visible or all.
* Using the GROUPED_INPUT_TERM_FOREACH macro would miss some terms */
EINA_LIST_FOREACH(wn->terms, l, term)
{
edje_object_signal_emit(term->bg, "focus,out", "terminology");
edje_object_signal_emit(term->bg, "grouped,off", "terminology");
/* TODO: boris tabbar_back */
elm_layout_signal_emit(term->bg, "focus,out", "terminology");
elm_layout_signal_emit(term->bg, "grouped,off", "terminology");
if (term->tab_inactive)
edje_object_signal_emit(term->tab_inactive,
"grouped,off", "terminology");
termio_focus_out(term->termio);
}
term = wn->child->term_first(wn->child);