This commit is contained in:
seuyh
2024-02-27 19:30:30 +07:00
parent cd804edf80
commit b5aef768b0
3 changed files with 44 additions and 1 deletions
+29
View File
@@ -1476,6 +1476,35 @@ QPushButton:hover {
<enum>Qt::Horizontal</enum>
</property>
</widget>
<widget class="QTextBrowser" name="textBrowser_15">
<property name="geometry">
<rect>
<x>100</x>
<y>300</y>
<width>100</width>
<height>20</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(240, 240, 240);</string>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;img src=&quot;:/images/GitHub-Logo.wine (1).png&quot; /&gt;&lt;span style=&quot; font-size:10pt; color:#000000;&quot;&gt; &lt;/span&gt;&lt;a href=&quot;https://github.com/seuyh/stellaris-dlc-unlocker&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#000000;&quot;&gt;GitHub&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</widget>
</widget>
<resources>
+12
View File
@@ -486,6 +486,13 @@ class Ui_MainWindow(object):
self.line_10.setFrameShape(QtWidgets.QFrame.HLine)
self.line_10.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_10.setObjectName("line_10")
self.textBrowser_15 = QtWidgets.QTextBrowser(self.centralwidget)
self.textBrowser_15.setGeometry(QtCore.QRect(100, 300, 100, 20))
self.textBrowser_15.setStyleSheet("background-color: rgb(240, 240, 240);")
self.textBrowser_15.setFrameShape(QtWidgets.QFrame.NoFrame)
self.textBrowser_15.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.textBrowser_15.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.textBrowser_15.setObjectName("textBrowser_15")
MainWindow.setCentralWidget(self.centralwidget)
self.retranslateUi(MainWindow)
@@ -642,3 +649,8 @@ class Ui_MainWindow(object):
self.launch_game.setText(_translate("MainWindow", "Запустить игру"))
self.checkBox.setText(_translate("MainWindow", "Автор крутой"))
self.version.setText(_translate("MainWindow", "version %nan%"))
self.textBrowser_15.setHtml(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:8.25pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><img src=\":/images/GitHub-Logo.wine (1).png\" /><span style=\" font-size:10pt; color:#000000;\"> </span><a href=\"https://github.com/seuyh/stellaris-dlc-unlocker\"><span style=\" font-size:10pt; text-decoration: underline; color:#000000;\">GitHub</span></a></p></body></html>"))
+3 -1
View File
@@ -48,6 +48,7 @@ class MainWindow(QMainWindow, main_design.Ui_MainWindow):
self.eula_true1.toggled.connect(self.on_radio_button_toggled)
self.eula_false.toggled.connect(self.on_radio_button_toggled)
self.textBrowser_5.anchorClicked.connect(self.open_link_in_browser)
self.textBrowser_15.anchorClicked.connect(self.open_link_in_browser)
self.download_thread = None
self.is_downloading = False
@@ -166,8 +167,9 @@ class MainWindow(QMainWindow, main_design.Ui_MainWindow):
self.next_button_3.setCursor(Qt.ForbiddenCursor)
def open_link_in_browser(self, url):
content = self.sender().toHtml()
QDesktopServices.openUrl(url)
self.text_browser.ignore()
self.sender().setHtml(content)
def path_change(self):
path = stellaris_path()