annotate src/main.cc @ 229:adc20fa321c1

theme: force Fusion style on platforms other than Win32 or OS X I was reluctant to do this, but most of the other styles just look like pure shite regardless of whether I force a stylesheet on them or not. KDE's style is actually hilariously bad paired with my stylesheet, so I've decided to also make the stylesheet Windows-specific as well, because that's really the only platform where it makes sense in the first place.
author Paper <paper@paper.us.eu.org>
date Wed, 10 Jan 2024 21:23:57 -0500
parents 975a3f0965e2
children 4d461ef7d424
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
1 #include "core/session.h"
175
9b10175be389 dep/json: update to v3.11.3
Paper <mrpapersonic@gmail.com>
parents: 147
diff changeset
2 #include "core/anime_db.h"
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
3 #include "gui/window.h"
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
4 #include <QApplication>
46
d0adc4aedfc8 *: update...
Paper <mrpapersonic@gmail.com>
parents: 11
diff changeset
5 #include <QStyleFactory>
108
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 98
diff changeset
6 #include <QTranslator>
98
582b2fca1561 strings: parse HTML entities when reading synopsis, make the
Paper <mrpapersonic@gmail.com>
parents: 81
diff changeset
7 #include <QLocale>
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
8
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
9 Session session;
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
11 int main(int argc, char** argv) {
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
12 QApplication app(argc, argv);
229
adc20fa321c1 theme: force Fusion style on platforms other than Win32 or OS X
Paper <paper@paper.us.eu.org>
parents: 195
diff changeset
13 #if !(defined(WIN32) || defined(MACOSX))
adc20fa321c1 theme: force Fusion style on platforms other than Win32 or OS X
Paper <paper@paper.us.eu.org>
parents: 195
diff changeset
14 /* force Fusion */
adc20fa321c1 theme: force Fusion style on platforms other than Win32 or OS X
Paper <paper@paper.us.eu.org>
parents: 195
diff changeset
15 app.setStyle("Fusion");
adc20fa321c1 theme: force Fusion style on platforms other than Win32 or OS X
Paper <paper@paper.us.eu.org>
parents: 195
diff changeset
16 #endif
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
17
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
18 session.config.Load();
195
975a3f0965e2 locale: only attempt loading locales after QApplication is init'd
Paper <mrpapersonic@gmail.com>
parents: 177
diff changeset
19 session.config.locale.RefreshAvailableLocales();
177
122fad646f81 anime/db: upgrade to c++17 style, make things easier to read
Paper <mrpapersonic@gmail.com>
parents: 175
diff changeset
20 Anime::db.LoadDatabaseFromDisk();
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
21
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
22 MainWindow window;
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
23
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
24 window.resize(941, 750);
11
fc1bf97c528b *: use C++11 standard
Paper <mrpapersonic@gmail.com>
parents: 10
diff changeset
25 window.setWindowTitle("Minori");
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
26 window.show();
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
27
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
28 return app.exec();
46
d0adc4aedfc8 *: update...
Paper <mrpapersonic@gmail.com>
parents: 11
diff changeset
29 }