@@ -9,8 +9,8 @@ use anathema_widgets::layout::{Constraints, LayoutCtx, LayoutFilter, PositionFil
99use anathema_widgets:: paint:: PaintFilter ;
1010use anathema_widgets:: { GlyphMap , LayoutForEach , PaintChildren , PositionChildren , WidgetTreeView } ;
1111
12- pub mod tui;
1312pub mod testing;
13+ pub mod tui;
1414
1515pub trait Backend {
1616 fn size ( & self ) -> Size ;
@@ -55,54 +55,45 @@ impl<'rt, 'bp, T: Backend> WidgetCycle<'rt, 'bp, T> {
5555 }
5656 }
5757
58- fn floating ( & mut self , ctx : & mut LayoutCtx < ' _ , ' bp > , needs_layout : bool ) -> Result < ( ) > {
58+ fn fixed ( & mut self , ctx : & mut LayoutCtx < ' _ , ' bp > , needs_layout : bool ) -> Result < ( ) > {
5959 // -----------------------------------------------------------------------------
6060 // - Layout -
6161 // -----------------------------------------------------------------------------
6262 if needs_layout {
63- let filter = LayoutFilter :: floating ( ) ;
63+ let filter = LayoutFilter :: all ( ) ;
6464 self . layout ( ctx, filter) ?;
6565 }
6666
6767 // -----------------------------------------------------------------------------
6868 // - Position -
6969 // -----------------------------------------------------------------------------
70- self . position ( ctx. attribute_storage , * ctx. viewport , PositionFilter :: floating ( ) ) ;
70+ self . position ( ctx. attribute_storage , * ctx. viewport , PositionFilter :: fixed ( ) ) ;
7171
7272 // -----------------------------------------------------------------------------
7373 // - Paint -
7474 // -----------------------------------------------------------------------------
75- self . paint ( ctx, PaintFilter :: floating ( ) ) ;
75+ self . paint ( ctx, PaintFilter :: fixed ( ) ) ;
7676
7777 Ok ( ( ) )
7878 }
7979
80- fn fixed ( & mut self , ctx : & mut LayoutCtx < ' _ , ' bp > , needs_layout : bool ) -> Result < ( ) > {
81- // -----------------------------------------------------------------------------
82- // - Layout -
83- // -----------------------------------------------------------------------------
84- if needs_layout {
85- let filter = LayoutFilter :: fixed ( ) ;
86- self . layout ( ctx, filter) ?;
87- }
88-
80+ fn floating ( & mut self , ctx : & mut LayoutCtx < ' _ , ' bp > ) -> Result < ( ) > {
8981 // -----------------------------------------------------------------------------
9082 // - Position -
9183 // -----------------------------------------------------------------------------
92- self . position ( ctx. attribute_storage , * ctx. viewport , PositionFilter :: fixed ( ) ) ;
84+ self . position ( ctx. attribute_storage , * ctx. viewport , PositionFilter :: floating ( ) ) ;
9385
9486 // -----------------------------------------------------------------------------
9587 // - Paint -
9688 // -----------------------------------------------------------------------------
97- self . paint ( ctx, PaintFilter :: fixed ( ) ) ;
89+ self . paint ( ctx, PaintFilter :: floating ( ) ) ;
9890
9991 Ok ( ( ) )
10092 }
10193
10294 pub fn run ( & mut self , ctx : & mut LayoutCtx < ' _ , ' bp > , needs_layout : bool ) -> Result < ( ) > {
10395 self . fixed ( ctx, needs_layout) ?;
104- self . floating ( ctx, needs_layout) ?;
105-
96+ self . floating ( ctx) ?;
10697 Ok ( ( ) )
10798 }
10899
0 commit comments