Put the image bytes directly in code

This commit is contained in:
Charles Haley 2020-05-27 13:16:43 +01:00
parent 912723e7e2
commit 42318c46b6
3 changed files with 12 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 B

View File

@ -764,7 +764,12 @@ class EditorWidget(QTextEdit, LineEditECM): # {{{
with lopen(path, 'rb') as f:
data = f.read()
except EnvironmentError:
return QByteArray(I('blank-1x1.png', data=True))
return QByteArray(bytearray.fromhex(
'89504e470d0a1a0a0000000d49484452'
'000000010000000108060000001f15c4'
'890000000a49444154789c6300010000'
'0500010d0a2db40000000049454e44ae'
'426082'))
else:
return QByteArray(data)

View File

@ -489,7 +489,12 @@ class HTMLDisplay(QTextBrowser):
with lopen(path, 'rb') as f:
data = f.read()
except EnvironmentError:
return QByteArray(I('blank-1x1.png', data=True))
return QByteArray(bytearray.fromhex(
'89504e470d0a1a0a0000000d49484452'
'000000010000000108060000001f15c4'
'890000000a49444154789c6300010000'
'0500010d0a2db40000000049454e44ae'
'426082'))
else:
return QByteArray(data)
else: