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

        text_list = [
            *constants.INFO_TEXT_NAMES,
            *constants.STAT_TITLE_TEXT_NAMES,
            *constants.STAT_TEXT_NAMES.keys(),
            'vs_label', 'themes_lbl'
        ]
        entry_list = constants.INFO_ENTRY_NAMES
        right_boxes = [self.database_box, self.sort_box, self.themes_lbl]

        colors_dict = utilities.colors_dict(theme=self.themes_list.get(), file='COMPARE_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 right_boxes:
            box.configure(
                bg=colors_dict['right_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'])
Change Compare Page theme based on selected option.
Change Compare Page theme based on selected option.
Change Compare Page theme based on selected option .
def change_theme(self, *args):
        text_list = [
            *constants.INFO_TEXT_NAMES,
            *constants.STAT_TITLE_TEXT_NAMES,
            *constants.STAT_TEXT_NAMES.keys(),
            'vs_label', 'themes_lbl'
        ]
        entry_list = constants.INFO_ENTRY_NAMES
        right_boxes = [self.database_box, self.sort_box, self.themes_lbl]
        colors_dict = utilities.colors_dict(theme=self.themes_list.get(), file='COMPARE_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 right_boxes:
            box.configure(
                bg=colors_dict['right_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'])
def change_theme ( self , * args ) : text_list = [ * constants . INFO_TEXT_NAMES , * constants . STAT_TITLE_TEXT_NAMES , * constants . STAT_TEXT_NAMES . keys ( ) , 'vs_label' , 'themes_lbl' ] entry_list = constants . INFO_ENTRY_NAMES right_boxes = [ self . database_box , self . sort_box , self . themes_lbl ] colors_dict = utilities . colors_dict ( theme = self . themes_list . get ( ) , file = 'COMPARE_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 right_boxes : box . configure ( bg = colors_dict [ 'right_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' ] )
Change Compare Page theme based on selected option.
Change Compare Page theme based on selected option .
"""Change Compare Page theme based on selected option."""
self