Skip to content

Commit

Permalink
修复了无法更换背景图的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
GengGode committed Sep 20, 2021
1 parent 1ce4be2 commit 29de78d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
14 changes: 13 additions & 1 deletion GenshinImpactNaturalLaw/GenshinImpactNaturalLaw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ GenshinImpactNaturalLaw::GenshinImpactNaturalLaw(QWidget *parent)
connect(Tray, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(TrayMenuClickEvent(QSystemTrayIcon::ActivationReason)));

ShowMainAction = new QAction(tr("Str_ShowMainWidget"), this);//显示主界面
connect(ShowMainAction, SIGNAL(triggered()), this, SLOT(show()));
connect(ShowMainAction, SIGNAL(triggered()), this, SLOT(ShowEvent()));
ExitAction = new QAction(tr("Str_Exit"), this);//退出
connect(ExitAction, SIGNAL(triggered()), this, SLOT(close()));

Expand Down Expand Up @@ -210,6 +210,18 @@ void GenshinImpactNaturalLaw::uiShowImage()
}
}

void GenshinImpactNaturalLaw::ShowEvent()
{
this->show();

//this->activateWindow();
//this->raise();
//WidgetsSetting->hide();

setting.sync();
uiShowImage();
}

void GenshinImpactNaturalLaw::CloseEvent()
{
if (setting.is_exit_ismini)
Expand Down
1 change: 1 addition & 0 deletions GenshinImpactNaturalLaw/GenshinImpactNaturalLaw.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class GenshinImpactNaturalLaw : public QMainWindow

private slots:
void NewWidgetsSetting();
void ShowEvent();
void CloseEvent();
void StartGame();
void OpenLinkeUrl();
Expand Down
2 changes: 1 addition & 1 deletion GenshinImpactNaturalLaw/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ game_start_name=YuanShen.exe

[Module]
is_first_exit=false
mods_number=5
mods_number=2
mods_0=false
mods_1=true
mods_2=false
Expand Down

0 comments on commit 29de78d

Please sign in to comment.