Added Dark OS detection + Dark Theme

This commit is contained in:
Pakobbix committed 2023-05-15 16:52:16 +02:00
1 parent 44227e2627
commit 8ca048e94d
2 files changed
+6 -2

No files matched your search

+3 -1
View File
@@ -1,4 +1,4 @@
import sys, gpustat, os, json, subprocess, platform, psutil, urllib.request, re, requests
import sys, gpustat, os, json, subprocess, platform, psutil, urllib.request, re, requests, darkdetect, qdarktheme
from PyQt5.QtWidgets import QApplication, QToolBar, QMessageBox, QAction, QProgressBar, QMainWindow, QLabel, QVBoxLayout, QComboBox, QSlider, QCheckBox, QLineEdit, QFileDialog, QPushButton, QWidget, QListWidget, QListWidgetItem, QToolTip, QGridLayout, QRadioButton, QFrame, QDialog
from PyQt5.QtCore import Qt
@@ -973,5 +973,7 @@ class MainWindow(QMainWindow):
if __name__ == "__main__":
app = QApplication(sys.argv)
main_window = MainWindow()
if darkdetect.isDark():
app.setStyleSheet(qdarktheme.load_stylesheet())
main_window.show()
sys.exit(app.exec_())
+3 -1
View File
@@ -1,3 +1,5 @@
PyQt5
gpustat
psutil
psutil
pyqtdarktheme
darkdetect