Skip to content

Commit

Permalink
修复部分问题
Browse files Browse the repository at this point in the history
  • Loading branch information
GengGode committed Jul 20, 2021
1 parent b6d4b72 commit b1db640
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions GenshinImpactNaturalLaw/GenshinImpactNaturalLaw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ GenshinImpactNaturalLaw::GenshinImpactNaturalLaw(QWidget *parent)
shadow->setBlurRadius(15);
ui.MainBackgroundImageRect->setGraphicsEffect(shadow);




connect(ui.pushButton_TitleSet, SIGNAL(clicked()), this, SLOT(NewWidgetsSetting()));
connect(ui.pushButton_TitleExit, SIGNAL(clicked()), this, SLOT(CloseEvent()));
connect(ui.pushButton_StartGame, SIGNAL(clicked()), this, SLOT(StartGame()));
Expand Down Expand Up @@ -174,7 +171,7 @@ void GenshinImpactNaturalLaw::uiShowImage()
return;
}
BackgroundImage.load(ImagePath);
BackgroundImage=BackgroundImage.scaled(ui.MainBackgroundImageRect->width(), ui.MainBackgroundImageRect->height());
BackgroundImage= BackgroundImage.scaled(ui.MainBackgroundImageRect->width(), ui.MainBackgroundImageRect->height());
ui.MainBackgroundImageRect->setPixmap(BackgroundImage);
}

Expand Down Expand Up @@ -307,19 +304,19 @@ void GenshinImpactNaturalLaw::ReceiveUniqueKeyMsg()
this->activateWindow();
this->raise();

if (MainMaskLabel->isVisible())
if (MainMaskLabel && MainMaskLabel->isVisible())
{
WidgetsSetting->show();

winStatus = Qt::WindowNoState;
if (WidgetsSetting->windowState() & Qt::WindowMaximized) {
winStatus = Qt::WindowMaximized;
}
WidgetsSetting->setWindowState(Qt::WindowMinimized);
WidgetsSetting->setWindowState(Qt::WindowActive | winStatus);
WidgetsSetting->setGeometry(WidgetsSetting->geometry());
WidgetsSetting->activateWindow();
WidgetsSetting->raise();
//winStatus = Qt::WindowNoState;
//if (WidgetsSetting->windowState() & Qt::WindowMaximized) {
// winStatus = Qt::WindowMaximized;
//}
//WidgetsSetting->setWindowState(Qt::WindowMinimized);
//WidgetsSetting->setWindowState(Qt::WindowActive | winStatus);
//WidgetsSetting->setGeometry(WidgetsSetting->geometry());
//WidgetsSetting->activateWindow();
//WidgetsSetting->raise();
}

}

0 comments on commit b1db640

Please sign in to comment.