From 415e2de2003e3138730465759a4e20396ead6a16 Mon Sep 17 00:00:00 2001 From: dhtdht020 Date: Fri, 22 Mar 2024 20:28:26 +0200 Subject: [PATCH] Removed experimental themes support --- assets/themes/oscdark.qss | 182 -------------------------------------- gui/ui_united.py | 8 -- gui/united.ui | 12 --- oscdl.spec | 1 - xosc_dl.py | 22 +---- 5 files changed, 2 insertions(+), 223 deletions(-) delete mode 100644 assets/themes/oscdark.qss diff --git a/assets/themes/oscdark.qss b/assets/themes/oscdark.qss deleted file mode 100644 index 7e4eee2..0000000 --- a/assets/themes/oscdark.qss +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Beta: Official osc-dl dark theme stylesheet - * Color Palette: https://colorhunt.co/palette/643 - */ - -[accessibleName="centralcontainer"] { - background-color: #26282b; -} - -QGroupBox { - color: white; - background-color: #26282b; - border: #26282b; - padding-top: 15px; -} - -QLabel { - color: white; -} - -QLineEdit { - background-color: #555a63; - color: white; - border-style: hidden; -} - -QPushButton { - background-color: #235347; - color: white; - border-style: hidden; - padding: 5%; -} - -QPushButton:hover { - background-color: #307060; -} - -QTextBrowser { - background-color: transparent; - border-style: hidden; - color: white; -} - -QStatusBar { - background-color: #26282b; - color: white; -} - -QListWidget { - background-color: #353941; - border-style: hidden; - color: white; -} - -QMenuBar { - background-color: #353941; - color: white; -} - -QMenuBar::item { - color: rgba(255,255,255,.6);; - background-color: #353941; -} - -QMenuBar::item:selected { - color: white; -} - -QMessageBox { - background-color: #26282b; -} - -QInputDialog { - background-color: #26282b; -} - -QCheckBox { - color: white; -} - - -[accessibleName="tabcontent"] { - background-color: #353941; -} - -QTabWidget::pane { - border: 0px solid black; - background: #353941; -} - -QTabWidget::tab-bar:top { - top: 1px; -} - -QTabWidget::tab-bar:bottom { - bottom: 0px; -} - -QTabWidget::tab-bar:left { - right: 1px; -} - -QTabWidget::tab-bar:right { - left: 1px; -} - -QTabBar::tab:selected { - background: #353941; - color: white; -} - -QTabBar::tab:!selected { - background: #555A63; - color: white; -} - -QTabBar::tab:!selected:hover { - background: #999; -} - -QTabBar::tab:top:!selected { - margin-top: 3px; -} - -QTabBar::tab:bottom:!selected { - margin-bottom: 3px; -} - -QTabBar::tab:top, QTabBar::tab:bottom { - min-width: 8ex; - margin-right: -1px; - padding: 5px 10px 5px 10px; -} - -QTabBar::tab:top:selected { - border-bottom-color: none; -} - -QTabBar::tab:bottom:selected { - border-top-color: none; -} - -QTabBar::tab:top:last, QTabBar::tab:bottom:last, -QTabBar::tab:top:only-one, QTabBar::tab:bottom:only-one { - margin-right: 0; -} - -QTabBar::tab:left:!selected { - margin-right: 3px; -} - -QTabBar::tab:right:!selected { - margin-left: 3px; -} - -QTabBar::tab:left, QTabBar::tab:right { - min-height: 8ex; - margin-bottom: -1px; - padding: 10px 5px 10px 5px; -} - -QTabBar::tab:left:selected { - border-left-color: none; -} - -QTabBar::tab:right:selected { - border-right-color: none; -} - -QTabBar::tab:left:last, QTabBar::tab:right:last, -QTabBar::tab:left:only-one, QTabBar::tab:right:only-one { - margin-bottom: 0; -} - -QProgressBar { - color: white; -} - -QComboBox { - background-color: #555A63; - border: 1px solid black; -} diff --git a/gui/ui_united.py b/gui/ui_united.py index e8227f3..5d1e75f 100644 --- a/gui/ui_united.py +++ b/gui/ui_united.py @@ -42,8 +42,6 @@ def setupUi(self, MainWindow): self.actionCheck_for_Updates.setObjectName(u"actionCheck_for_Updates") self.actionRefresh = QAction(MainWindow) self.actionRefresh.setObjectName(u"actionRefresh") - self.actionSelect_Theme = QAction(MainWindow) - self.actionSelect_Theme.setObjectName(u"actionSelect_Theme") self.actionIcons_provided_by = QAction(MainWindow) self.actionIcons_provided_by.setObjectName(u"actionIcons_provided_by") self.actionIcons_provided_by.setEnabled(False) @@ -442,8 +440,6 @@ def setupUi(self, MainWindow): self.menuAbout.setObjectName(u"menuAbout") self.menuDebug = QMenu(self.menubar) self.menuDebug.setObjectName(u"menuDebug") - self.menuExperimental = QMenu(self.menuDebug) - self.menuExperimental.setObjectName(u"menuExperimental") MainWindow.setMenuBar(self.menubar) self.statusBar = QStatusBar(MainWindow) self.statusBar.setObjectName(u"statusBar") @@ -457,9 +453,7 @@ def setupUi(self, MainWindow): self.menuDebug.addAction(self.actionRefresh) self.menuDebug.addAction(self.actionCopy_Direct_Link) self.menuDebug.addSeparator() - self.menuDebug.addAction(self.menuExperimental.menuAction()) self.menuDebug.addAction(self.actionCheck_for_Updates) - self.menuExperimental.addAction(self.actionSelect_Theme) self.retranslateUi(MainWindow) @@ -478,7 +472,6 @@ def retranslateUi(self, MainWindow): #if QT_CONFIG(shortcut) self.actionRefresh.setShortcut(QCoreApplication.translate("MainWindow", u"F5", None)) #endif // QT_CONFIG(shortcut) - self.actionSelect_Theme.setText(QCoreApplication.translate("MainWindow", u"Select Theme", None)) self.actionIcons_provided_by.setText(QCoreApplication.translate("MainWindow", u"Icons provided by https://icons8.com", None)) self.actionCopy_Direct_Link.setText(QCoreApplication.translate("MainWindow", u"Copy Direct Link to App", None)) self.actionDeveloper_Profile.setText(QCoreApplication.translate("MainWindow", u"Developer Profile", None)) @@ -541,6 +534,5 @@ def retranslateUi(self, MainWindow): self.WiiLoadButton.setText(QCoreApplication.translate("MainWindow", u"Send to Wii", None)) self.menuAbout.setTitle(QCoreApplication.translate("MainWindow", u"About", None)) self.menuDebug.setTitle(QCoreApplication.translate("MainWindow", u"Options", None)) - self.menuExperimental.setTitle(QCoreApplication.translate("MainWindow", u"Experimental", None)) # retranslateUi diff --git a/gui/united.ui b/gui/united.ui index 7419730..dfa8c04 100644 --- a/gui/united.ui +++ b/gui/united.ui @@ -879,16 +879,9 @@ color: rgb(255, 255, 255); Options - - - Experimental - - - - @@ -917,11 +910,6 @@ color: rgb(255, 255, 255); F5 - - - Select Theme - - false diff --git a/oscdl.spec b/oscdl.spec index 4d7e6dd..1620ea6 100644 --- a/oscdl.spec +++ b/oscdl.spec @@ -9,7 +9,6 @@ a = Analysis(['oscdl.py'], ('assets/gui/icons/platforms/*.png', './assets/gui/icons/platforms/'), ('assets/gui/icons/category/*.png', './assets/gui/icons/category/'), ('assets/gui/*.png', './assets/gui/'), - ('assets/themes/*.qss', './assets/themes/'), ('assets/gui/icons/*.gif', './assets/gui/icons/'), ('assets/gui/icons/*.png', './assets/gui/icons/'), ('assets/gui/icons/status/*.png', './assets/gui/icons/status')], diff --git a/xosc_dl.py b/xosc_dl.py index e2d31c5..dc8c530 100644 --- a/xosc_dl.py +++ b/xosc_dl.py @@ -3,8 +3,6 @@ import time import zipfile from datetime import datetime -from os import listdir -from os.path import isfile, join import os import sys @@ -20,8 +18,8 @@ from PIL import Image from PySide6 import QtGui, QtCore from PySide6.QtCore import Qt, QObject, QSize, QEvent -from PySide6.QtGui import QIcon, QColor, QPixmap, QMovie, QDesktopServices -from PySide6.QtWidgets import QApplication, QMainWindow, QInputDialog, QLineEdit, QMessageBox, \ +from PySide6.QtGui import QIcon, QColor, QPixmap, QMovie +from PySide6.QtWidgets import QApplication, QMainWindow, QLineEdit, QMessageBox, \ QListWidgetItem, QFileDialog import gui.ui_united @@ -78,8 +76,6 @@ def __init__(self, app=None, splash=None, test_mode=False): self.ui.actionRefresh.setIcon(QIcon(resource_path("assets/gui/icons/refresh.png"))) # OPTIONS self.ui.actionCopy_Direct_Link.setIcon(QIcon(resource_path("assets/gui/icons/copy-link.png"))) - self.ui.menuExperimental.setIcon(QIcon(resource_path("assets/gui/icons/experimental.png"))) - self.ui.actionSelect_Theme.setIcon(QIcon(resource_path("assets/gui/icons/theme.png"))) # CATEGORIES COMBOBOX self.ui.CategoriesComboBox.setItemIcon(1, QIcon(resource_path("assets/gui/icons/category/utility.png"))) @@ -174,7 +170,6 @@ def assign_initial_actions(self): # -- Options self.ui.actionCheck_for_Updates.triggered.connect(partial(self.check_for_updates_action)) self.ui.actionRefresh.triggered.connect(partial(self.repopulate)) - self.ui.actionSelect_Theme.triggered.connect(self.select_theme_action) # When user selects a different homebrew from the list def selection_changed(self): @@ -843,19 +838,6 @@ def return_to_all_apps_btn(self): # count apps self.search_bar() - # Select theme dialog - def select_theme_action(self): - path = resource_path("assets/themes") - theme_files = [f for f in listdir(path) if isfile(join(path, f))] - - theme, ok = QInputDialog.getItem(self, "Experimental: Select Theme", - "Choose theme to use from the list", theme_files, 0, False) - if not ok: - return - - with open(resource_path(f"assets/themes/{theme}"), "r") as fh: - self.setStyleSheet(fh.read()) - # load all icons from zip def download_app_icons(self): # Debug info