LiquidGUI [1.2.0.0]
- Linux Support
This commit is contained in:
@@ -1,24 +1,27 @@
|
||||
# External Dependencies
|
||||
import sys
|
||||
import win32mica
|
||||
from PySide6.QtWidgets import QApplication, QMainWindow, QWidget, QVBoxLayout, QLabel, QProgressBar, QPushButton
|
||||
from PySide6.QtCore import Qt, QTimer, QThreadPool
|
||||
from PySide6.QtGui import QFont, QIcon
|
||||
import darkdetect
|
||||
# Internal Imports
|
||||
from LiquidCTL_Helper import LiquidCTL_Helper
|
||||
import common
|
||||
import globals
|
||||
from MessageHandler import MessageHandler
|
||||
from styles import Labels
|
||||
import common
|
||||
import resources, pkg_resources.extern
|
||||
|
||||
import resources
|
||||
if globals.os == "Windows":
|
||||
from LiquidCTL_Helper_Windows import LiquidCTL_Helper
|
||||
import win32mica
|
||||
elif globals.os == "Linux":
|
||||
from LiquidCTL_Helper_Linux import LiquidCTL_Helper
|
||||
|
||||
class MainWindow(QMainWindow):
|
||||
""" Main application window. """
|
||||
|
||||
def __init__(self, lctl):
|
||||
super(MainWindow, self).__init__()
|
||||
self.setWindowTitle("LiquidGUI (v.1.1.3.0)")
|
||||
self.setWindowTitle("LiquidGUI (v.1.2.0.0) DEV")
|
||||
self.setFixedSize(450, 500)
|
||||
|
||||
self.lctl = lctl
|
||||
@@ -117,17 +120,19 @@ def main():
|
||||
|
||||
window = MainWindow(LiquidCTL_Helper())
|
||||
window.setWindowIcon(icon)
|
||||
window.setAttribute(Qt.WidgetAttribute.WA_TranslucentBackground)
|
||||
if globals.platform == "Windows":
|
||||
window.setAttribute(Qt.WidgetAttribute.WA_TranslucentBackground)
|
||||
|
||||
# Show error and quit app if no devices are found
|
||||
if window.lctl.TestConnectionState():
|
||||
MessageHandler().ShowNoDevicesFoundError()
|
||||
sys.exit(1)
|
||||
else:
|
||||
if darkdetect.isDark():
|
||||
win32mica.ApplyMica(window.winId(), win32mica.MICAMODE.DARK)
|
||||
elif darkdetect.isLight():
|
||||
win32mica.ApplyMica(window.winId(), win32mica.MICAMODE.LIGHT)
|
||||
if globals.platform == "Windows":
|
||||
if darkdetect.isDark():
|
||||
win32mica.ApplyMica(window.winId(), win32mica.MICAMODE.DARK)
|
||||
elif darkdetect.isLight():
|
||||
win32mica.ApplyMica(window.winId(), win32mica.MICAMODE.LIGHT)
|
||||
|
||||
window.show()
|
||||
app.exec()
|
||||
|
||||
Reference in New Issue
Block a user