1
0
Fork 0
mirror of synced 2024-05-15 10:02:57 +12:00

Fixed Login bug, modify CONTRIBUTING.md

This commit is contained in:
Dummerle 2021-02-18 09:46:30 +01:00
parent 0500137999
commit 5bda59e8c5
2 changed files with 9 additions and 4 deletions

View file

@ -11,7 +11,7 @@
### Add Stylesheets
For this you can create a .qss file in Rare/Styles/ directory. Here are some exmples:
For this you can create a .qss file in Rare/Styles/ directory or modify the existing RareStyle.qss file. Here are some exmples:
[Qt Docs](https://doc.qt.io/qt-5/stylesheet-examples.html)
### Add features

View file

@ -23,6 +23,7 @@ class LaunchThread(QThread):
self.action.emit("finish")
class LoginThread(QThread):
login = pyqtSignal()
def __init__(self, core: LegendaryCore):
super(LoginThread, self).__init__()
self.core = core
@ -36,9 +37,7 @@ class LoginThread(QThread):
self.run()
except ValueError:
logger.info("You are not logged in. Open Login Window")
login_window = LoginDialog(self.core)
if not login_window.login():
return
self.login.emit()
class LaunchDialog(QDialog):
@ -46,6 +45,7 @@ class LaunchDialog(QDialog):
super(LaunchDialog, self).__init__()
self.core = core
self.login_thread = LoginThread(core)
self.login_thread.login.connect(self.login)
self.login_thread.finished.connect(self.launch)
self.login_thread.start()
@ -60,6 +60,11 @@ class LaunchDialog(QDialog):
self.setLayout(self.layout)
def login(self):
if not LoginDialog(core=self.core).login():
self.close()
def launch(self):
self.info_pb.setMaximum(len(self.core.get_game_list()))