forked from suyu/suyu
Testing modifications on the main window as an evaluation of the possibility of rebuilding the new UI.
This commit is contained in:
parent
48e86d6e84
commit
6e405e0871
1 changed files with 14 additions and 2 deletions
|
@ -77,6 +77,7 @@
|
|||
#include <QSysInfo>
|
||||
#include <QUrl>
|
||||
#include <QtConcurrent/QtConcurrent>
|
||||
#include <QDesktopWidget>
|
||||
|
||||
#ifdef HAVE_SDL2
|
||||
#include <SDL.h> // For SDL ScreenSaver functions
|
||||
|
@ -5115,8 +5116,19 @@ int main(int argc, char* argv[]) {
|
|||
setlocale(LC_ALL, "C");
|
||||
|
||||
GMainWindow main_window{std::move(config), has_broken_vulkan};
|
||||
// After settings have been loaded by GMainWindow, apply the filter
|
||||
main_window.show();
|
||||
|
||||
main_window.setWindowFlags(Qt::FramelessWindowHint);
|
||||
main_window.show(); // After settings have been loaded by GMainWindow, apply the filter
|
||||
main_window.resize(800, 600);
|
||||
|
||||
QRect screenGeometry = QApplication::desktop()->availableGeometry();
|
||||
|
||||
main_window.setGeometry(QStyle::alignedRect(Qt::LeftToRight, Qt::AlignCenter, main_window.size(), screenGeometry));
|
||||
main_window.setStyleSheet(QStringLiteral("background-image: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(255, 255, 255, 255), stop:1 rgba(0, 0, 0, 255));"));
|
||||
|
||||
// Temporary: Hide the console to avoid interference.
|
||||
ShowWindow(GetConsoleWindow(), SW_HIDE);
|
||||
|
||||
|
||||
QObject::connect(&app, &QGuiApplication::applicationStateChanged, &main_window,
|
||||
&GMainWindow::OnAppFocusStateChanged);
|
||||
|
|
Loading…
Reference in a new issue