Skip to content

Commit

Permalink
修复字体错误,标题添加版本号
Browse files Browse the repository at this point in the history
  • Loading branch information
GengGode committed Jul 27, 2021
1 parent bb6b581 commit 6fcfa6a
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 33 deletions.
18 changes: 16 additions & 2 deletions GenshinImpactNaturalLaw/GenshinImpactNaturalLaw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ void GenshinImpactNaturalLaw::uiConnectButton()
LinkeButtonUrlList.push_back(QUrl(QLatin1String("https://space.bilibili.com/135774602")));
LinkeButtonUrlList.push_back(QUrl(QLatin1String("https://qm.qq.com/cgi-bin/qm/qr?k=3bd3tolWoA9vX-AdYzo-ynX_zUUB18oX&jump_from=webapi")));
LinkeButtonUrlList.push_back(QUrl(QLatin1String("https://github.com/GengGode/GenshinImpact_AutoMap")));
LinkeButtonUrlList.push_back(QUrl(QLatin1String("")));
LinkeButtonUrlList.push_back(QUrl(QLatin1String("https://afdian.net/album/e1386f12ecb711eb8d6c52540025c377")));
LinkeButtonUrlList.push_back(QUrl(QLatin1String("https://yuanshen.site/")));
LinkeButtonUrlList.push_back(QUrl(QLatin1String("https://mitay.net/cdkey/")));

Expand All @@ -153,7 +153,7 @@ void GenshinImpactNaturalLaw::uiConnectButtonLabel()
LinkeButtonLabelUrlList.push_back(QUrl(QLatin1String("")));
LinkeButtonLabelUrlList.push_back(QUrl(QLatin1String("")));
LinkeButtonLabelUrlList.push_back(QUrl(QLatin1String("")));
LinkeButtonLabelUrlList.push_back(QUrl(QLatin1String("")));
LinkeButtonLabelUrlList.push_back(QUrl(QLatin1String("https://yuanshen.weixitianlizhi.ren/")));

for (int i = 0; i < LinkeButtonLabelList.size(); i++)
{
Expand Down Expand Up @@ -287,6 +287,20 @@ void GenshinImpactNaturalLaw::ReceiveCloseSelfSignalFromWidgetsSetting()
{
MainMaskLabel->hide();
}
void GenshinImpactNaturalLaw::ShowTopMainWidget()
{
this->show();

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

void GenshinImpactNaturalLaw::ReceiveUniqueKeyMsg()
{
Expand Down
2 changes: 2 additions & 0 deletions GenshinImpactNaturalLaw/GenshinImpactNaturalLaw.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ private slots:
// Receive Setting From WidgetsSetting
void ReceiveSettingFromWidgetsSetting();
void ReceiveCloseSelfSignalFromWidgetsSetting();

void ShowTopMainWidget();
public slots:
void ReceiveUniqueKeyMsg();
// signals:
Expand Down
55 changes: 28 additions & 27 deletions GenshinImpactNaturalLaw/GenshinImpactNaturalLaw.qrc
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
<RCC>
<qresource prefix="/GenshinImpactNaturalLaw"/>
<qresource prefix="/page">
<file>resource/page/page1.png</file>
</qresource>
<qresource prefix="/LinkeIcon">
<file>resource/LinkeIcon/Bilibili_icon.png</file>
<file>resource/LinkeIcon/GitHub_icon.png</file>
<file>resource/LinkeIcon/QQ_icon.png</file>
<file>resource/LinkeIcon/KYJG_yuanshen.png</file>
</qresource>
<qresource prefix="/icon">
<file>resource/icon/TrayIcon.ico</file>
<file>resource/icon/MainIcon.ico</file>
<file>resource/icon/TrayIcon.png</file>
<file>resource/icon/ICON.png</file>
</qresource>
<qresource prefix="/BackgroundImage">
<file>resource/bg.png</file>
</qresource>
<qresource prefix="/TitleButtonImage">
<file>resource/titlebutton/bexit0.png</file>
<file>resource/titlebutton/bexit1.png</file>
<file>resource/titlebutton/bmin0.png</file>
<file>resource/titlebutton/bmin1.png</file>
<file>resource/titlebutton/bset0.png</file>
<file>resource/titlebutton/bset1.png</file>
</qresource>
<qresource prefix="/GenshinImpactNaturalLaw"/>
<qresource prefix="/page">
<file>resource/page/page1.png</file>
<file>resource/page/page2.png</file>
</qresource>
<qresource prefix="/LinkeIcon">
<file>resource/LinkeIcon/Bilibili_icon.png</file>
<file>resource/LinkeIcon/GitHub_icon.png</file>
<file>resource/LinkeIcon/QQ_icon.png</file>
<file>resource/LinkeIcon/KYJG_yuanshen.png</file>
</qresource>
<qresource prefix="/icon">
<file>resource/icon/TrayIcon.ico</file>
<file>resource/icon/MainIcon.ico</file>
<file>resource/icon/TrayIcon.png</file>
<file>resource/icon/ICON.png</file>
</qresource>
<qresource prefix="/BackgroundImage">
<file>resource/bg.png</file>
</qresource>
<qresource prefix="/TitleButtonImage">
<file>resource/titlebutton/bexit0.png</file>
<file>resource/titlebutton/bexit1.png</file>
<file>resource/titlebutton/bmin0.png</file>
<file>resource/titlebutton/bmin1.png</file>
<file>resource/titlebutton/bset0.png</file>
<file>resource/titlebutton/bset1.png</file>
</qresource>
</RCC>
36 changes: 32 additions & 4 deletions GenshinImpactNaturalLaw/GenshinImpactNaturalLaw.ui
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@
<height>30</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
</font>
</property>
<property name="styleSheet">
<string notr="true">background-color:rgb(20, 20, 20);
color:rgb(255, 255, 255);</string>
Expand Down Expand Up @@ -428,7 +433,7 @@ QTabWidget::tab-bar {
</string>
</property>
<property name="currentIndex">
<number>0</number>
<number>2</number>
</property>
<widget class="QWidget" name="tab">
<property name="styleSheet">
Expand Down Expand Up @@ -550,7 +555,7 @@ color:rgb(255, 210, 132);
}</string>
</property>
<property name="text">
<string>模组功能尚未实现,不必尝试</string>
<string>勾选即可,目前只集成了天理地图,会与游戏一同启动</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -657,7 +662,7 @@ color:rgb(255, 210, 132);
}</string>
</property>
<property name="text">
<string>侵删,emmm,开源代码,大家可以自己编译</string>
<string>主页以及一些说明,可能会在这里放文档</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -700,7 +705,7 @@ color:rgb(255, 210, 132);
<string notr="true">
border:0px solid rgb(248, 250, 251);
border-radius:0px;
background-image:url(:/page/resource/page/page1.png);</string>
background-image:url(:/page/resource/page/page2.png);</string>
</property>
<property name="text">
<string/>
Expand Down Expand Up @@ -737,6 +742,28 @@ border:2px solid rgb(255, 210, 132);
<string/>
</property>
</widget>
<widget class="QLabel" name="TitleLabelVersion">
<property name="geometry">
<rect>
<x>50</x>
<y>10</y>
<width>50</width>
<height>30</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
</font>
</property>
<property name="styleSheet">
<string notr="true">color:rgb(67, 67, 67);
font-size:12;</string>
</property>
<property name="text">
<string>2.0.0</string>
</property>
</widget>
<zorder>MainBackgroundImageRect</zorder>
<zorder>TitleLabelRect</zorder>
<zorder>pushButton_StartGame</zorder>
Expand All @@ -754,6 +781,7 @@ border:2px solid rgb(255, 210, 132);
<zorder>tabWidget</zorder>
<zorder>pushButton</zorder>
<zorder>pushButton_Linke_6</zorder>
<zorder>TitleLabelVersion</zorder>
</widget>
</widget>
<layoutdefault spacing="6" margin="11"/>
Expand Down
Binary file not shown.

0 comments on commit 6fcfa6a

Please sign in to comment.