Merge branch 'master' of https://github.com/XRevan86/qutebrowser into XRevan86-master

This commit is contained in:
Florian Bruhin 2016-02-02 06:41:29 +01:00
commit 7e584bb31d

View File

@ -165,11 +165,14 @@ def init(args, crash_handler):
def _init_icon():
"""Initialize the icon of qutebrowser."""
icon = QIcon()
fallback_icon = QIcon()
for size in (16, 24, 32, 48, 64, 96, 128, 256, 512):
filename = ':/icons/qutebrowser-{}x{}.png'.format(size, size)
pixmap = QPixmap(filename)
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)
qApp.setWindowIcon(icon)