[yew-devel] [PATCH yew-widget-toolkit 03/11] touch: page stack: add more animations

Dominik Csapak d.csapak at proxmox.com
Fri Jun 27 14:08:51 CEST 2025


needs the changes from pwt-assets too, otherwise the animations won't
work. For the 'flip' effect, we need to set the class 'pwt-page-outer'
since that contains a relevant css property.

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/touch/page_stack.rs | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/touch/page_stack.rs b/src/touch/page_stack.rs
index 85d4438..bb05058 100644
--- a/src/touch/page_stack.rs
+++ b/src/touch/page_stack.rs
@@ -15,6 +15,9 @@ use crate::widget::Container;
 pub enum PageAnimationStyle {
     Push,
     Fade,
+    FadeFromRight,
+    FadeFromBottom,
+    Flip,
     Cover,
 }
 
@@ -23,6 +26,9 @@ impl From<PageAnimationStyle> for Classes {
         match val {
             PageAnimationStyle::Push => "pwt-page-animation-push",
             PageAnimationStyle::Fade => "pwt-page-animation-fade",
+            PageAnimationStyle::FadeFromRight => "pwt-page-animation-fade-from-right",
+            PageAnimationStyle::FadeFromBottom => "pwt-page-animation-fade-from-bottom",
+            PageAnimationStyle::Flip => "pwt-page-animation-flip",
             PageAnimationStyle::Cover => "pwt-page-animation-cover",
         }
         .into()
@@ -206,6 +212,7 @@ impl Component for PwtPageStack {
         Container::new()
             .class("pwt-position-relative")
             .class("pwt-overflow-hidden")
+            .class("pwt-page-outer")
             .width(CssLength::Fraction(1.0))
             .height(CssLength::Fraction(1.0))
             .children(children)
-- 
2.39.5





More information about the yew-devel mailing list