app/search_page.py
def change_theme(self, *args):
        """Change Search Page theme based on selected option."""

        text_list = [
            *constants.TITLES, *constants.INFO_TEXT_NAMES, 'themes_lbl',
        ]
        entry_list = [
            *constants.INFO_ENTRY_NAMES, *constants.STAT_ENTRY_NAMES,'f_draws',
        ]
        left_boxes = [
            self.search_box, self.database_box, self.sort_box
        ]

        colors_dict = utilities.colors_dict(theme=self.themes_list.get(), file='SEARCH_PAGE')

        for text in text_list:
            getattr(self, text).configure(
                bg=colors_dict['lbl_bg_color'],
                fg=colors_dict['lbl_fg_color'],
            )

        for entry in entry_list:
            getattr(self, entry).configure(
                bg=colors_dict['entry_bg_color'],
                fg=colors_dict['entry_fg_color'],
            )

        for box in left_boxes:
            box.configure(
                bg=colors_dict['left_frame'],
                fg=colors_dict['lbl_fg_color'],
            )

        self.right_frame.configure(bg=colors_dict['right_frame'])
        self.left_frame.configure(bg=colors_dict['left_frame'])
        self.upcoming_fights.configure(
            bg=colors_dict['entry_bg_color'],
            fg=colors_dict['entry_fg_color'],
        )
Change Search Page theme based on selected option.
Change Search Page theme based on selected option.
Change Search Page theme based on selected option .
def change_theme(self, *args):
        text_list = [
            *constants.TITLES, *constants.INFO_TEXT_NAMES, 'themes_lbl',
        ]
        entry_list = [
            *constants.INFO_ENTRY_NAMES, *constants.STAT_ENTRY_NAMES,'f_draws',
        ]
        left_boxes = [
            self.search_box, self.database_box, self.sort_box
        ]
        colors_dict = utilities.colors_dict(theme=self.themes_list.get(), file='SEARCH_PAGE')
        for text in text_list:
            getattr(self, text).configure(
                bg=colors_dict['lbl_bg_color'],
                fg=colors_dict['lbl_fg_color'],
            )
        for entry in entry_list:
            getattr(self, entry).configure(
                bg=colors_dict['entry_bg_color'],
                fg=colors_dict['entry_fg_color'],
            )
        for box in left_boxes:
            box.configure(
                bg=colors_dict['left_frame'],
                fg=colors_dict['lbl_fg_color'],
            )
        self.right_frame.configure(bg=colors_dict['right_frame'])
        self.left_frame.configure(bg=colors_dict['left_frame'])
        self.upcoming_fights.configure(
            bg=colors_dict['entry_bg_color'],
            fg=colors_dict['entry_fg_color'],
        )
def change_theme ( self , * args ) : text_list = [ * constants . TITLES , * constants . INFO_TEXT_NAMES , 'themes_lbl' , ] entry_list = [ * constants . INFO_ENTRY_NAMES , * constants . STAT_ENTRY_NAMES , 'f_draws' , ] left_boxes = [ self . search_box , self . database_box , self . sort_box ] colors_dict = utilities . colors_dict ( theme = self . themes_list . get ( ) , file = 'SEARCH_PAGE' ) for text in text_list : getattr ( self , text ) . configure ( bg = colors_dict [ 'lbl_bg_color' ] , fg = colors_dict [ 'lbl_fg_color' ] , ) for entry in entry_list : getattr ( self , entry ) . configure ( bg = colors_dict [ 'entry_bg_color' ] , fg = colors_dict [ 'entry_fg_color' ] , ) for box in left_boxes : box . configure ( bg = colors_dict [ 'left_frame' ] , fg = colors_dict [ 'lbl_fg_color' ] , ) self . right_frame . configure ( bg = colors_dict [ 'right_frame' ] ) self . left_frame . configure ( bg = colors_dict [ 'left_frame' ] ) self . upcoming_fights . configure ( bg = colors_dict [ 'entry_bg_color' ] , fg = colors_dict [ 'entry_fg_color' ] , )
Change Search Page theme based on selected option.
Change Search Page theme based on selected option .
"""Change Search Page theme based on selected option."""
self