diff options
author | Tobias Markmann <tm@ayena.de> | 2015-10-20 13:03:41 (GMT) |
---|---|---|
committer | Swift Review <review@swift.im> | 2015-10-27 08:38:54 (GMT) |
commit | 193335248b00556f0011b7e32b148a7a2c0eefe2 (patch) | |
tree | 38e4018d41a6f13ee6fbc977b88eeefa75e5af33 /Swift/QtUI | |
parent | 375937b46f941a7e266b1e3aca9a95002a0483bd (diff) | |
download | swift-193335248b00556f0011b7e32b148a7a2c0eefe2.zip swift-193335248b00556f0011b7e32b148a7a2c0eefe2.tar.bz2 |
Change window icon to default avatar on Windows
The task bar in Windows 10 has black as the default color.
The mainly black Swift application icon is hardly visible on
black background. Thus this patch changes the Window icon
on Windows to the default avatar icon in Swift.
Test-Information:
Tested on Windows 8 and Windows 10.
Change-Id: I1965cf37ba5a714094cff24ab971c0fc9f9d7fe1
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/QtLoginWindow.cpp | 6 | ||||
-rw-r--r-- | Swift/QtUI/Swift.qrc | 1 | ||||
-rw-r--r-- | Swift/QtUI/UserSearch/QtUserSearchWindow.cpp | 4 | ||||
-rw-r--r-- | Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp | 29 |
4 files changed, 30 insertions, 10 deletions
diff --git a/Swift/QtUI/QtLoginWindow.cpp b/Swift/QtUI/QtLoginWindow.cpp index 1e771ff..17176a9 100644 --- a/Swift/QtUI/QtLoginWindow.cpp +++ b/Swift/QtUI/QtLoginWindow.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2012 Isode Limited. + * Copyright (c) 2010-2015 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ @@ -56,8 +56,12 @@ QtLoginWindow::QtLoginWindow(UIEventStream* uiEventStream, SettingsProvider* set setWindowTitle("Swift"); #ifndef Q_OS_MAC +#ifdef Q_OS_WIN32 + setWindowIcon(QIcon(":/logo-icon-16-win.png")); +#else setWindowIcon(QIcon(":/logo-icon-16.png")); #endif +#endif QtUtilities::setX11Resource(this, "Main"); setAccessibleName(tr("Swift Login Window")); //setAccessibleDescription(tr("This window is used for providing credentials to log into your XMPP service")); diff --git a/Swift/QtUI/Swift.qrc b/Swift/QtUI/Swift.qrc index eeef80d..0478d76 100644 --- a/Swift/QtUI/Swift.qrc +++ b/Swift/QtUI/Swift.qrc @@ -2,6 +2,7 @@ <RCC version="1.0"> <qresource> <file alias="logo-icon-16.png">../resources/logo/logo-icon-16.png</file> + <file alias="logo-icon-16-win.png">../resources/logo/logo-icon-16-win.png</file> <file alias="logo-chat-16.png">../resources/logo/logo-chat-16.png</file> <file alias="logo-shaded-text.256.png">../resources/logo/logo-shaded-text.256.png</file> <file alias="icons/online.png">../resources/icons/online.png</file> diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp index bb6fc31..52b17b0 100644 --- a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp +++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp @@ -39,8 +39,12 @@ namespace Swift { QtUserSearchWindow::QtUserSearchWindow(UIEventStream* eventStream, UserSearchWindow::Type type, const std::set<std::string>& groups, SettingsProvider* settingsProvider) : eventStream_(eventStream), type_(type), model_(NULL), firstMultiJIDPage_(NULL), settings_(settingsProvider), searchNext_(false), supportsImpromptu_(false) { setupUi(this); #ifndef Q_OS_MAC +#ifdef Q_OS_WIN32 + setWindowIcon(QIcon(":/logo-icon-16-win.png")); +#else setWindowIcon(QIcon(":/logo-icon-16.png")); #endif +#endif QString title; switch(type) { case AddContact: diff --git a/Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp b/Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp index 89de95e..916246c 100644 --- a/Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp +++ b/Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp @@ -4,30 +4,41 @@ * See Documentation/Licenses/BSD-simplified.txt for more information. */ +/* + * Copyright (c) 2015 Isode Limited. + * All rights reserved. + * See the COPYING file for more information. + */ + #include "QtWhiteboardWindow.h" #include <iostream> #include <boost/bind.hpp> -#include <boost/smart_ptr/make_shared.hpp> #include <boost/numeric/conversion/cast.hpp> +#include <boost/smart_ptr/make_shared.hpp> -#include <Swiften/Whiteboard/WhiteboardSession.h> -#include <Swiften/Elements/WhiteboardPayload.h> +#include <QLabel> +#include <QMessageBox> + +#include <Swiften/Elements/Whiteboard/WhiteboardDeleteOperation.h> +#include <Swiften/Elements/Whiteboard/WhiteboardInsertOperation.h> #include <Swiften/Elements/Whiteboard/WhiteboardLineElement.h> #include <Swiften/Elements/Whiteboard/WhiteboardRectElement.h> -#include <Swiften/Elements/Whiteboard/WhiteboardInsertOperation.h> #include <Swiften/Elements/Whiteboard/WhiteboardUpdateOperation.h> -#include <Swiften/Elements/Whiteboard/WhiteboardDeleteOperation.h> -#include <Swift/QtUI/Whiteboard/WhiteboardElementDrawingVisitor.h> +#include <Swiften/Elements/WhiteboardPayload.h> +#include <Swiften/Whiteboard/WhiteboardSession.h> -#include <QMessageBox> -#include <QLabel> +#include <Swift/QtUI/Whiteboard/WhiteboardElementDrawingVisitor.h> namespace Swift { QtWhiteboardWindow::QtWhiteboardWindow(WhiteboardSession::ref whiteboardSession) : QWidget() { #ifndef Q_OS_MAC - setWindowIcon(QIcon(":/logo-icon-16.png")); +#ifdef Q_OS_WIN32 + setWindowIcon(QIcon(":/logo-icon-16-win.png")); +#else + setWindowIcon(QIcon(":/logo-icon-16.png")); +#endif #endif layout = new QVBoxLayout(this); hLayout = new QHBoxLayout; |