File indexing completed on 2024-11-24 03:57:49

0001 /**
0002  * SPDX-FileCopyrightText: 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved.
0003  *
0004  * This file is part of the KGantt library.
0005  *
0006  * SPDX-License-Identifier: GPL-2.0-or-later
0007  */
0008 
0009 #include <QApplication>
0010 
0011 #include "mainwindow.h"
0012 
0013 int main( int argc, char** argv ) {
0014     QApplication app( argc, argv );
0015 
0016     // Set a dark palette that does not print well on white paper
0017     #define VeryLightGray   "#939393"
0018     #define LightLightGray  "#707070"
0019     #define DarkGray        "#505050"
0020     #define DarkDarkGray    "#333333"
0021     #define VeryDarkGray    "#131313"
0022     QPalette palette;
0023     palette.setColor(QPalette::Window, Qt::black);
0024     palette.setColor(QPalette::WindowText, Qt::white);
0025     palette.setColor(QPalette::Base, Qt::black);
0026     palette.setColor(QPalette::AlternateBase, VeryDarkGray);
0027     palette.setColor(QPalette::ToolTipBase, Qt::black);
0028     palette.setColor(QPalette::ToolTipText, Qt::white);
0029     palette.setColor(QPalette::Text, Qt::white);
0030     palette.setColor(QPalette::Button, QColor(DarkGray));
0031     palette.setColor(QPalette::ButtonText, Qt::white);
0032     palette.setColor(QPalette::BrightText, Qt::white);
0033     palette.setColor(QPalette::Link, Qt::cyan);
0034     palette.setColor(QPalette::Highlight, Qt::blue);
0035     palette.setColor(QPalette::HighlightedText, Qt::white);
0036     palette.setColor(QPalette::Light, QColor(VeryLightGray));
0037     palette.setColor(QPalette::Midlight, QColor(LightLightGray));
0038     palette.setColor(QPalette::Dark, QColor(DarkDarkGray));
0039     palette.setColor(QPalette::Mid, QColor(VeryDarkGray));
0040     palette.setColor(QPalette::Shadow, Qt::black);
0041     app.setPalette(palette);
0042 
0043     MainWindow mw;
0044     mw.resize( 800, 600 );
0045     mw.show();
0046 
0047     return app.exec();
0048 }