Esempio n. 1
0
 def on_setting_changed(self, settings, 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()
         }
Esempio n. 2
0
    def on_setting_changed(self, settings, key):
        if key == 'font':
            self.override_font(settings.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()

            buf = self.get_buffer()
            buf.set_style_scheme(settings.style_scheme)

            tag = buf.get_tag_table().lookup("inline")
            tag.props.background_rgba = colour_lookup_with_fallback(
                "meld:inline", "background")
            tag = buf.get_tag_table().lookup("dimmed")
            tag.props.foreground_rgba = colour_lookup_with_fallback(
                "meld:dimmed", "foreground")
Esempio n. 3
0
 def on_setting_changed(self, settings, key):
     if key == 'style-scheme':
         self.fill_colors, self.line_colors = get_common_theme()
         self._cached_map = None