Merge branch 'master' of https://github.com/XRevan86/qutebrowser into XRevan86-master
This commit is contained in:
commit
7e584bb31d
@ -165,11 +165,14 @@ def init(args, crash_handler):
|
|||||||
def _init_icon():
|
def _init_icon():
|
||||||
"""Initialize the icon of qutebrowser."""
|
"""Initialize the icon of qutebrowser."""
|
||||||
icon = QIcon()
|
icon = QIcon()
|
||||||
|
fallback_icon = QIcon()
|
||||||
for size in (16, 24, 32, 48, 64, 96, 128, 256, 512):
|
for size in (16, 24, 32, 48, 64, 96, 128, 256, 512):
|
||||||
filename = ':/icons/qutebrowser-{}x{}.png'.format(size, size)
|
filename = ':/icons/qutebrowser-{}x{}.png'.format(size, size)
|
||||||
pixmap = QPixmap(filename)
|
pixmap = QPixmap(filename)
|
||||||
qtutils.ensure_not_null(pixmap)
|
qtutils.ensure_not_null(pixmap)
|
||||||
icon.addPixmap(pixmap)
|
fallback_icon.addPixmap(pixmap)
|
||||||
|
qtutils.ensure_not_null(fallback_icon)
|
||||||
|
icon = QIcon.fromTheme('qutebrowser', fallback_icon)
|
||||||
qtutils.ensure_not_null(icon)
|
qtutils.ensure_not_null(icon)
|
||||||
qApp.setWindowIcon(icon)
|
qApp.setWindowIcon(icon)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user