@@ -165,7 +165,7 @@ def _create_badge_background(self) -> None:
165165 if self ._background_group is None :
166166 self ._background_group = displayio .Group ()
167167
168- self .show ( self ._background_group )
168+ self .root_group = self ._background_group
169169
170170 if self ._background_image_filename :
171171 file_handle = open ( # pylint: disable=consider-using-with
@@ -359,7 +359,7 @@ def show_custom_badge(self) -> None:
359359 if not self ._created_background :
360360 self ._create_badge_background ()
361361
362- self .show ( self ._background_group )
362+ self .root_group = self ._background_group
363363
364364 # pylint: disable=too-many-arguments
365365 def _create_label_group (
@@ -561,7 +561,7 @@ def show_business_card(
561561 business_card_splash .append (face_image )
562562 for group in business_card_label_groups :
563563 business_card_splash .append (group )
564- self .show ( business_card_splash )
564+ self .root_group = business_card_splash
565565
566566 # pylint: disable=too-many-locals
567567 def show_badge (
@@ -646,9 +646,15 @@ def show_badge(
646646 group .append (hello_group )
647647 group .append (my_name_is_group )
648648 group .append (name_group )
649- self .show ( group )
649+ self .root_group = group
650650
651- def show (self , group ) -> None :
651+ @property
652+ def root_group (self ):
653+ """The currently showing Group"""
654+ return self .display .root_group
655+
656+ @root_group .setter
657+ def root_group (self , group ):
652658 """Show the given group, refreshing the screen immediately"""
653659 self .activity ()
654660 self .display .auto_refresh = False
@@ -658,7 +664,7 @@ def show(self, group) -> None:
658664
659665 def show_terminal (self ) -> None :
660666 """Revert to terminalio screen."""
661- self .show ( None )
667+ self .root_group = displayio . CIRCUITPYTHON_TERMINAL
662668
663669 @staticmethod
664670 def bitmap_qr (matrix : adafruit_miniqr .QRBitMatrix ) -> displayio .Bitmap :
@@ -710,7 +716,7 @@ def show_qr_code(self, data: str = "https://circuitpython.org") -> None:
710716 )
711717 qr_code = displayio .Group (scale = qr_code_scale )
712718 qr_code .append (qr_img )
713- self .show ( qr_code )
719+ self .root_group = qr_code
714720
715721 @staticmethod
716722 def _sine_sample (length : int ) -> Generator [int , None , None ]:
0 commit comments