mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit Book: Fix selected text not being fully highlighted when using the solarized color schemes. Fixes #1647448 [Selected text not visible in ebook-editor with solarized-dark theme](https://bugs.launchpad.net/calibre/+bug/1647448)
This commit is contained in:
parent
1371f6c858
commit
7735b0c9f7
@ -49,7 +49,7 @@ SOLARIZED = \
|
||||
PmenuSel fg={base01} bg={base2}
|
||||
|
||||
Cursor fg={base03} bg={base0}
|
||||
Normal fg={base0} bg={base03}
|
||||
Normal fg={base0} bg={base02}
|
||||
LineNr fg={base01} bg={base02}
|
||||
LineNrC fg={magenta}
|
||||
Visual fg={base01} bg={base03}
|
||||
@ -201,6 +201,7 @@ def read_color(col):
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
Highlight = namedtuple('Highlight', 'fg bg bold italic underline underline_color')
|
||||
|
||||
|
||||
@ -235,6 +236,7 @@ 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()}
|
||||
|
||||
|
||||
@ -243,6 +245,8 @@ def u(x):
|
||||
if 'Dot' in x:
|
||||
return x + 'Line'
|
||||
return x + 'Underline'
|
||||
|
||||
|
||||
underline_styles = {x:getattr(QTextCharFormat, u(x)) for x in underline_styles}
|
||||
|
||||
|
||||
@ -474,6 +478,8 @@ class Property(QWidget):
|
||||
self.changed.emit()
|
||||
|
||||
# Help text {{{
|
||||
|
||||
|
||||
HELP_TEXT = _('''\
|
||||
<h2>Creating a custom theme</h2>
|
||||
|
||||
@ -685,6 +691,7 @@ class ThemeEditor(Dialog):
|
||||
return QSize(min(1500, g.width() - 25), 650)
|
||||
# }}}
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app = QApplication([])
|
||||
d = ThemeEditor()
|
||||
|
Loading…
x
Reference in New Issue
Block a user