Example #1
0
 def on_setting_changed(self, meldsettings, key):
     if key == 'style-scheme':
         self.fill_colors, self.line_colors = get_common_theme()
         alpha = self.fill_colors['current-chunk-highlight'].alpha
         self.chunk_highlights = {
             state: Gdk.RGBA(*[alpha + c * (1.0 - alpha) for c in colour])
             for state, colour in self.fill_colors.items()
         }
Example #2
0
 def on_setting_changed(self, meldsettings, key):
     if key == 'style-scheme':
         self.fill_colors, self.line_colors = get_common_theme()
         alpha = self.fill_colors['current-chunk-highlight'].alpha
         self.chunk_highlights = {
             state: Gdk.RGBA(*[alpha + c * (1.0 - alpha) for c in colour])
             for state, colour in self.fill_colors.items()
         }
Example #3
0
 def on_setting_changed(self, meldsettings, key):
     if key == 'style-scheme':
         # meldsettings.style_scheme
         self.fill_colors, self.line_colors = get_common_theme()
         alpha = self.fill_colors['current-chunk-highlight'].alpha
         make_highlight = lambda color: Gdk.RGBA(
             *[alpha + c * (1.0 - alpha) for c in color])
         self.chunk_highlights = {
             k: make_highlight(v) for k, v in self.fill_colors.items()
         }
 def on_setting_changed(self, meldsettings, key):
     if key == 'style-scheme':
         # meldsettings.style_scheme
         self.fill_colors, self.line_colors = get_common_theme()
         alpha = self.fill_colors['current-chunk-highlight'].alpha
         make_highlight = lambda color: Gdk.RGBA(
             *[alpha + c * (1.0 - alpha) for c in color])
         self.chunk_highlights = {
             k: make_highlight(v)
             for k, v in self.fill_colors.items()
         }
Example #5
0
    def on_setting_changed(self, settings, key):
        if key == "font":
            self.override_font(meldsettings.font)
        elif key == "style-scheme":
            self.highlight_color = colour_lookup_with_fallback("meld:current-line-highlight", "background")
            self.syncpoint_color = colour_lookup_with_fallback("meld:syncpoint-outline", "foreground")
            self.fill_colors, self.line_colors = get_common_theme()

            tag = self.get_buffer().get_tag_table().lookup("inline")
            tag.props.background_rgba = colour_lookup_with_fallback("meld:inline", "background")
            tag = self.get_buffer().get_tag_table().lookup("dimmed")
            tag.props.foreground_rgba = colour_lookup_with_fallback("meld:dimmed", "foreground")
Example #6
0
    def on_setting_changed(self, settings, key):
        if key == 'font':
            self.override_font(meldsettings.font)
        elif key == 'style-scheme':
            self.highlight_color = colour_lookup_with_fallback(
                "meld:current-line-highlight", "background")
            self.syncpoint_color = colour_lookup_with_fallback(
                "meld:syncpoint-outline", "foreground")
            self.fill_colors, self.line_colors = get_common_theme()

            tag = self.get_buffer().get_tag_table().lookup("inline")
            tag.props.background_rgba = colour_lookup_with_fallback(
                "meld:inline", "background")
Example #7
0
 def on_setting_changed(self, settings, key):
     if key == 'style-scheme':
         self.fill_colors, self.line_colors = get_common_theme()
Example #8
0
 def on_setting_changed(self, meldsettings, key):
     if key == 'style-scheme':
         self.fill_colors, self.line_colors = get_common_theme()
Example #9
0
 def on_setting_changed(self, meldsettings, key):
     if key == 'style-scheme':
         self.fill_colors, self.line_colors = get_common_theme()
         self._cached_map = None