LiquidGUI [1.2.0.0]
- Linux Support
This commit is contained in:
@@ -1,20 +1,31 @@
|
||||
# External Dependencies
|
||||
# External Dependencies v####################################
|
||||
import sys
|
||||
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
|
||||
import common
|
||||
import globals
|
||||
from MessageHandler import MessageHandler
|
||||
from styles import Labels
|
||||
from PySide6.QtWidgets import (QApplication,
|
||||
QMainWindow,
|
||||
QWidget,
|
||||
QVBoxLayout,
|
||||
QProgressBar,
|
||||
QPushButton)
|
||||
from PySide6.QtCore import (Qt,
|
||||
QTimer,
|
||||
QThreadPool)
|
||||
from PySide6.QtGui import QIcon
|
||||
## Internal Imports #########################################
|
||||
import resources
|
||||
import common
|
||||
from MessageHandler import MessageHandler
|
||||
## Platform Imports #########################################
|
||||
import globals
|
||||
if globals.os == "Windows":
|
||||
from LiquidCTL_Helper_Windows import LiquidCTL_Helper
|
||||
from styles import Labels_Windows as Labels
|
||||
import win32mica
|
||||
import darkdetect
|
||||
elif globals.os == "Linux":
|
||||
from LiquidCTL_Helper_Linux import LiquidCTL_Helper
|
||||
from styles import Labels_Linux as Labels
|
||||
|
||||
|
||||
|
||||
class MainWindow(QMainWindow):
|
||||
""" Main application window. """
|
||||
@@ -120,8 +131,6 @@ def main():
|
||||
|
||||
window = MainWindow(LiquidCTL_Helper())
|
||||
window.setWindowIcon(icon)
|
||||
if globals.platform == "Windows":
|
||||
window.setAttribute(Qt.WidgetAttribute.WA_TranslucentBackground)
|
||||
|
||||
# Show error and quit app if no devices are found
|
||||
if window.lctl.TestConnectionState():
|
||||
@@ -129,6 +138,7 @@ def main():
|
||||
sys.exit(1)
|
||||
else:
|
||||
if globals.platform == "Windows":
|
||||
window.setAttribute(Qt.WidgetAttribute.WA_TranslucentBackground)
|
||||
if darkdetect.isDark():
|
||||
win32mica.ApplyMica(window.winId(), win32mica.MICAMODE.DARK)
|
||||
elif darkdetect.isLight():
|
||||
|
||||
Reference in New Issue
Block a user