panel: Fix corner transition when slowed down

Both ease() and CSS durations take the slow-down factor into account,
so the corners currently end up using the square of the factor in their
transition.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2118>
This commit is contained in:
Florian Müllner 2022-01-20 19:11:48 +01:00
parent 199529a67d
commit 6a10f2f2f1

View File

@ -492,7 +492,8 @@ class PanelCorner extends St.DrawingArea {
let cornerRadius = node.get_length("-panel-corner-radius");
let borderWidth = node.get_length('-panel-corner-border-width');
const transitionDuration = node.get_transition_duration();
const transitionDuration =
node.get_transition_duration() / St.Settings.get().slow_down_factor;
const opacity = node.get_double('-panel-corner-opacity');
this.set_size(cornerRadius, borderWidth + cornerRadius);