mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Use the themes for the dialog close button
This commit is contained in:
parent
d377eedf52
commit
b94ddad134
@ -25,6 +25,8 @@ skip = {'calibre'}
|
|||||||
j = os.path.join
|
j = os.path.join
|
||||||
base = os.path.dirname(os.path.abspath(__file__))
|
base = os.path.dirname(os.path.abspath(__file__))
|
||||||
output_base = j(os.path.dirname(base), 'resources', 'images')
|
output_base = j(os.path.dirname(base), 'resources', 'images')
|
||||||
|
dark_output_base = j(os.path.dirname(output_base), 'icon-themes', 'calibre-default-dark', 'base')
|
||||||
|
light_output_base = j(os.path.dirname(output_base), 'icon-themes', 'calibre-default-light', 'base')
|
||||||
hash_path = j(os.path.dirname(base), '.build-cache', 'imgsrc-gen.json')
|
hash_path = j(os.path.dirname(base), '.build-cache', 'imgsrc-gen.json')
|
||||||
if os.path.exists(hash_path):
|
if os.path.exists(hash_path):
|
||||||
with open(hash_path, 'rb') as f:
|
with open(hash_path, 'rb') as f:
|
||||||
@ -43,7 +45,12 @@ def iterfiles(only=()):
|
|||||||
if not only and h == hashes.get(name):
|
if not only and h == hashes.get(name):
|
||||||
continue
|
continue
|
||||||
output_names = [n for n in [name] + duplicates.get(name, []) if n not in skip]
|
output_names = [n for n in [name] + duplicates.get(name, []) if n not in skip]
|
||||||
output_files = [j(output_base, n) + '.png' for n in output_names]
|
obase = output_base
|
||||||
|
if name.endswith('-for-dark-theme'):
|
||||||
|
obase = dark_output_base
|
||||||
|
elif name.endswith('-for-light-theme'):
|
||||||
|
obase = light_output_base
|
||||||
|
output_files = [j(obase, n) + '.png' for n in output_names]
|
||||||
if output_files:
|
if output_files:
|
||||||
yield src, output_files
|
yield src, output_files
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
@ -1190,7 +1190,7 @@ class Application(QApplication):
|
|||||||
for k, v in {
|
for k, v in {
|
||||||
'DialogYesButton': 'ok.png',
|
'DialogYesButton': 'ok.png',
|
||||||
'DialogNoButton': 'window-close.png',
|
'DialogNoButton': 'window-close.png',
|
||||||
'DialogCloseButton': 'window-close.png',
|
'DialogCloseButton': 'close.png',
|
||||||
'DialogOkButton': 'ok.png',
|
'DialogOkButton': 'ok.png',
|
||||||
'DialogCancelButton': 'window-close.png',
|
'DialogCancelButton': 'window-close.png',
|
||||||
'DialogHelpButton': 'help.png',
|
'DialogHelpButton': 'help.png',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user