mirror of
https://github.com/elementary/gala.git
synced 2024-09-11 15:15:39 +03:00
Handle cancel action in IconGroup animation (#1654)
This commit is contained in:
parent
7af203c820
commit
f932bdfbad
@ -292,7 +292,7 @@ namespace Gala {
|
||||
var nudge_gap = InternalUtils.scale_to_int ((int)WindowManagerGala.NUDGE_GAP, scale);
|
||||
|
||||
unowned IconGroup active_icon_group = null;
|
||||
unowned IconGroup target_icon_group = null;
|
||||
unowned IconGroup? target_icon_group = null;
|
||||
|
||||
if (is_nudge_animation) {
|
||||
var workspaces_geometry = InternalUtils.get_workspaces_geometry (display);
|
||||
@ -311,10 +311,10 @@ namespace Gala {
|
||||
}
|
||||
}
|
||||
|
||||
if (active_icon_group.get_transition ("backdrop-opacity") != null) {
|
||||
if (!is_nudge_animation && active_icon_group.get_transition ("backdrop-opacity") != null) {
|
||||
active_icon_group.remove_transition ("backdrop-opacity");
|
||||
}
|
||||
if (target_icon_group.get_transition ("backdrop-opacity") != null) {
|
||||
if (!is_nudge_animation && target_icon_group.get_transition ("backdrop-opacity") != null) {
|
||||
target_icon_group.remove_transition ("backdrop-opacity");
|
||||
}
|
||||
|
||||
@ -360,7 +360,7 @@ namespace Gala {
|
||||
remove_on_complete = true
|
||||
};
|
||||
active_transition.set_from_value (active_icon_group.backdrop_opacity);
|
||||
active_transition.set_to_value (0.0f);
|
||||
active_transition.set_to_value (cancel_action ? 1.0f : 0.0f);
|
||||
active_icon_group.add_transition ("backdrop-opacity", active_transition);
|
||||
|
||||
var target_transition = new Clutter.PropertyTransition ("backdrop-opacity") {
|
||||
@ -368,7 +368,7 @@ namespace Gala {
|
||||
remove_on_complete = true
|
||||
};
|
||||
target_transition.set_from_value (target_icon_group.backdrop_opacity);
|
||||
target_transition.set_to_value (1.0f);
|
||||
target_transition.set_to_value (cancel_action ? 0.0f : 1.0f);
|
||||
target_icon_group.add_transition ("backdrop-opacity", target_transition);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user