Skip to content

Commit

Permalink
Sync Stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Dummerle committed Jan 17, 2021
1 parent 29c75f0 commit 7f0518e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
13 changes: 7 additions & 6 deletions Rare/Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
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(
Expand All @@ -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:
Expand All @@ -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_()

Expand Down
2 changes: 1 addition & 1 deletion Rare/Start/Login.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __init__(self, core: LegendaryCore):

# 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)
Expand Down
2 changes: 1 addition & 1 deletion Rare/Styles/RareStyle.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
QWidget {
background-color: #333;
background-color: #202225;
color: white;
}

Expand Down
2 changes: 1 addition & 1 deletion Rare/Tabs/Settings/RareSettingsForm.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def update_rare_settings(self):
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("")
Expand Down
2 changes: 1 addition & 1 deletion Rare/Tabs/Settings/SettingsTab.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(self, core: LegendaryCore):
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)
Expand Down
2 changes: 1 addition & 1 deletion Rare/__init__.py
Original file line number Diff line number Diff line change
@@ -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/")

0 comments on commit 7f0518e

Please sign in to comment.