1
0
Fork 0
mirror of synced 2024-06-02 02:34:40 +12:00

Sync Stable

This commit is contained in:
Dummerle 2021-01-17 15:59:46 +01:00
parent 29c75f0db2
commit 7f0518eab1
6 changed files with 12 additions and 11 deletions

View file

@ -10,7 +10,6 @@ from Rare import style_path, lang_path
from Rare.MainWindow import MainWindow
from Rare.Start.Launch import LaunchDialog
from Rare.Start.Login import LoginWindow
from Rare.utils import RareConfig
from Rare.utils.RareUtils import get_lang
logging.basicConfig(
@ -31,8 +30,7 @@ def main():
logger.info("Your language is not supported")
app.installTranslator(translator)
if RareConfig.THEME == "default" and os.path.exists(style_path):
app.setStyleSheet(open(style_path).read())
app.setStyleSheet(open(style_path + "dark.qss").read())
logger.info("Try if you are logged in")
try:
@ -51,9 +49,12 @@ def main():
QMessageBox.warning(app, "No Internet", "Connection Error, Failed to login. The offine mode is not implemented")
# Start Offline mode
launch_dialog = LaunchDialog(core)
if RareConfig.THEME == "default":
launch_dialog.setStyleSheet(open(style_path).read())
launch_dialog.exec_()
#if RareConfig.THEME == "default":
# launch_dialog.setStyleSheet(open(style_path).read())
app.exec_()
mainwindow = MainWindow(core)
app.exec_()

View file

@ -57,7 +57,7 @@ class ImportWidget(QWidget):
# for i in appdata_paths:
self.appdata_path_text = QLabel(self.tr("Appdata path: ") + {self.core.egl.appdata_path})
self.appdata_path_text = QLabel(self.tr("Appdata path: ") + str(self.core.egl.appdata_path))
self.login_text = QLabel("")
# self.layout.addWidget(self.btn_group)

View file

@ -1,5 +1,5 @@
QWidget {
background-color: #333;
background-color: #202225;
color: white;
}

View file

@ -37,7 +37,7 @@ class RareSettingsForm(QGroupBox):
logger.info("Update Rare settings")
config = {"Rare": {}}
if self.style_combo_box.currentIndex() == 1:
self.parent().parent().parent().parent().parent().setStyleSheet(open(style_path).read())
self.parent().parent().parent().parent().parent().setStyleSheet(open(style_path+"dark.qss").read())
config["Rare"]["theme"] = "default"
else:
self.parent().parent().parent().setStyleSheet("")

View file

@ -31,7 +31,7 @@ class SettingsTab(QScrollArea):
self.rare_form = RareSettingsForm()
self.logout_button = QPushButton(self.tr("Logout"))
self.logout_button.clicked.connect(self.update_list)
self.logout_button.clicked.connect(self.logout)
self.layout.addWidget(self.logged_in_as)
self.layout.addWidget(self.rare_form)

View file

@ -1,4 +1,4 @@
import os
__version__ = "0.1.5"
style_path = os.path.join(os.path.dirname(__file__), "Styles/dark.qss")
style_path = os.path.join(os.path.dirname(__file__), "Styles/")
lang_path = os.path.join(os.path.dirname(__file__), "languages/")