コード例 #1
0
    def on_activated(self, view):
        if is_colorizable(view):
            generate_menu(view)

        state = state_for(view)
        if state and state.theme_path:
            # set file's own theme path, because we use one per css file
            theme.set(state.theme_path)

        if need_colorization(view):
            colorize_file(view, state)

        if need_uncolorization(view):
            uncolorize_file(view, state_for(view))
コード例 #2
0
ファイル: livecolors.py プロジェクト: MarioRicalde/livecss
    def on_activated(self, view):
        if is_colorizable(view):
            generate_menu(view)

        state = state_for(view)
        if state and state.theme_path:
            # set file's own theme path, because we use one per css file
            theme.set(state.theme_path)

        if need_colorization(view):
            colorize_file(view, state)

        if need_uncolorization(view):
            uncolorize_file(view)
コード例 #3
0
ファイル: livecolors.py プロジェクト: bandroidx/livecss
    def on_activated(self, view):
        if is_colorizable(view):
            generate_menu(view)

            # set file's own theme path
            # because we use one per css file
            state = State(view)
            if state.theme_path:
                theme.set(state.theme_path)

        if need_colorization(view):
            colorize_file(view)

        if need_uncolorization(view):
            uncolorize_file(view)
コード例 #4
0
ファイル: livecolors.py プロジェクト: bandroidx/livecss
 def on_modified(self, view):
     if need_colorization(view):
         colorize_file(view)
コード例 #5
0
ファイル: livecolors.py プロジェクト: bandroidx/livecss
    def on_load(self, view):
        # set hook to recolorize if different theme was chosen
        theme.on_select_new_theme(lambda: colorize_on_select_new_theme(view))

        if need_colorization(view):
            colorize_file(view, True)
コード例 #6
0
 def on_modified(self, view):
     if need_colorization(view):
         colorize_file(view, state_for(view))
コード例 #7
0
    def on_load(self, view):
        # set hook to recolorize if different theme was chosen
        theme.on_select_new_theme(lambda: colorize_on_select_new_theme(view))

        if need_colorization(view):
            colorize_file(view, state_for(view))