From 5140f42cb1d97b2366e953fcef4acfffa0719412 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Mon, 19 Mar 2007 14:45:17 +0000 Subject: [PATCH] Update application style according to the system (WindowsXP, MacOS, X11) --- Changelog | 1 + src/main.cpp | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/Changelog b/Changelog index 688f95680..c33951dcf 100644 --- a/Changelog +++ b/Changelog @@ -12,6 +12,7 @@ - FEATURE: Added Autocompletion to search engine - FEATURE: Splitted BT & GUI parts (huge code rewriting & optimization) - FEATURE: New parameters for configure file to point to custom locations for libtorrent/libcurl + - FEATURE: Update application style according to the system (WindowsXP, MacOS, X11) - BUGFIX: Two torrents can now have the same name although they are different (use their hash) - BUGFIX: Fixed download from url that would fail sometimes - BUGFIX: Save directory was reset to default when filtering files in torrent diff --git a/src/main.cpp b/src/main.cpp index 94c95bb34..c049ee300 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -27,6 +27,14 @@ #include #include +#ifdef Q_WS_WIN + #include +#endif + +#ifdef Q_WS_MAC + #include +#endif + #include #include "GUI.h" @@ -81,6 +89,12 @@ int main(int argc, char *argv[]){ return 0; } QApplication app(argc, argv); +#ifdef Q_WS_WIN + app.setStyle(new QWindowsXPStyle()); +#endif +#ifdef Q_WS_MAC + app.setStyle(new QMacStyle()); +#endif QSplashScreen *splash = new QSplashScreen(QPixmap(":/Icons/splash.jpg")); splash->show(); // Open options file to read locale