mirror of https://git.suyu.dev/suyu/suyu.git
Fork commit
This commit is contained in:
parent
6e405e0871
commit
74a299cf71
|
|
@ -5119,19 +5119,20 @@ int main(int argc, char* argv[]) {
|
|||
|
||||
main_window.setWindowFlags(Qt::FramelessWindowHint);
|
||||
main_window.show(); // After settings have been loaded by GMainWindow, apply the filter
|
||||
main_window.resize(800, 600);
|
||||
main_window.resize(1200, 800); // Test size
|
||||
main_window.setStyleSheet(QStringLiteral("background-color: cyan;"
|
||||
"border-radius: 10px;"));
|
||||
|
||||
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));"));
|
||||
main_window.setGeometry(QStyle::alignedRect(
|
||||
Qt::LeftToRight, Qt::AlignCenter, main_window.size(), screenGeometry));
|
||||
|
||||
// Temporary: Hide the console to avoid interference.
|
||||
ShowWindow(GetConsoleWindow(), SW_HIDE);
|
||||
|
||||
|
||||
QObject::connect(&app, &QGuiApplication::applicationStateChanged, &main_window,
|
||||
&GMainWindow::OnAppFocusStateChanged);
|
||||
QObject::connect(&app, &QGuiApplication::applicationStateChanged,
|
||||
&main_window, &GMainWindow::OnAppFocusStateChanged);
|
||||
|
||||
int result = app.exec();
|
||||
detached_tasks.WaitForAllTasks();
|
||||
|
|
|
|||
Loading…
Reference in New Issue