Fix set locale to legendary locale + reformatting
This commit is contained in:
parent
c1338b7526
commit
bb4f08691a
|
@ -27,4 +27,3 @@ if not os.path.exists(data_dir):
|
||||||
os.makedirs(data_dir)
|
os.makedirs(data_dir)
|
||||||
|
|
||||||
image_dir = os.path.join(data_dir, "images")
|
image_dir = os.path.join(data_dir, "images")
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,7 @@ def main():
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# fix error in cx_freeze
|
# fix error in cx_freeze
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
|
|
||||||
multiprocessing.freeze_support()
|
multiprocessing.freeze_support()
|
||||||
sys.path.insert(0, os.path.join(pathlib.Path(__file__).parent.parent.absolute(), "legendary"))
|
sys.path.insert(0, os.path.join(pathlib.Path(__file__).parent.parent.absolute(), "legendary"))
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -15,7 +15,7 @@ from rare import languages_path, resources_path, cache_dir
|
||||||
from rare.components.dialogs.launch_dialog import LaunchDialog
|
from rare.components.dialogs.launch_dialog import LaunchDialog
|
||||||
from rare.components.main_window import MainWindow
|
from rare.components.main_window import MainWindow
|
||||||
from rare.components.tray_icon import TrayIcon
|
from rare.components.tray_icon import TrayIcon
|
||||||
from rare.utils.utils import get_lang, load_color_scheme
|
from rare.utils.utils import load_color_scheme
|
||||||
|
|
||||||
start_time = time.strftime('%y-%m-%d--%H-%M') # year-month-day-hour-minute
|
start_time = time.strftime('%y-%m-%d--%H-%M') # year-month-day-hour-minute
|
||||||
file_name = os.path.join(cache_dir, f"logs/Rare_{start_time}.log")
|
file_name = os.path.join(cache_dir, f"logs/Rare_{start_time}.log")
|
||||||
|
@ -74,7 +74,7 @@ class App(QApplication):
|
||||||
|
|
||||||
# Translator
|
# Translator
|
||||||
self.translator = QTranslator()
|
self.translator = QTranslator()
|
||||||
lang = settings.value("language", get_lang(), type=str)
|
lang = settings.value("language", self.core.language_code, type=str)
|
||||||
if os.path.exists(p := os.path.join(languages_path, lang + ".qm")):
|
if os.path.exists(p := os.path.join(languages_path, lang + ".qm")):
|
||||||
self.translator.load(p)
|
self.translator.load(p)
|
||||||
logger.info("Your language is supported: " + lang)
|
logger.info("Your language is supported: " + lang)
|
||||||
|
|
|
@ -7,7 +7,6 @@ from requests.exceptions import ConnectionError
|
||||||
|
|
||||||
from legendary.core import LegendaryCore
|
from legendary.core import LegendaryCore
|
||||||
from rare import image_dir
|
from rare import image_dir
|
||||||
|
|
||||||
from rare.components.dialogs.login import LoginDialog
|
from rare.components.dialogs.login import LoginDialog
|
||||||
from rare.ui.components.dialogs.launch_dialog import Ui_LaunchDialog
|
from rare.ui.components.dialogs.launch_dialog import Ui_LaunchDialog
|
||||||
from rare.utils.utils import download_images
|
from rare.utils.utils import download_images
|
||||||
|
@ -27,7 +26,6 @@ class ImageThread(QThread):
|
||||||
self.download_progess.emit(100)
|
self.download_progess.emit(100)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class LaunchDialog(QDialog, Ui_LaunchDialog):
|
class LaunchDialog(QDialog, Ui_LaunchDialog):
|
||||||
quit_app = pyqtSignal(int)
|
quit_app = pyqtSignal(int)
|
||||||
start_app = pyqtSignal(bool)
|
start_app = pyqtSignal(bool)
|
||||||
|
@ -68,7 +66,6 @@ class LaunchDialog(QDialog, Ui_LaunchDialog):
|
||||||
if not os.path.exists(image_dir):
|
if not os.path.exists(image_dir):
|
||||||
os.makedirs(image_dir)
|
os.makedirs(image_dir)
|
||||||
|
|
||||||
|
|
||||||
if not self.offline:
|
if not self.offline:
|
||||||
self.image_info.setText(self.tr("Downloading Images"))
|
self.image_info.setText(self.tr("Downloading Images"))
|
||||||
self.image_thread = ImageThread(self.core, self)
|
self.image_thread = ImageThread(self.core, self)
|
||||||
|
|
|
@ -121,7 +121,8 @@ class TabWidget(QTabWidget):
|
||||||
if tab_num == 3:
|
if tab_num == 3:
|
||||||
self.store.load()
|
self.store.load()
|
||||||
|
|
||||||
# TODO; maybe pass InstallOptionsModel only, not split arguments
|
# TODO; maybe pass InstallOptionsModel only, not split arguments
|
||||||
|
|
||||||
def install_game(self, options: InstallOptionsModel, update=False, silent=False):
|
def install_game(self, options: InstallOptionsModel, update=False, silent=False):
|
||||||
|
|
||||||
install_dialog = InstallDialog(self.core,
|
install_dialog = InstallDialog(self.core,
|
||||||
|
|
|
@ -7,8 +7,8 @@ from PyQt5.QtWidgets import QWidget, QMessageBox
|
||||||
|
|
||||||
from legendary.core import LegendaryCore
|
from legendary.core import LegendaryCore
|
||||||
from legendary.models.game import Game, InstalledGame
|
from legendary.models.game import Game, InstalledGame
|
||||||
from rare.ui.components.tabs.games.game_info.game_info import Ui_GameInfo
|
|
||||||
from rare import data_dir
|
from rare import data_dir
|
||||||
|
from rare.ui.components.tabs.games.game_info.game_info import Ui_GameInfo
|
||||||
from rare.utils.legendary_utils import VerifyThread
|
from rare.utils.legendary_utils import VerifyThread
|
||||||
from rare.utils.steam_grades import SteamWorker
|
from rare.utils.steam_grades import SteamWorker
|
||||||
from rare.utils.utils import get_size, get_pixmap
|
from rare.utils.utils import get_size, get_pixmap
|
||||||
|
|
|
@ -9,7 +9,6 @@ from qtawesome import icon
|
||||||
|
|
||||||
from legendary.core import LegendaryCore
|
from legendary.core import LegendaryCore
|
||||||
from legendary.models.game import Game
|
from legendary.models.game import Game
|
||||||
from rare import data_dir
|
|
||||||
from rare.ui.components.tabs.games.game_info.game_info import Ui_GameInfo
|
from rare.ui.components.tabs.games.game_info.game_info import Ui_GameInfo
|
||||||
from rare.utils.extra_widgets import SideTabBar
|
from rare.utils.extra_widgets import SideTabBar
|
||||||
from rare.utils.json_formatter import QJsonModel
|
from rare.utils.json_formatter import QJsonModel
|
||||||
|
@ -72,7 +71,6 @@ class UninstalledInfo(QWidget, Ui_GameInfo):
|
||||||
self.steam_worker.rating_signal.connect(self.grade.setText)
|
self.steam_worker.rating_signal.connect(self.grade.setText)
|
||||||
|
|
||||||
if platform.system() == "Windows":
|
if platform.system() == "Windows":
|
||||||
|
|
||||||
self.lbl_grade.setVisible(False)
|
self.lbl_grade.setVisible(False)
|
||||||
self.grade.setVisible(False)
|
self.grade.setVisible(False)
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ from PyQt5.QtCore import Qt, pyqtSignal, QSettings, QTimer
|
||||||
from PyQt5.QtWidgets import QScrollArea, QWidget, QLabel, QVBoxLayout, QStackedWidget
|
from PyQt5.QtWidgets import QScrollArea, QWidget, QLabel, QVBoxLayout, QStackedWidget
|
||||||
|
|
||||||
from legendary.core import LegendaryCore
|
from legendary.core import LegendaryCore
|
||||||
from rare import data_dir
|
|
||||||
from rare.components.tabs.games.game_widgets.base_installed_widget import BaseInstalledWidget
|
from rare.components.tabs.games.game_widgets.base_installed_widget import BaseInstalledWidget
|
||||||
from rare.components.tabs.games.game_widgets.installed_icon_widget import GameWidgetInstalled
|
from rare.components.tabs.games.game_widgets.installed_icon_widget import GameWidgetInstalled
|
||||||
from rare.components.tabs.games.game_widgets.installed_list_widget import InstalledListWidget
|
from rare.components.tabs.games.game_widgets.installed_list_widget import InstalledListWidget
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from logging import getLogger
|
from logging import getLogger
|
||||||
|
|
||||||
from PyQt5.QtCore import QProcess, pyqtSignal, Qt
|
from PyQt5.QtCore import QProcess, pyqtSignal
|
||||||
from PyQt5.QtWidgets import QHBoxLayout, QLabel, QPushButton, QVBoxLayout
|
from PyQt5.QtWidgets import QHBoxLayout, QLabel, QPushButton, QVBoxLayout
|
||||||
from qtawesome import icon
|
from qtawesome import icon
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ class SettingsTab(QTabWidget):
|
||||||
self.core = core
|
self.core = core
|
||||||
self.setTabBar(SideTabBar())
|
self.setTabBar(SideTabBar())
|
||||||
self.setTabPosition(QTabWidget.West)
|
self.setTabPosition(QTabWidget.West)
|
||||||
self.rare_settings = RareSettings()
|
self.rare_settings = RareSettings(self.core)
|
||||||
self.addTab(self.rare_settings, "Rare")
|
self.addTab(self.rare_settings, "Rare")
|
||||||
self.addTab(LegendarySettings(core), "Legendary")
|
self.addTab(LegendarySettings(core), "Legendary")
|
||||||
if platform.system() != "Windows":
|
if platform.system() != "Windows":
|
||||||
|
|
|
@ -3,7 +3,6 @@ import platform
|
||||||
import re
|
import re
|
||||||
from logging import getLogger
|
from logging import getLogger
|
||||||
|
|
||||||
from PyQt5.QtCore import QSize
|
|
||||||
from PyQt5.QtWidgets import QFileDialog, QMessageBox, QVBoxLayout, QDialog, QCheckBox, QLabel, \
|
from PyQt5.QtWidgets import QFileDialog, QMessageBox, QVBoxLayout, QDialog, QCheckBox, QLabel, \
|
||||||
QHBoxLayout, QPushButton, QGroupBox, QWidget
|
QHBoxLayout, QPushButton, QGroupBox, QWidget
|
||||||
from qtawesome import icon
|
from qtawesome import icon
|
||||||
|
@ -54,7 +53,8 @@ class LegendarySettings(QWidget, Ui_LegendarySettings):
|
||||||
lambda: self.cleanup(True)
|
lambda: self.cleanup(True)
|
||||||
)
|
)
|
||||||
|
|
||||||
self.manifest_path_info.setText(self.tr("EGL path is at C:\\ProgramData\\Epic\\EpicGamesLauncher\\Data\\Manifests"))
|
self.manifest_path_info.setText(
|
||||||
|
self.tr("EGL path is at C:\\ProgramData\\Epic\\EpicGamesLauncher\\Data\\Manifests"))
|
||||||
path = os.path.expanduser("~/")
|
path = os.path.expanduser("~/")
|
||||||
if self.core.egl.programdata_path:
|
if self.core.egl.programdata_path:
|
||||||
path = self.core.egl.programdata_path
|
path = self.core.egl.programdata_path
|
||||||
|
|
|
@ -7,11 +7,12 @@ from logging import getLogger
|
||||||
from PyQt5.QtCore import QSettings, Qt
|
from PyQt5.QtCore import QSettings, Qt
|
||||||
from PyQt5.QtWidgets import QWidget
|
from PyQt5.QtWidgets import QWidget
|
||||||
|
|
||||||
|
from legendary.core import LegendaryCore
|
||||||
from rare import cache_dir
|
from rare import cache_dir
|
||||||
from rare.components.tabs.settings.rpc_settings import RPCSettings
|
from rare.components.tabs.settings.rpc_settings import RPCSettings
|
||||||
from rare.ui.components.tabs.settings.rare import Ui_RareSettings
|
from rare.ui.components.tabs.settings.rare import Ui_RareSettings
|
||||||
from rare.utils import utils
|
from rare.utils import utils
|
||||||
from rare.utils.utils import get_lang, get_possible_langs, get_color_schemes, get_style_sheets
|
from rare.utils.utils import get_possible_langs, get_color_schemes, get_style_sheets
|
||||||
|
|
||||||
logger = getLogger("RareSettings")
|
logger = getLogger("RareSettings")
|
||||||
|
|
||||||
|
@ -23,10 +24,10 @@ languages = [
|
||||||
|
|
||||||
|
|
||||||
class RareSettings(QWidget, Ui_RareSettings):
|
class RareSettings(QWidget, Ui_RareSettings):
|
||||||
def __init__(self):
|
def __init__(self, core: LegendaryCore):
|
||||||
super(RareSettings, self).__init__()
|
super(RareSettings, self).__init__()
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
|
self.core = core
|
||||||
# (widget_name, option_name, default)
|
# (widget_name, option_name, default)
|
||||||
self.checkboxes = [
|
self.checkboxes = [
|
||||||
(self.sys_tray, "sys_tray", True),
|
(self.sys_tray, "sys_tray", True),
|
||||||
|
@ -39,7 +40,7 @@ class RareSettings(QWidget, Ui_RareSettings):
|
||||||
]
|
]
|
||||||
|
|
||||||
self.settings = QSettings()
|
self.settings = QSettings()
|
||||||
language = self.settings.value("language", get_lang(), type=str)
|
language = self.settings.value("language", self.core.language_code, type=str)
|
||||||
self.logdir = os.path.join(cache_dir, "logs")
|
self.logdir = os.path.join(cache_dir, "logs")
|
||||||
|
|
||||||
# Select lang
|
# Select lang
|
||||||
|
|
|
@ -15,7 +15,8 @@ class Shop(QStackedWidget):
|
||||||
def __init__(self, core: LegendaryCore):
|
def __init__(self, core: LegendaryCore):
|
||||||
super(Shop, self).__init__()
|
super(Shop, self).__init__()
|
||||||
self.core = core
|
self.core = core
|
||||||
self.api_core = ShopApiCore(self.core.egs.session.headers["Authorization"])
|
self.api_core = ShopApiCore(self.core.egs.session.headers["Authorization"], self.core.language_code,
|
||||||
|
self.core.country_code)
|
||||||
|
|
||||||
self.shop = ShopWidget(cache_dir, core, self.api_core)
|
self.shop = ShopWidget(cache_dir, core, self.api_core)
|
||||||
self.wishlist_widget = Wishlist(self.api_core)
|
self.wishlist_widget = Wishlist(self.api_core)
|
||||||
|
|
|
@ -9,7 +9,6 @@ from qtawesome import icon
|
||||||
from rare.components.tabs.shop.shop_models import ShopGame
|
from rare.components.tabs.shop.shop_models import ShopGame
|
||||||
from rare.ui.components.tabs.store.shop_game_info import Ui_shop_info
|
from rare.ui.components.tabs.store.shop_game_info import Ui_shop_info
|
||||||
from rare.utils.extra_widgets import WaitingSpinner, ImageLabel
|
from rare.utils.extra_widgets import WaitingSpinner, ImageLabel
|
||||||
from rare.utils.utils import get_lang
|
|
||||||
|
|
||||||
logger = logging.getLogger("ShopInfo")
|
logger = logging.getLogger("ShopInfo")
|
||||||
|
|
||||||
|
@ -32,7 +31,6 @@ class ShopGameInfo(QWidget, Ui_shop_info):
|
||||||
warn_label.setPixmap(icon("fa.warning").pixmap(160, 160).scaled(240, 320, Qt.IgnoreAspectRatio))
|
warn_label.setPixmap(icon("fa.warning").pixmap(160, 160).scaled(240, 320, Qt.IgnoreAspectRatio))
|
||||||
self.image_stack.addWidget(warn_label)
|
self.image_stack.addWidget(warn_label)
|
||||||
|
|
||||||
self.locale = get_lang()
|
|
||||||
self.wishlist_button.clicked.connect(self.add_to_wishlist)
|
self.wishlist_button.clicked.connect(self.add_to_wishlist)
|
||||||
self.in_wishlist = False
|
self.in_wishlist = False
|
||||||
self.wishlist = []
|
self.wishlist = []
|
||||||
|
|
|
@ -6,7 +6,6 @@ from rare.components.tabs.shop.constants import wishlist_query, search_query, ga
|
||||||
remove_from_wishlist_query
|
remove_from_wishlist_query
|
||||||
from rare.components.tabs.shop.shop_models import BrowseModel
|
from rare.components.tabs.shop.shop_models import BrowseModel
|
||||||
from rare.utils.qt_requests import QtRequestManager
|
from rare.utils.qt_requests import QtRequestManager
|
||||||
from rare.utils.utils import get_lang
|
|
||||||
|
|
||||||
logger = getLogger("ShopAPICore")
|
logger = getLogger("ShopAPICore")
|
||||||
graphql_url = "https://www.epicgames.com/graphql"
|
graphql_url = "https://www.epicgames.com/graphql"
|
||||||
|
@ -15,12 +14,14 @@ graphql_url = "https://www.epicgames.com/graphql"
|
||||||
class ShopApiCore(QObject):
|
class ShopApiCore(QObject):
|
||||||
update_wishlist = pyqtSignal()
|
update_wishlist = pyqtSignal()
|
||||||
|
|
||||||
def __init__(self, auth_token):
|
def __init__(self, auth_token, lc: str, cc: str):
|
||||||
super(ShopApiCore, self).__init__()
|
super(ShopApiCore, self).__init__()
|
||||||
self.token = auth_token
|
self.token = auth_token
|
||||||
|
self.language_code: str = lc
|
||||||
|
self.country_code: str = cc
|
||||||
|
self.locale = self.language_code + "-" + self.country_code
|
||||||
self.manager = QtRequestManager()
|
self.manager = QtRequestManager()
|
||||||
self.auth_manager = QtRequestManager(authorization_token=auth_token)
|
self.auth_manager = QtRequestManager(authorization_token=auth_token)
|
||||||
self.locale = get_lang()
|
|
||||||
|
|
||||||
self.browse_active = False
|
self.browse_active = False
|
||||||
self.next_browse_request = tuple(())
|
self.next_browse_request = tuple(())
|
||||||
|
@ -40,8 +41,8 @@ class ShopApiCore(QObject):
|
||||||
self.auth_manager.post(graphql_url, {
|
self.auth_manager.post(graphql_url, {
|
||||||
"query": wishlist_query,
|
"query": wishlist_query,
|
||||||
"variables": {
|
"variables": {
|
||||||
"country": self.locale.upper(),
|
"country": self.country_code,
|
||||||
"locale": self.locale
|
"locale": self.language_code + "-" + self.country_code
|
||||||
}
|
}
|
||||||
}, lambda data: self._handle_wishlist(data, handle_func))
|
}, lambda data: self._handle_wishlist(data, handle_func))
|
||||||
|
|
||||||
|
@ -52,8 +53,8 @@ class ShopApiCore(QObject):
|
||||||
payload = {
|
payload = {
|
||||||
"query": search_query,
|
"query": search_query,
|
||||||
"variables": {"category": "games/edition/base|bundles/games|editors|software/edition/base", "count": 1,
|
"variables": {"category": "games/edition/base|bundles/games|editors|software/edition/base", "count": 1,
|
||||||
"country": "DE", "keywords": name, "locale": self.locale, "sortDir": "DESC",
|
"country": self.country_code, "keywords": name, "locale": self.locale, "sortDir": "DESC",
|
||||||
"allowCountries": self.locale.upper(),
|
"allowCountries": self.country_code,
|
||||||
"start": 0, "tag": "", "withMapping": False, "withPrice": True}
|
"start": 0, "tag": "", "withMapping": False, "withPrice": True}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,7 +103,7 @@ class ShopApiCore(QObject):
|
||||||
"variables": {
|
"variables": {
|
||||||
"offerId": offer_id,
|
"offerId": offer_id,
|
||||||
"namespace": namespace,
|
"namespace": namespace,
|
||||||
"country": self.locale.upper(),
|
"country": self.country_code,
|
||||||
"locale": self.locale
|
"locale": self.locale
|
||||||
},
|
},
|
||||||
"query": add_to_wishlist_query
|
"query": add_to_wishlist_query
|
||||||
|
|
|
@ -2,8 +2,6 @@ import datetime
|
||||||
import random
|
import random
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
from rare.utils.utils import get_lang
|
|
||||||
|
|
||||||
|
|
||||||
class ImageUrlModel:
|
class ImageUrlModel:
|
||||||
def __init__(self, front_tall: str = "", offer_image_tall: str = "",
|
def __init__(self, front_tall: str = "", offer_image_tall: str = "",
|
||||||
|
@ -111,7 +109,8 @@ class ShopGame:
|
||||||
class BrowseModel:
|
class BrowseModel:
|
||||||
category: str = "games/edition/base|bundles/games|editors|software/edition/base"
|
category: str = "games/edition/base|bundles/games|editors|software/edition/base"
|
||||||
count: int = 30
|
count: int = 30
|
||||||
locale: str = get_lang()
|
language_code: str = "en"
|
||||||
|
country_code: str = "US"
|
||||||
keywords: str = ""
|
keywords: str = ""
|
||||||
sortDir: str = "DESC"
|
sortDir: str = "DESC"
|
||||||
start: int = 0
|
start: int = 0
|
||||||
|
@ -126,11 +125,11 @@ class BrowseModel:
|
||||||
def __dict__(self):
|
def __dict__(self):
|
||||||
payload = {"category": self.category,
|
payload = {"category": self.category,
|
||||||
"count": self.count,
|
"count": self.count,
|
||||||
"country": self.locale.upper(),
|
"country": self.country_code,
|
||||||
"keywords": self.keywords,
|
"keywords": self.keywords,
|
||||||
"locale": self.locale,
|
"locale": self.language_code + "-" + self.country_code,
|
||||||
"sortDir": self.sortDir,
|
"sortDir": self.sortDir,
|
||||||
"allowCountries": self.locale.upper(),
|
"allowCountries": self.country_code,
|
||||||
"start": self.start,
|
"start": self.start,
|
||||||
"tag": self.tag,
|
"tag": self.tag,
|
||||||
"withMapping": self.withMapping,
|
"withMapping": self.withMapping,
|
||||||
|
|
|
@ -12,7 +12,6 @@ from rare.components.tabs.shop.game_widgets import GameWidget
|
||||||
from rare.components.tabs.shop.shop_models import BrowseModel
|
from rare.components.tabs.shop.shop_models import BrowseModel
|
||||||
from rare.ui.components.tabs.store.store import Ui_ShopWidget
|
from rare.ui.components.tabs.store.store import Ui_ShopWidget
|
||||||
from rare.utils.extra_widgets import WaitingSpinner, FlowLayout, ButtonLineEdit
|
from rare.utils.extra_widgets import WaitingSpinner, FlowLayout, ButtonLineEdit
|
||||||
from rare.utils.utils import get_lang
|
|
||||||
|
|
||||||
logger = logging.getLogger("Shop")
|
logger = logging.getLogger("Shop")
|
||||||
|
|
||||||
|
@ -36,7 +35,6 @@ class ShopWidget(QScrollArea, Ui_ShopWidget):
|
||||||
self.price = ""
|
self.price = ""
|
||||||
self.tags = []
|
self.tags = []
|
||||||
self.types = []
|
self.types = []
|
||||||
self.locale = get_lang()
|
|
||||||
self.update_games_allowed = True
|
self.update_games_allowed = True
|
||||||
self.free_widget.setLayout(FlowLayout())
|
self.free_widget.setLayout(FlowLayout())
|
||||||
self.free_games_now = QGroupBox(self.tr("Now Free"))
|
self.free_games_now = QGroupBox(self.tr("Now Free"))
|
||||||
|
@ -106,7 +104,9 @@ class ShopWidget(QScrollArea, Ui_ShopWidget):
|
||||||
coming_free_games = []
|
coming_free_games = []
|
||||||
for game in free_games:
|
for game in free_games:
|
||||||
try:
|
try:
|
||||||
if game['price']['totalPrice']['fmtPrice']['discountPrice'] == "0" and game['price']['totalPrice']['fmtPrice']['originalPrice'] != game['price']['totalPrice']['fmtPrice']['discountPrice']:
|
if game['price']['totalPrice']['fmtPrice']['discountPrice'] == "0" and \
|
||||||
|
game['price']['totalPrice']['fmtPrice']['originalPrice'] != \
|
||||||
|
game['price']['totalPrice']['fmtPrice']['discountPrice']:
|
||||||
free_games_now.append(game)
|
free_games_now.append(game)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -224,7 +224,8 @@ class ShopWidget(QScrollArea, Ui_ShopWidget):
|
||||||
self.game_stack.setCurrentIndex(1)
|
self.game_stack.setCurrentIndex(1)
|
||||||
date = f"[,{datetime.datetime.strftime(datetime.datetime.now(), '%Y-%m-%dT%X')}.{str(random.randint(0, 999)).zfill(3)}Z]"
|
date = f"[,{datetime.datetime.strftime(datetime.datetime.now(), '%Y-%m-%dT%X')}.{str(random.randint(0, 999)).zfill(3)}Z]"
|
||||||
|
|
||||||
browse_model = BrowseModel(locale=self.locale, date=date, count=20, price=self.price,
|
browse_model = BrowseModel(language_code=self.core.language_code, country_code=self.core.country_code,
|
||||||
|
date=date, count=20, price=self.price,
|
||||||
onSale=self.on_discount.isChecked())
|
onSale=self.on_discount.isChecked())
|
||||||
browse_model.tag = "|".join(self.tags)
|
browse_model.tag = "|".join(self.tags)
|
||||||
|
|
||||||
|
@ -237,11 +238,7 @@ class ShopWidget(QScrollArea, Ui_ShopWidget):
|
||||||
child.deleteLater()
|
child.deleteLater()
|
||||||
del child
|
del child
|
||||||
|
|
||||||
QWidget().setLayout(self.game_widget.layout())
|
|
||||||
|
|
||||||
if data:
|
if data:
|
||||||
self.game_widget.setLayout(FlowLayout())
|
|
||||||
|
|
||||||
for game in data:
|
for game in data:
|
||||||
w = GameWidget(self.path, game, 275)
|
w = GameWidget(self.path, game, 275)
|
||||||
self.game_widget.layout().addWidget(w)
|
self.game_widget.layout().addWidget(w)
|
||||||
|
|
|
@ -67,7 +67,8 @@ class Wishlist(QStackedWidget, Ui_Wishlist):
|
||||||
if sort == 0:
|
if sort == 0:
|
||||||
sorted_list = sorted(self.wishlist, key=lambda x: x["offer"]["title"])
|
sorted_list = sorted(self.wishlist, key=lambda x: x["offer"]["title"])
|
||||||
elif sort == 1:
|
elif sort == 1:
|
||||||
sorted_list = sorted(self.wishlist, key=lambda x: x["offer"]['price']['totalPrice']['fmtPrice']['discountPrice'])
|
sorted_list = sorted(self.wishlist,
|
||||||
|
key=lambda x: x["offer"]['price']['totalPrice']['fmtPrice']['discountPrice'])
|
||||||
elif sort == 2:
|
elif sort == 2:
|
||||||
sorted_list = sorted(self.wishlist, key=lambda x: x["offer"]["seller"]["name"])
|
sorted_list = sorted(self.wishlist, key=lambda x: x["offer"]["seller"]["name"])
|
||||||
elif sort == 3:
|
elif sort == 3:
|
||||||
|
|
|
@ -124,6 +124,7 @@ class Ui_LoginDialog(object):
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
LoginDialog = QtWidgets.QDialog()
|
LoginDialog = QtWidgets.QDialog()
|
||||||
ui = Ui_LoginDialog()
|
ui = Ui_LoginDialog()
|
||||||
|
|
|
@ -27,7 +27,7 @@ class Ui_LegendarySettings(object):
|
||||||
self.download_group = QtWidgets.QGroupBox(LegendarySettings)
|
self.download_group = QtWidgets.QGroupBox(LegendarySettings)
|
||||||
self.download_group.setObjectName("download_group")
|
self.download_group.setObjectName("download_group")
|
||||||
self.download_layout = QtWidgets.QFormLayout(self.download_group)
|
self.download_layout = QtWidgets.QFormLayout(self.download_group)
|
||||||
self.download_layout.setLabelAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
self.download_layout.setLabelAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
|
||||||
self.download_layout.setObjectName("download_layout")
|
self.download_layout.setObjectName("download_layout")
|
||||||
self.max_workers_label = QtWidgets.QLabel(self.download_group)
|
self.max_workers_label = QtWidgets.QLabel(self.download_group)
|
||||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred)
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred)
|
||||||
|
@ -267,6 +267,7 @@ class Ui_LegendarySettings(object):
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
LegendarySettings = QtWidgets.QWidget()
|
LegendarySettings = QtWidgets.QWidget()
|
||||||
ui = Ui_LegendarySettings()
|
ui = Ui_LegendarySettings()
|
||||||
|
|
|
@ -1,75 +1,75 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>LinuxSettings</class>
|
<class>LinuxSettings</class>
|
||||||
<widget class="QWidget" name="LinuxSettings">
|
<widget class="QWidget" name="LinuxSettings">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>569</width>
|
<width>569</width>
|
||||||
<height>454</height>
|
<height>454</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>LinuxSettings</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="linux_layout">
|
|
||||||
<item row="3" column="0">
|
|
||||||
<spacer name="linux_vspacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QGroupBox" name="wine_groupbox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Wine Settings</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QFormLayout" name="wine_layout">
|
|
||||||
<property name="labelAlignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="prefix_label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Prefix</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="windowTitle">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<string>LinuxSettings</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<layout class="QGridLayout" name="linux_layout">
|
||||||
</item>
|
<item row="3" column="0">
|
||||||
<item row="0" column="1">
|
<spacer name="linux_vspacer">
|
||||||
<layout class="QVBoxLayout" name="prefix_layout"/>
|
<property name="orientation">
|
||||||
</item>
|
<enum>Qt::Vertical</enum>
|
||||||
<item row="1" column="0">
|
</property>
|
||||||
<widget class="QLabel" name="exec_label">
|
<property name="sizeHint" stdset="0">
|
||||||
<property name="text">
|
<size>
|
||||||
<string>Executable</string>
|
<width>20</width>
|
||||||
</property>
|
<height>40</height>
|
||||||
<property name="alignment">
|
</size>
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
</property>
|
||||||
</property>
|
</spacer>
|
||||||
</widget>
|
</item>
|
||||||
</item>
|
<item row="0" column="0">
|
||||||
<item row="1" column="1">
|
<widget class="QGroupBox" name="wine_groupbox">
|
||||||
<layout class="QVBoxLayout" name="exec_layout"/>
|
<property name="title">
|
||||||
</item>
|
<string>Wine Settings</string>
|
||||||
</layout>
|
</property>
|
||||||
|
<layout class="QFormLayout" name="wine_layout">
|
||||||
|
<property name="labelAlignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="prefix_label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Prefix</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<layout class="QVBoxLayout" name="prefix_layout"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="exec_label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Executable</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<layout class="QVBoxLayout" name="exec_layout"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<layout class="QVBoxLayout" name="dxvk_layout"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
<resources/>
|
||||||
<item row="1" column="0">
|
<connections/>
|
||||||
<layout class="QVBoxLayout" name="dxvk_layout"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
</ui>
|
||||||
|
|
|
@ -1,285 +1,285 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>RareSettings</class>
|
<class>RareSettings</class>
|
||||||
<widget class="QWidget" name="RareSettings">
|
<widget class="QWidget" name="RareSettings">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>674</width>
|
<width>674</width>
|
||||||
<height>532</height>
|
<height>532</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>RareSettings</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="rare_layout">
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="left_layout">
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="interface_group">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Interface</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QFormLayout" name="interface_layout">
|
|
||||||
<property name="labelAlignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<property name="windowTitle">
|
||||||
<widget class="QLabel" name="lang_label">
|
<string>RareSettings</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Language</string>
|
<layout class="QHBoxLayout" name="rare_layout">
|
||||||
</property>
|
<item>
|
||||||
</widget>
|
<layout class="QVBoxLayout" name="left_layout">
|
||||||
</item>
|
<item>
|
||||||
<item row="0" column="1">
|
<widget class="QGroupBox" name="interface_group">
|
||||||
<widget class="QComboBox" name="lang_select">
|
<property name="sizePolicy">
|
||||||
<property name="sizePolicy">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
<horstretch>0</horstretch>
|
||||||
<horstretch>0</horstretch>
|
<verstretch>0</verstretch>
|
||||||
<verstretch>0</verstretch>
|
</sizepolicy>
|
||||||
</sizepolicy>
|
</property>
|
||||||
</property>
|
<property name="title">
|
||||||
</widget>
|
<string>Interface</string>
|
||||||
</item>
|
</property>
|
||||||
<item row="1" column="0">
|
<layout class="QFormLayout" name="interface_layout">
|
||||||
<widget class="QLabel" name="color_label">
|
<property name="labelAlignment">
|
||||||
<property name="text">
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
<string>Color Scheme</string>
|
</property>
|
||||||
</property>
|
<item row="0" column="0">
|
||||||
</widget>
|
<widget class="QLabel" name="lang_label">
|
||||||
</item>
|
<property name="text">
|
||||||
<item row="1" column="1">
|
<string>Language</string>
|
||||||
<widget class="QComboBox" name="color_select">
|
</property>
|
||||||
<property name="sizePolicy">
|
</widget>
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
</item>
|
||||||
<horstretch>0</horstretch>
|
<item row="0" column="1">
|
||||||
<verstretch>0</verstretch>
|
<widget class="QComboBox" name="lang_select">
|
||||||
</sizepolicy>
|
<property name="sizePolicy">
|
||||||
</property>
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
<item>
|
<horstretch>0</horstretch>
|
||||||
<property name="text">
|
<verstretch>0</verstretch>
|
||||||
<string>None</string>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</widget>
|
||||||
</widget>
|
</item>
|
||||||
</item>
|
<item row="1" column="0">
|
||||||
<item row="2" column="0">
|
<widget class="QLabel" name="color_label">
|
||||||
<widget class="QLabel" name="style_label">
|
<property name="text">
|
||||||
<property name="text">
|
<string>Color Scheme</string>
|
||||||
<string>Style Sheet</string>
|
</property>
|
||||||
</property>
|
</widget>
|
||||||
</widget>
|
</item>
|
||||||
</item>
|
<item row="1" column="1">
|
||||||
<item row="2" column="1">
|
<widget class="QComboBox" name="color_select">
|
||||||
<widget class="QComboBox" name="style_select">
|
<property name="sizePolicy">
|
||||||
<property name="sizePolicy">
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
<horstretch>0</horstretch>
|
||||||
<horstretch>0</horstretch>
|
<verstretch>0</verstretch>
|
||||||
<verstretch>0</verstretch>
|
</sizepolicy>
|
||||||
</sizepolicy>
|
</property>
|
||||||
</property>
|
<item>
|
||||||
<item>
|
<property name="text">
|
||||||
<property name="text">
|
<string>None</string>
|
||||||
<string>None</string>
|
</property>
|
||||||
</property>
|
</item>
|
||||||
</item>
|
</widget>
|
||||||
</widget>
|
</item>
|
||||||
</item>
|
<item row="2" column="0">
|
||||||
<item row="3" column="0" colspan="2">
|
<widget class="QLabel" name="style_label">
|
||||||
<widget class="QLabel" name="interface_info">
|
<property name="text">
|
||||||
<property name="font">
|
<string>Style Sheet</string>
|
||||||
<font>
|
</property>
|
||||||
<italic>true</italic>
|
</widget>
|
||||||
</font>
|
</item>
|
||||||
</property>
|
<item row="2" column="1">
|
||||||
<property name="text">
|
<widget class="QComboBox" name="style_select">
|
||||||
<string>Restart Rare to apply.</string>
|
<property name="sizePolicy">
|
||||||
</property>
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
<property name="wordWrap">
|
<horstretch>0</horstretch>
|
||||||
<bool>true</bool>
|
<verstretch>0</verstretch>
|
||||||
</property>
|
</sizepolicy>
|
||||||
</widget>
|
</property>
|
||||||
</item>
|
<item>
|
||||||
</layout>
|
<property name="text">
|
||||||
</widget>
|
<string>None</string>
|
||||||
</item>
|
</property>
|
||||||
<item>
|
</item>
|
||||||
<widget class="QGroupBox" name="settings_group">
|
</widget>
|
||||||
<property name="title">
|
</item>
|
||||||
<string>Behavior</string>
|
<item row="3" column="0" colspan="2">
|
||||||
</property>
|
<widget class="QLabel" name="interface_info">
|
||||||
<layout class="QGridLayout" name="behavior_layout">
|
<property name="font">
|
||||||
<item row="5" column="0">
|
<font>
|
||||||
<widget class="QCheckBox" name="save_size">
|
<italic>true</italic>
|
||||||
<property name="text">
|
</font>
|
||||||
<string>Restore window size on application startup</string>
|
</property>
|
||||||
</property>
|
<property name="text">
|
||||||
</widget>
|
<string>Restart Rare to apply.</string>
|
||||||
</item>
|
</property>
|
||||||
<item row="4" column="0">
|
<property name="wordWrap">
|
||||||
<widget class="QCheckBox" name="notification">
|
<bool>true</bool>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Show notification on download completion</string>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
</widget>
|
</layout>
|
||||||
</item>
|
</widget>
|
||||||
<item row="6" column="0">
|
</item>
|
||||||
<widget class="QCheckBox" name="log_games">
|
<item>
|
||||||
<property name="text">
|
<widget class="QGroupBox" name="settings_group">
|
||||||
<string>Show console for game debug</string>
|
<property name="title">
|
||||||
</property>
|
<string>Behavior</string>
|
||||||
</widget>
|
</property>
|
||||||
</item>
|
<layout class="QGridLayout" name="behavior_layout">
|
||||||
<item row="0" column="0">
|
<item row="5" column="0">
|
||||||
<widget class="QCheckBox" name="sys_tray">
|
<widget class="QCheckBox" name="save_size">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Exit to System tray</string>
|
<string>Restore window size on application startup</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QCheckBox" name="auto_update">
|
<widget class="QCheckBox" name="notification">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Update games on application startup</string>
|
<string>Show notification on download completion</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="6" column="0">
|
||||||
<widget class="QCheckBox" name="confirm_start">
|
<widget class="QCheckBox" name="log_games">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Confirm game launch</string>
|
<string>Show console for game debug</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QCheckBox" name="auto_sync_cloud">
|
<widget class="QCheckBox" name="sys_tray">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Automatically sync with cloud</string>
|
<string>Exit to System tray</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1" rowspan="2">
|
<item row="1" column="0">
|
||||||
<spacer name="settings_hspacer">
|
<widget class="QCheckBox" name="auto_update">
|
||||||
<property name="orientation">
|
<property name="text">
|
||||||
<enum>Qt::Horizontal</enum>
|
<string>Update games on application startup</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
</widget>
|
||||||
<size>
|
</item>
|
||||||
<width>40</width>
|
<item row="2" column="0">
|
||||||
<height>20</height>
|
<widget class="QCheckBox" name="confirm_start">
|
||||||
</size>
|
<property name="text">
|
||||||
</property>
|
<string>Confirm game launch</string>
|
||||||
</spacer>
|
</property>
|
||||||
</item>
|
</widget>
|
||||||
</layout>
|
</item>
|
||||||
</widget>
|
<item row="3" column="0">
|
||||||
</item>
|
<widget class="QCheckBox" name="auto_sync_cloud">
|
||||||
<item>
|
<property name="text">
|
||||||
<spacer name="left_vspacer">
|
<string>Automatically sync with cloud</string>
|
||||||
<property name="orientation">
|
</property>
|
||||||
<enum>Qt::Vertical</enum>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
<property name="sizeHint" stdset="0">
|
<item row="2" column="1" rowspan="2">
|
||||||
<size>
|
<spacer name="settings_hspacer">
|
||||||
<width>20</width>
|
<property name="orientation">
|
||||||
<height>40</height>
|
<enum>Qt::Horizontal</enum>
|
||||||
</size>
|
</property>
|
||||||
</property>
|
<property name="sizeHint" stdset="0">
|
||||||
</spacer>
|
<size>
|
||||||
</item>
|
<width>40</width>
|
||||||
</layout>
|
<height>20</height>
|
||||||
</item>
|
</size>
|
||||||
<item>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="right_layout">
|
</spacer>
|
||||||
<item>
|
</item>
|
||||||
<widget class="QGroupBox" name="log_dir_group">
|
</layout>
|
||||||
<property name="title">
|
</widget>
|
||||||
<string>Logs</string>
|
</item>
|
||||||
</property>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="log_dir_layout">
|
<spacer name="left_vspacer">
|
||||||
<item>
|
<property name="orientation">
|
||||||
<widget class="QPushButton" name="log_dir_open_button">
|
<enum>Qt::Vertical</enum>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Open Log directory</string>
|
<property name="sizeHint" stdset="0">
|
||||||
</property>
|
<size>
|
||||||
</widget>
|
<width>20</width>
|
||||||
</item>
|
<height>40</height>
|
||||||
<item>
|
</size>
|
||||||
<widget class="QPushButton" name="log_dir_clean_button">
|
</property>
|
||||||
<property name="text">
|
</spacer>
|
||||||
<string>Clean Log directory</string>
|
</item>
|
||||||
</property>
|
</layout>
|
||||||
</widget>
|
</item>
|
||||||
</item>
|
<item>
|
||||||
<item>
|
<layout class="QVBoxLayout" name="right_layout">
|
||||||
<widget class="QLabel" name="log_dir_size_label">
|
<item>
|
||||||
<property name="sizePolicy">
|
<widget class="QGroupBox" name="log_dir_group">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
<property name="title">
|
||||||
<horstretch>0</horstretch>
|
<string>Logs</string>
|
||||||
<verstretch>0</verstretch>
|
</property>
|
||||||
</sizepolicy>
|
<layout class="QVBoxLayout" name="log_dir_layout">
|
||||||
</property>
|
<item>
|
||||||
<property name="text">
|
<widget class="QPushButton" name="log_dir_open_button">
|
||||||
<string notr="true"/>
|
<property name="text">
|
||||||
</property>
|
<string>Open Log directory</string>
|
||||||
<property name="wordWrap">
|
</property>
|
||||||
<bool>true</bool>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
</widget>
|
<item>
|
||||||
</item>
|
<widget class="QPushButton" name="log_dir_clean_button">
|
||||||
</layout>
|
<property name="text">
|
||||||
</widget>
|
<string>Clean Log directory</string>
|
||||||
</item>
|
</property>
|
||||||
<item>
|
</widget>
|
||||||
<layout class="QVBoxLayout" name="rpc_layout"/>
|
</item>
|
||||||
</item>
|
<item>
|
||||||
<item>
|
<widget class="QLabel" name="log_dir_size_label">
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<property name="sizePolicy">
|
||||||
<property name="title">
|
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||||
<string>Shortcuts</string>
|
<horstretch>0</horstretch>
|
||||||
</property>
|
<verstretch>0</verstretch>
|
||||||
<layout class="QVBoxLayout" name="shortcuts_layout">
|
</sizepolicy>
|
||||||
<item>
|
</property>
|
||||||
<widget class="QPushButton" name="desktop_link">
|
<property name="text">
|
||||||
<property name="text">
|
<string notr="true"/>
|
||||||
<string>Create Desktop link</string>
|
</property>
|
||||||
</property>
|
<property name="wordWrap">
|
||||||
</widget>
|
<bool>true</bool>
|
||||||
</item>
|
</property>
|
||||||
<item>
|
</widget>
|
||||||
<widget class="QPushButton" name="startmenu_link">
|
</item>
|
||||||
<property name="text">
|
</layout>
|
||||||
<string>Create start menu link</string>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
</widget>
|
<item>
|
||||||
</item>
|
<layout class="QVBoxLayout" name="rpc_layout"/>
|
||||||
</layout>
|
</item>
|
||||||
</widget>
|
<item>
|
||||||
</item>
|
<widget class="QGroupBox" name="groupBox">
|
||||||
<item>
|
<property name="title">
|
||||||
<spacer name="right_vspacer">
|
<string>Shortcuts</string>
|
||||||
<property name="orientation">
|
</property>
|
||||||
<enum>Qt::Vertical</enum>
|
<layout class="QVBoxLayout" name="shortcuts_layout">
|
||||||
</property>
|
<item>
|
||||||
<property name="sizeHint" stdset="0">
|
<widget class="QPushButton" name="desktop_link">
|
||||||
<size>
|
<property name="text">
|
||||||
<width>20</width>
|
<string>Create Desktop link</string>
|
||||||
<height>40</height>
|
</property>
|
||||||
</size>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
</spacer>
|
<item>
|
||||||
</item>
|
<widget class="QPushButton" name="startmenu_link">
|
||||||
</layout>
|
<property name="text">
|
||||||
</item>
|
<string>Create start menu link</string>
|
||||||
</layout>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
</item>
|
||||||
<connections/>
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="right_vspacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Form implementation generated from reading ui file 'shop_game_info.ui'
|
# Form implementation generated from reading ui file 'rare/ui/components/tabs/store/shop_game_info.ui'
|
||||||
#
|
#
|
||||||
# Created by: PyQt5 UI code generator 5.15.4
|
# Created by: PyQt5 UI code generator 5.15.4
|
||||||
#
|
#
|
||||||
|
@ -36,21 +36,21 @@ class Ui_shop_info(object):
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
font.setPointSize(18)
|
font.setPointSize(18)
|
||||||
self.title.setFont(font)
|
self.title.setFont(font)
|
||||||
self.title.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse | QtCore.Qt.TextSelectableByMouse)
|
self.title.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
|
||||||
self.title.setObjectName("title")
|
self.title.setObjectName("title")
|
||||||
self.verticalLayout_2.addWidget(self.title)
|
self.verticalLayout_2.addWidget(self.title)
|
||||||
self.dev = QtWidgets.QLabel(shop_info)
|
self.dev = QtWidgets.QLabel(shop_info)
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
font.setPointSize(14)
|
font.setPointSize(14)
|
||||||
self.dev.setFont(font)
|
self.dev.setFont(font)
|
||||||
self.dev.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse | QtCore.Qt.TextSelectableByMouse)
|
self.dev.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
|
||||||
self.dev.setObjectName("dev")
|
self.dev.setObjectName("dev")
|
||||||
self.verticalLayout_2.addWidget(self.dev)
|
self.verticalLayout_2.addWidget(self.dev)
|
||||||
self.owned_label = QtWidgets.QLabel(shop_info)
|
self.owned_label = QtWidgets.QLabel(shop_info)
|
||||||
self.owned_label.setObjectName("owned_label")
|
self.owned_label.setObjectName("owned_label")
|
||||||
self.verticalLayout_2.addWidget(self.owned_label)
|
self.verticalLayout_2.addWidget(self.owned_label)
|
||||||
self.price = QtWidgets.QLabel(shop_info)
|
self.price = QtWidgets.QLabel(shop_info)
|
||||||
self.price.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse | QtCore.Qt.TextSelectableByMouse)
|
self.price.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
|
||||||
self.price.setObjectName("price")
|
self.price.setObjectName("price")
|
||||||
self.verticalLayout_2.addWidget(self.price)
|
self.verticalLayout_2.addWidget(self.price)
|
||||||
self.discount_price = QtWidgets.QLabel(shop_info)
|
self.discount_price = QtWidgets.QLabel(shop_info)
|
||||||
|
|
|
@ -1,191 +1,191 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>shop_info</class>
|
<class>shop_info</class>
|
||||||
<widget class="QWidget" name="shop_info">
|
<widget class="QWidget" name="shop_info">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>702</width>
|
<width>702</width>
|
||||||
<height>468</height>
|
<height>468</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="back_button">
|
<widget class="QPushButton" name="back_button">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Back</string>
|
<string>Back</string>
|
||||||
</property>
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QStackedWidget" name="image_stack">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>-1</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="title">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>18</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Error</string>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="dev">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>14</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>TextLabel</string>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="owned_label">
|
||||||
|
<property name="text">
|
||||||
|
<string>You already own this game</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="price">
|
||||||
|
<property name="text">
|
||||||
|
<string>TextLabel</string>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="discount_price">
|
||||||
|
<property name="text">
|
||||||
|
<string>TextLabel</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="tags">
|
||||||
|
<property name="text">
|
||||||
|
<string>TextLabel</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="open_store_button">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Buy Game in Epic Games Store</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="wishlist_button">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Add to wishlist</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="req_group_box">
|
||||||
|
<property name="title">
|
||||||
|
<string>Requirements</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_2"/>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="social_link_gb">
|
||||||
|
<property name="title">
|
||||||
|
<string>Social Links</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2"/>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
<resources/>
|
||||||
<item>
|
<connections/>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QStackedWidget" name="image_stack">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="currentIndex">
|
|
||||||
<number>-1</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="title">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>18</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Error</string>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
|
||||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="dev">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>14</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>TextLabel</string>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
|
||||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="owned_label">
|
|
||||||
<property name="text">
|
|
||||||
<string>You already own this game</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="price">
|
|
||||||
<property name="text">
|
|
||||||
<string>TextLabel</string>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
|
||||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="discount_price">
|
|
||||||
<property name="text">
|
|
||||||
<string>TextLabel</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="tags">
|
|
||||||
<property name="text">
|
|
||||||
<string>TextLabel</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="open_store_button">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Buy Game in Epic Games Store</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="wishlist_button">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Add to wishlist</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="req_group_box">
|
|
||||||
<property name="title">
|
|
||||||
<string>Requirements</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_2"/>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="social_link_gb">
|
|
||||||
<property name="title">
|
|
||||||
<string>Social Links</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2"/>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
</ui>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Form implementation generated from reading ui file 'store.ui'
|
# Form implementation generated from reading ui file 'rare/ui/components/tabs/store/store.ui'
|
||||||
#
|
#
|
||||||
# Created by: PyQt5 UI code generator 5.15.4
|
# Created by: PyQt5 UI code generator 5.15.4
|
||||||
#
|
#
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
# run again. Do not edit this file unless you know what you are doing.
|
# run again. Do not edit this file unless you know what you are doing.
|
||||||
|
|
||||||
|
|
||||||
from PyQt5 import QtCore, QtWidgets
|
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||||
|
|
||||||
|
|
||||||
class Ui_ShopWidget(object):
|
class Ui_ShopWidget(object):
|
||||||
|
|
|
@ -1,248 +1,248 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>ShopWidget</class>
|
<class>ShopWidget</class>
|
||||||
<widget class="QWidget" name="ShopWidget">
|
<widget class="QWidget" name="ShopWidget">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>850</width>
|
<width>850</width>
|
||||||
<height>572</height>
|
<height>572</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QScrollArea" name="scrollArea">
|
<widget class="QScrollArea" name="scrollArea">
|
||||||
<property name="widgetResizable">
|
<property name="widgetResizable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>828</width>
|
<width>828</width>
|
||||||
<height>550</height>
|
<height>550</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="widget" native="true">
|
<widget class="QWidget" name="widget" native="true">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="free_game_group_box">
|
<widget class="QGroupBox" name="free_game_group_box">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Free Games</string>
|
<string>Free Games</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QStackedWidget" name="free_stack">
|
<widget class="QStackedWidget" name="free_stack">
|
||||||
<widget class="QWidget" name="free_widget">
|
<widget class="QWidget" name="free_widget">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred"
|
<sizepolicy hsizetype="Preferred"
|
||||||
vsizetype="Maximum">
|
vsizetype="Maximum">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout"
|
<layout class="QVBoxLayout"
|
||||||
name="verticalLayout_8"/>
|
name="verticalLayout_8"/>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="discounts_gb">
|
<widget class="QGroupBox" name="discounts_gb">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Discounts from your wishlist</string>
|
<string>Discounts from your wishlist</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QStackedWidget" name="discount_stack">
|
<widget class="QStackedWidget" name="discount_stack">
|
||||||
<widget class="QWidget" name="discount_widget"/>
|
<widget class="QWidget" name="discount_widget"/>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="filter_game_gb">
|
<widget class="QGroupBox" name="filter_game_gb">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Games</string>
|
<string>Games</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QStackedWidget" name="game_stack">
|
<widget class="QStackedWidget" name="game_stack">
|
||||||
<widget class="QWidget" name="game_widget"/>
|
<widget class="QWidget" name="game_widget"/>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="filter_gb">
|
<widget class="QGroupBox" name="filter_gb">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>150</width>
|
<width>150</width>
|
||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>16777215</width>
|
||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Filter</string>
|
<string>Filter</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="reset_button">
|
<widget class="QPushButton" name="reset_button">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Reset</string>
|
<string>Reset</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="price_gb">
|
<widget class="QGroupBox" name="price_gb">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Price</string>
|
<string>Price</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_9">
|
<layout class="QVBoxLayout" name="verticalLayout_9">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="none_price">
|
<widget class="QRadioButton" name="none_price">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>None</string>
|
<string>None</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="free_button">
|
<widget class="QRadioButton" name="free_button">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Free</string>
|
<string>Free</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="under10">
|
<widget class="QRadioButton" name="under10">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Under 10</string>
|
<string>Under 10</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="under20">
|
<widget class="QRadioButton" name="under20">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Under 20</string>
|
<string>Under 20</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="under30">
|
<widget class="QRadioButton" name="under30">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Under 30</string>
|
<string>Under 30</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="above">
|
<widget class="QRadioButton" name="above">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>14.99 and above</string>
|
<string>14.99 and above</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="on_discount">
|
<widget class="QCheckBox" name="on_discount">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Discount</string>
|
<string>Discount</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="platform_gb">
|
<widget class="QGroupBox" name="platform_gb">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Platform</string>
|
<string>Platform</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_13"/>
|
<layout class="QVBoxLayout" name="verticalLayout_13"/>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="genre_gb">
|
<widget class="QGroupBox" name="genre_gb">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Genre</string>
|
<string>Genre</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_12"/>
|
<layout class="QVBoxLayout" name="verticalLayout_12"/>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="type_gb">
|
<widget class="QGroupBox" name="type_gb">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Type</string>
|
<string>Type</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_11"/>
|
<layout class="QVBoxLayout" name="verticalLayout_11"/>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="others_gb">
|
<widget class="QGroupBox" name="others_gb">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Other Tags</string>
|
<string>Other Tags</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_10"/>
|
<layout class="QVBoxLayout" name="verticalLayout_10"/>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
<height>40</height>
|
<height>40</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
|
@ -108,6 +108,7 @@ class Ui_Wishlist(object):
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
Wishlist = QtWidgets.QStackedWidget()
|
Wishlist = QtWidgets.QStackedWidget()
|
||||||
ui = Ui_Wishlist()
|
ui = Ui_Wishlist()
|
||||||
|
|
|
@ -1,53 +1,53 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>PathEdit</class>
|
<class>PathEdit</class>
|
||||||
<widget class="QWidget" name="PathEdit">
|
<widget class="QWidget" name="PathEdit">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>385</width>
|
<width>385</width>
|
||||||
<height>30</height>
|
<height>30</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>PathEdit</string>
|
<string>PathEdit</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="layout_pathedit">
|
<layout class="QHBoxLayout" name="layout_pathedit">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="rightMargin">
|
<property name="rightMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="text_edit">
|
<widget class="QLineEdit" name="text_edit">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>300</width>
|
<width>300</width>
|
||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="placeholderText">
|
<property name="placeholderText">
|
||||||
<string>Default</string>
|
<string>Default</string>
|
||||||
</property>
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="path_select">
|
||||||
|
<property name="text">
|
||||||
|
<string>Browse...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
<resources/>
|
||||||
<item>
|
<connections/>
|
||||||
<widget class="QToolButton" name="path_select">
|
|
||||||
<property name="text">
|
|
||||||
<string>Browse...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
</ui>
|
||||||
|
|
|
@ -4,7 +4,7 @@ from logging import getLogger
|
||||||
|
|
||||||
import PIL
|
import PIL
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from PyQt5.QtCore import Qt, QRect, QSize, QPoint, pyqtSignal, QSettings
|
from PyQt5.QtCore import Qt, QRect, QSize, QPoint, pyqtSignal
|
||||||
from PyQt5.QtGui import QMovie, QPixmap
|
from PyQt5.QtGui import QMovie, QPixmap
|
||||||
from PyQt5.QtWidgets import QLayout, QStyle, QSizePolicy, QLabel, QFileDialog, QHBoxLayout, QWidget, QPushButton, \
|
from PyQt5.QtWidgets import QLayout, QStyle, QSizePolicy, QLabel, QFileDialog, QHBoxLayout, QWidget, QPushButton, \
|
||||||
QStyleOptionTab, QStylePainter, QTabBar, QLineEdit, QToolButton
|
QStyleOptionTab, QStylePainter, QTabBar, QLineEdit, QToolButton
|
||||||
|
|
|
@ -7,7 +7,6 @@ import requests
|
||||||
from PyQt5.QtCore import QThread, pyqtSignal
|
from PyQt5.QtCore import QThread, pyqtSignal
|
||||||
|
|
||||||
from legendary.core import LegendaryCore
|
from legendary.core import LegendaryCore
|
||||||
|
|
||||||
from rare import data_dir, cache_dir
|
from rare import data_dir, cache_dir
|
||||||
|
|
||||||
replace_chars = ",;.:-_ "
|
replace_chars = ",;.:-_ "
|
||||||
|
@ -24,14 +23,14 @@ class SteamWorker(QThread):
|
||||||
super(SteamWorker, self).__init__()
|
super(SteamWorker, self).__init__()
|
||||||
self.core = core
|
self.core = core
|
||||||
self.ratings = {
|
self.ratings = {
|
||||||
"platinum": self.tr("Platinum"),
|
"platinum": self.tr("Platinum"),
|
||||||
"gold": self.tr("Gold"),
|
"gold": self.tr("Gold"),
|
||||||
"silver": self.tr("Silver"),
|
"silver": self.tr("Silver"),
|
||||||
"bronze": self.tr("Bronze"),
|
"bronze": self.tr("Bronze"),
|
||||||
"fail": self.tr("Could not get grade"),
|
"fail": self.tr("Could not get grade"),
|
||||||
"borked": self.tr("unplayable"),
|
"borked": self.tr("unplayable"),
|
||||||
"pending": self.tr("Could not get grade")
|
"pending": self.tr("Could not get grade")
|
||||||
}
|
}
|
||||||
|
|
||||||
def set_app_name(self, app_name: str):
|
def set_app_name(self, app_name: str):
|
||||||
self.app_name = app_name
|
self.app_name = app_name
|
||||||
|
|
|
@ -9,7 +9,7 @@ from typing import Tuple
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from PIL import Image, UnidentifiedImageError
|
from PIL import Image, UnidentifiedImageError
|
||||||
from PyQt5.QtCore import pyqtSignal, QLocale, QSettings
|
from PyQt5.QtCore import pyqtSignal, QSettings
|
||||||
from PyQt5.QtGui import QPalette, QColor, QPixmap
|
from PyQt5.QtGui import QPalette, QColor, QPixmap
|
||||||
|
|
||||||
# Windows
|
# Windows
|
||||||
|
@ -26,7 +26,6 @@ logger = getLogger("Utils")
|
||||||
settings = QSettings("Rare", "Rare")
|
settings = QSettings("Rare", "Rare")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def download_images(signal: pyqtSignal, core: LegendaryCore):
|
def download_images(signal: pyqtSignal, core: LegendaryCore):
|
||||||
if not os.path.isdir(image_dir):
|
if not os.path.isdir(image_dir):
|
||||||
os.makedirs(image_dir)
|
os.makedirs(image_dir)
|
||||||
|
@ -121,16 +120,6 @@ def download_image(game, force=False):
|
||||||
logger.warning(f"File {image_dir}/{game.app_name}/DieselGameBoxTall.png doesn't exist")
|
logger.warning(f"File {image_dir}/{game.app_name}/DieselGameBoxTall.png doesn't exist")
|
||||||
|
|
||||||
|
|
||||||
def get_lang():
|
|
||||||
core = LegendaryCore()
|
|
||||||
if "Legendary" in core.lgd.config.sections() and "locale" in core.lgd.config["Legendary"]:
|
|
||||||
logger.info("Found locale in Legendary config: " + core.lgd.config.get("Legendary", "locale"))
|
|
||||||
return core.lgd.config.get("Legendary", "locale").split("-")[0]
|
|
||||||
else:
|
|
||||||
logger.info("Found locale in system config: " + QLocale.system().name().split("_")[0])
|
|
||||||
return QLocale.system().name().split("_")[0]
|
|
||||||
|
|
||||||
|
|
||||||
color_role_map = {
|
color_role_map = {
|
||||||
0: "WindowText",
|
0: "WindowText",
|
||||||
1: "Button",
|
1: "Button",
|
||||||
|
@ -289,7 +278,6 @@ def create_rare_desktop_link(type_of_link):
|
||||||
def create_desktop_link(app_name, core: LegendaryCore, type_of_link="desktop") -> bool:
|
def create_desktop_link(app_name, core: LegendaryCore, type_of_link="desktop") -> bool:
|
||||||
igame = core.get_installed_game(app_name)
|
igame = core.get_installed_game(app_name)
|
||||||
|
|
||||||
|
|
||||||
if os.path.exists(p := os.path.join(image_dir, igame.app_name, 'Thumbnail.png')):
|
if os.path.exists(p := os.path.join(image_dir, igame.app_name, 'Thumbnail.png')):
|
||||||
icon = p
|
icon = p
|
||||||
elif os.path.exists(p := os.path.join(image_dir, igame.app_name, "DieselGameBoxLogo.png")):
|
elif os.path.exists(p := os.path.join(image_dir, igame.app_name, "DieselGameBoxLogo.png")):
|
||||||
|
@ -390,7 +378,6 @@ def get_uninstalled_pixmap(app_name: str) -> QPixmap:
|
||||||
return pixmap
|
return pixmap
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def optimal_text_background(image: list) -> Tuple[int, int, int]:
|
def optimal_text_background(image: list) -> Tuple[int, int, int]:
|
||||||
"""
|
"""
|
||||||
Finds an optimal background color for text on the image by calculating the
|
Finds an optimal background color for text on the image by calculating the
|
||||||
|
@ -423,4 +410,3 @@ def text_color_for_background(background: Tuple[int, int, int]) -> Tuple[int,
|
||||||
return 255, 255, 255
|
return 255, 255, 255
|
||||||
else:
|
else:
|
||||||
return 0, 0, 0
|
return 0, 0, 0
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue