-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
35 lines (29 loc) · 1.11 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include "window.h"
#include <QApplication>
#include <QSurfaceFormat>
#include <QDebug>
int main(int argc, char *argv[])
{
QApplication application(argc, argv);
application.setApplicationName("repliqode");
application.setOrganizationDomain("nous.ai");
// Invert the palette, for reasons
QPalette palette = QApplication::palette();
for (int group = 0; group < QPalette::NColorGroups; group++) {
QPalette::ColorGroup colorGroup = QPalette::ColorGroup(group);
for (int role = 0; role < QPalette::NColorRoles; role++) {
QPalette::ColorRole colorRole = QPalette::ColorRole(role);
QColor color = palette.color(colorGroup, colorRole);
QColor inverted(255 - color.red(), 255 - color.green(), 255 - color.blue(), color.alpha());
palette.setColor(colorGroup, colorRole, inverted);
}
}
QApplication::setPalette(palette);
// Fix antialiasing quality of hive plot
QSurfaceFormat fmt;
fmt.setSamples(32);
QSurfaceFormat::setDefaultFormat(fmt);
Window window;
window.showFullScreen();
return application.exec();
}