[libadwaita/wip/exalm/toast-transition] toast-overlay: Reduce scaling on hide transition
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/toast-transition] toast-overlay: Reduce scaling on hide transition
- Date: Thu, 11 Nov 2021 07:34:39 +0000 (UTC)
commit 040099b1a44cb02be097e67065c4e404156f3742
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Thu Nov 11 12:34:24 2021 +0500
toast-overlay: Reduce scaling on hide transition
Fixes https://gitlab.gnome.org/GNOME/libadwaita/-/issues/320
src/adw-toast-overlay.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/adw-toast-overlay.c b/src/adw-toast-overlay.c
index 2d903291..55836000 100644
--- a/src/adw-toast-overlay.c
+++ b/src/adw-toast-overlay.c
@@ -18,7 +18,7 @@
#define SHOW_DURATION 300
#define HIDE_DURATION 300
#define REPLACE_DURATION 500
-#define FINAL_SIZE 0.7
+#define SCALE_AMOUNT 0.05
#define NATURAL_WIDTH 450
/**
@@ -321,7 +321,7 @@ allocate_toast (AdwToastOverlay *self,
x = size.width / 2.0f;
y = size.height / 2.0f;
- value = adw_lerp (FINAL_SIZE, 1.0f, value);
+ value = adw_lerp (1 - SCALE_AMOUNT, 1, value);
transform = gsk_transform_translate (transform,
&GRAPHENE_POINT_INIT (x, y));
transform = gsk_transform_scale (transform, value, value);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]