File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -351,6 +351,13 @@ pub enum Container {
351351 Custom ( Box < dyn container:: StyleSheet < Style = Theme > > ) ,
352352}
353353
354+ impl Container {
355+ /// Creates a custom [`Container`] style.
356+ pub fn custom_fn ( f : fn ( & Theme ) -> container:: Appearance ) -> Self {
357+ Self :: Custom ( Box :: new ( f) )
358+ }
359+ }
360+
354361impl From < fn ( & Theme ) -> container:: Appearance > for Container {
355362 fn from ( f : fn ( & Theme ) -> container:: Appearance ) -> Self {
356363 Self :: Custom ( Box :: new ( f) )
@@ -362,7 +369,7 @@ impl container::StyleSheet for Theme {
362369
363370 fn appearance ( & self , style : & Self :: Style ) -> container:: Appearance {
364371 match style {
365- Container :: Transparent => Default :: default ( ) ,
372+ Container :: Transparent => container :: Appearance :: default ( ) ,
366373 Container :: Box => {
367374 let palette = self . extended_palette ( ) ;
368375
You can’t perform that action at this time.
0 commit comments