theme: add active style to tabbar_back when tab is being dragged

This commit is contained in:
Boris Faure 2020-02-08 18:29:01 +01:00
parent ef29315736
commit ee2c3e5ae9
Signed by: borisfaure
GPG Key ID: 35C0410516166BE8
4 changed files with 30 additions and 14 deletions

View File

@ -6,6 +6,8 @@ Changes since 1.6.0:
--------------------
* In group "terminology/tabbar_back", add signal "bell,off" from "terminology"
to unmark a tab as having missed the bell.
* In group "terminology/tabbar_back", add signal "style,active" from "terminology"
to set style as active, used during tab drag and drop.
* In group "terminology/background", add signals "hdrag,on" (default) and
"hdrag,off" to restrict (default) tab to be dragged only horizontally
* In group "terminology/background", signals "tab,mouse,down" and

View File

@ -134,6 +134,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.
### `style,active`
To set the style as active, used during tab drag and drop.

View File

@ -127,6 +127,11 @@ group { name: "terminology/tabbar_back";
color2: 255 51 0 48;
color3: 255 51 0 8;
}
description { state: "active" 0.0;
inherit: "default" 0.0;
color: 255 255 255 255;
color3: 0 0 0 18;
}
}
part { name: "clip"; type: RECT;
description { state: "default" 0.0;
@ -138,20 +143,26 @@ group { name: "terminology/tabbar_back";
color: 0 0 0 0;
}
}
program {
signal: "mouse,clicked,1"; source: "event";
action: SIGNAL_EMIT "tab,activate" "terminology";
}
program { name: "bell";
signal: "bell"; source: "terminology";
action: STATE_SET "bell" 0.0;
target: "terminology.title";
}
program { name: "bell,off";
signal: "bell,off"; source: "terminology";
action: STATE_SET "default" 0.0;
target: "terminology.title";
programs {
program {
signal: "mouse,clicked,1"; source: "event";
action: SIGNAL_EMIT "tab,activate" "terminology";
}
program { name: "bell";
signal: "bell"; source: "terminology";
action: STATE_SET "bell" 0.0;
target: "terminology.title";
}
program { name: "bell,off";
signal: "bell,off"; source: "terminology";
action: STATE_SET "default" 0.0;
target: "terminology.title";
}
program { name: "style,active";
signal: "style,active"; source: "terminology";
action: STATE_SET "active" 0.0;
target: "terminology.title";
}
}
}
}

View File

@ -3223,6 +3223,7 @@ _drag_anim_start(void *data)
theme_apply_elm(o, term->config, "terminology/tabbar_back");
elm_layout_text_set(o, "terminology.title",
term->container->title);
elm_layout_signal_emit(o, "style,active", "terminology");
for_each_term_do(drag_anim->term->wn, &_term_hdrag_off, NULL);