diff --git a/src/calibre/gui2/tweak_book/editor/themes.py b/src/calibre/gui2/tweak_book/editor/themes.py index 6286d6c6c8..1663843584 100644 --- a/src/calibre/gui2/tweak_book/editor/themes.py +++ b/src/calibre/gui2/tweak_book/editor/themes.py @@ -70,6 +70,7 @@ SOLARIZED = \ Error us=wave uc={red} SpellError us=wave uc={orange} Tooltip fg=black bg=ffffed + Link fg={blue} DiffDelete bg={base02} fg={red} DiffInsert bg={base02} fg={green} @@ -111,6 +112,7 @@ THEMES = { Error us=wave uc=red SpellError us=wave uc=orange SpecialCharacter bg={cursor_loc} + Link fg=cyan DiffDelete bg=341414 fg=642424 DiffInsert bg=143414 fg=246424 @@ -157,6 +159,7 @@ THEMES = { SpecialCharacter bg={cursor_loc} Error us=wave uc=red SpellError us=wave uc=magenta + Link fg=blue DiffDelete bg=rgb(255,180,200) fg=rgb(200,80,110) DiffInsert bg=rgb(180,255,180) fg=rgb(80,210,80) @@ -224,7 +227,6 @@ def read_theme(raw): ans[name] = Highlight(fg, bg, bold, italic, underline, underline_color) return ans - THEMES = {k:read_theme(raw) for k, raw in THEMES.iteritems()} def u(x): @@ -584,6 +586,9 @@ class ThemeEditor(Dialog): data.pop(k) for k in missing: data[k] = dict(THEMES[default_theme()][k]._asdict()) + for nk, nv in data[k].iteritems(): + if isinstance(nv, QBrush): + data[k][nk] = unicode(nv.color().name()) if extra or missing: tprefs['custom_themes'][name] = data return data diff --git a/src/calibre/gui2/tweak_book/live_css.py b/src/calibre/gui2/tweak_book/live_css.py index 9273eb9949..8144948290 100644 --- a/src/calibre/gui2/tweak_book/live_css.py +++ b/src/calibre/gui2/tweak_book/live_css.py @@ -364,6 +364,7 @@ class LiveCSS(QWidget): pal.setColor(pal.Window, theme_color(theme, 'Normal', 'bg')) pal.setColor(pal.WindowText, theme_color(theme, 'Normal', 'fg')) pal.setColor(pal.AlternateBase, theme_color(theme, 'HighlightRegion', 'bg')) + pal.setColor(pal.Link, theme_color(theme, 'Link', 'fg')) pal.setColor(pal.LinkVisited, theme_color(theme, 'Keyword', 'fg')) self.setPalette(pal) if hasattr(self, 'box'):