mirror of
https://github.com/elementary/gala.git
synced 2024-11-23 20:07:21 +03:00
PanelClone: Don't animate while in fullscreen (#1927)
Co-authored-by: Danielle Foré <danielle@elementary.io>
This commit is contained in:
parent
b8d705875f
commit
dde55d8736
@ -104,6 +104,12 @@ public class Gala.PanelClone : Object {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int get_animation_duration () {
|
||||||
|
var fullscreen = wm.get_display ().get_monitor_in_fullscreen (panel.window.get_monitor ());
|
||||||
|
var should_animate = wm.enable_animations && !wm.workspace_view.is_opened () && !fullscreen;
|
||||||
|
return should_animate ? ANIMATION_DURATION : 0;
|
||||||
|
}
|
||||||
|
|
||||||
private void hide () {
|
private void hide () {
|
||||||
if (panel_hidden) {
|
if (panel_hidden) {
|
||||||
return;
|
return;
|
||||||
@ -120,7 +126,7 @@ public class Gala.PanelClone : Object {
|
|||||||
|
|
||||||
clone.save_easing_state ();
|
clone.save_easing_state ();
|
||||||
clone.set_easing_mode (Clutter.AnimationMode.EASE_OUT_QUAD);
|
clone.set_easing_mode (Clutter.AnimationMode.EASE_OUT_QUAD);
|
||||||
clone.set_easing_duration (wm.enable_animations && !wm.workspace_view.is_opened () ? ANIMATION_DURATION : 0);
|
clone.set_easing_duration (get_animation_duration ());
|
||||||
clone.y = calculate_clone_y (true);
|
clone.y = calculate_clone_y (true);
|
||||||
clone.restore_easing_state ();
|
clone.restore_easing_state ();
|
||||||
}
|
}
|
||||||
@ -130,7 +136,7 @@ public class Gala.PanelClone : Object {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var animation_duration = wm.enable_animations && !wm.workspace_view.is_opened () ? ANIMATION_DURATION : 0;
|
var animation_duration = get_animation_duration ();
|
||||||
|
|
||||||
clone.save_easing_state ();
|
clone.save_easing_state ();
|
||||||
clone.set_easing_mode (Clutter.AnimationMode.EASE_OUT_QUAD);
|
clone.set_easing_mode (Clutter.AnimationMode.EASE_OUT_QUAD);
|
||||||
|
Loading…
Reference in New Issue
Block a user