Fix some icons being blurry on High DPI screens
Get Qt to use high DPI images when rendering icons. Unfortunately, turning this on means that non-square images are not rendered properly, so convert all icons to square images.
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 3.0 KiB |
BIN
resources/images/devices/boox.png
Normal file
After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 4.3 KiB |
BIN
resources/images/devices/kindle.png
Normal file
After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 4.3 KiB |
BIN
resources/images/devices/nook.png
Normal file
After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 110 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 361 B After Width: | Height: | Size: 397 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 37 KiB |
@ -117,7 +117,7 @@ class BOOX(HANLINV3):
|
|||||||
supported_platforms = ['windows', 'osx', 'linux']
|
supported_platforms = ['windows', 'osx', 'linux']
|
||||||
METADATA_CACHE = '.metadata.calibre'
|
METADATA_CACHE = '.metadata.calibre'
|
||||||
DRIVEINFO = '.driveinfo.calibre'
|
DRIVEINFO = '.driveinfo.calibre'
|
||||||
icon = I('devices/boox.jpg')
|
icon = I('devices/boox.png')
|
||||||
|
|
||||||
# Ordered list of supported formats
|
# Ordered list of supported formats
|
||||||
FORMATS = ['epub', 'fb2', 'djvu', 'pdf', 'html', 'txt', 'rtf', 'mobi',
|
FORMATS = ['epub', 'fb2', 'djvu', 'pdf', 'html', 'txt', 'rtf', 'mobi',
|
||||||
|
@ -44,7 +44,7 @@ class KINDLE(USBMS):
|
|||||||
|
|
||||||
name = 'Kindle Device Interface'
|
name = 'Kindle Device Interface'
|
||||||
gui_name = 'Amazon Kindle'
|
gui_name = 'Amazon Kindle'
|
||||||
icon = I('devices/kindle.jpg')
|
icon = I('devices/kindle.png')
|
||||||
description = _('Communicate with the Kindle eBook reader.')
|
description = _('Communicate with the Kindle eBook reader.')
|
||||||
author = 'John Schember'
|
author = 'John Schember'
|
||||||
supported_platforms = ['windows', 'osx', 'linux']
|
supported_platforms = ['windows', 'osx', 'linux']
|
||||||
|
@ -22,7 +22,7 @@ class NOOK(USBMS):
|
|||||||
gui_name = _('The Nook')
|
gui_name = _('The Nook')
|
||||||
description = _('Communicate with the Nook eBook reader.')
|
description = _('Communicate with the Nook eBook reader.')
|
||||||
author = 'John Schember'
|
author = 'John Schember'
|
||||||
icon = I('devices/nook.jpg')
|
icon = I('devices/nook.png')
|
||||||
supported_platforms = ['windows', 'linux', 'osx']
|
supported_platforms = ['windows', 'linux', 'osx']
|
||||||
|
|
||||||
# Ordered list of supported formats
|
# Ordered list of supported formats
|
||||||
|
@ -874,6 +874,7 @@ class Application(QApplication):
|
|||||||
qargs = [i.encode('utf-8') if isinstance(i, unicode) else i for i in args]
|
qargs = [i.encode('utf-8') if isinstance(i, unicode) else i for i in args]
|
||||||
self.pi = plugins['progress_indicator'][0]
|
self.pi = plugins['progress_indicator'][0]
|
||||||
QApplication.__init__(self, qargs)
|
QApplication.__init__(self, qargs)
|
||||||
|
self.setAttribute(Qt.AA_UseHighDpiPixmaps)
|
||||||
if not iswindows:
|
if not iswindows:
|
||||||
self.setup_unix_signals()
|
self.setup_unix_signals()
|
||||||
if islinux or isbsd:
|
if islinux or isbsd:
|
||||||
|
@ -481,8 +481,9 @@ def test(): # {{{
|
|||||||
from calibre.ptempfile import TemporaryDirectory
|
from calibre.ptempfile import TemporaryDirectory
|
||||||
from calibre import CurrentDir
|
from calibre import CurrentDir
|
||||||
from glob import glob
|
from glob import glob
|
||||||
|
img = image_from_data(I('lt.png', data=True, allow_user_override=False))
|
||||||
with TemporaryDirectory() as tdir, CurrentDir(tdir):
|
with TemporaryDirectory() as tdir, CurrentDir(tdir):
|
||||||
shutil.copyfile(I('devices/kindle.jpg', allow_user_override=False), 'test.jpg')
|
save_image(img, 'test.jpg')
|
||||||
ret = optimize_jpeg('test.jpg')
|
ret = optimize_jpeg('test.jpg')
|
||||||
if ret is not None:
|
if ret is not None:
|
||||||
raise SystemExit('optimize_jpeg failed: %s' % ret)
|
raise SystemExit('optimize_jpeg failed: %s' % ret)
|
||||||
@ -495,7 +496,6 @@ def test(): # {{{
|
|||||||
raise SystemExit('optimize_png failed: %s' % ret)
|
raise SystemExit('optimize_png failed: %s' % ret)
|
||||||
if glob('*.bak'):
|
if glob('*.bak'):
|
||||||
raise SystemExit('Spurious .bak files left behind')
|
raise SystemExit('Spurious .bak files left behind')
|
||||||
img = image_from_data(I('devices/kindle.jpg', data=True, allow_user_override=False))
|
|
||||||
quantize_image(img)
|
quantize_image(img)
|
||||||
oil_paint_image(img)
|
oil_paint_image(img)
|
||||||
gaussian_sharpen_image(img)
|
gaussian_sharpen_image(img)
|
||||||
|