mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #2085825 [Mark and select books buttton - FTS dialogue - lighter green in dark mode](https://bugs.launchpad.net/calibre/+bug/2085825)
This commit is contained in:
parent
adc64d7378
commit
bad1a15d0e
@ -44,10 +44,13 @@ ALIGNMENT_MAP = {'left': Qt.AlignmentFlag.AlignLeft, 'right': Qt.AlignmentFlag.A
|
|||||||
Qt.AlignmentFlag.AlignHCenter}
|
Qt.AlignmentFlag.AlignHCenter}
|
||||||
|
|
||||||
|
|
||||||
def render_pin(color='green', save_to=None):
|
def render_pin(color=None, save_to=None):
|
||||||
|
app = QApplication.instance()
|
||||||
|
if color is None:
|
||||||
|
color = '#00b000' if app.is_dark_theme else 'green'
|
||||||
svg = P('pin-template.svg', data=True).replace(b'fill:#f39509', ('fill:' + color).encode('utf-8'))
|
svg = P('pin-template.svg', data=True).replace(b'fill:#f39509', ('fill:' + color).encode('utf-8'))
|
||||||
pm = QPixmap()
|
pm = QPixmap()
|
||||||
dpr = QApplication.instance().devicePixelRatio()
|
dpr = app.devicePixelRatio()
|
||||||
pm.setDevicePixelRatio(dpr)
|
pm.setDevicePixelRatio(dpr)
|
||||||
pm.loadFromData(svg, 'svg')
|
pm.loadFromData(svg, 'svg')
|
||||||
if save_to:
|
if save_to:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user