LiquidGUI [1.2.0.0]
- Linux Support.
This commit is contained in:
@@ -24,7 +24,7 @@ if globals.os == "Windows":
|
||||
elif globals.os == "Linux":
|
||||
from LiquidCTL_Helper_Linux import LiquidCTL_Helper
|
||||
from styles import Labels_Linux as Labels
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
class MainWindow(QMainWindow):
|
||||
@@ -32,7 +32,7 @@ class MainWindow(QMainWindow):
|
||||
|
||||
def __init__(self, lctl):
|
||||
super(MainWindow, self).__init__()
|
||||
self.setWindowTitle("LiquidGUI (v.1.2.0.0) DEV")
|
||||
self.setWindowTitle("LiquidGUI (v.1.2.0.0)")
|
||||
self.setFixedSize(450, 500)
|
||||
|
||||
self.lctl = lctl
|
||||
@@ -126,19 +126,23 @@ class MainWindow(QMainWindow):
|
||||
def main():
|
||||
""" Initialize application and setup window parameters. """
|
||||
app = QApplication(sys.argv)
|
||||
icon = QIcon(":/icons/LiquidGUI.ico")
|
||||
app.setWindowIcon(icon)
|
||||
|
||||
window = MainWindow(LiquidCTL_Helper())
|
||||
window.setWindowIcon(icon)
|
||||
|
||||
if globals.platform == "Windows":
|
||||
if globals.os == "Windows":
|
||||
window.setAttribute(Qt.WidgetAttribute.WA_TranslucentBackground)
|
||||
icon = QIcon(":/icons/LiquidGUI.ico")
|
||||
|
||||
if darkdetect.isDark():
|
||||
win32mica.ApplyMica(window.winId(), win32mica.MICAMODE.DARK)
|
||||
elif darkdetect.isLight():
|
||||
win32mica.ApplyMica(window.winId(), win32mica.MICAMODE.LIGHT)
|
||||
|
||||
elif globals.os == "Linux":
|
||||
app.setDesktopFileName("LiquidGUI")
|
||||
icon = QIcon(":/icons/LiquidGUI.png")
|
||||
|
||||
app.setWindowIcon(icon)
|
||||
|
||||
# Show error and quit app if no devices are found
|
||||
if window.lctl.TestConnectionState():
|
||||
MessageHandler().ShowNoDevicesFoundError()
|
||||
|
||||
Reference in New Issue
Block a user