From 04afcef239faeef304fc013f90e119d3e944e37b Mon Sep 17 00:00:00 2001 From: Sorokin Alexei Date: Tue, 2 Feb 2016 00:48:07 +0300 Subject: [PATCH] Use system icon for windows if available --- qutebrowser/app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qutebrowser/app.py b/qutebrowser/app.py index d29364fd5..a9594da8e 100644 --- a/qutebrowser/app.py +++ b/qutebrowser/app.py @@ -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)