LiquidGUI [1.3.0.0]
- Lots of refactoring.
This commit is contained in:
@@ -16,14 +16,16 @@ import common
|
||||
from MessageHandler import MessageHandler
|
||||
## Platform Imports #########################################
|
||||
import globals
|
||||
from sys_vitals_helper import SysVitals_Helper, Component
|
||||
from vitals_helper import Component
|
||||
from styles import Labels
|
||||
if globals.os == "Windows":
|
||||
from LiquidCTL_Helper_Windows import LiquidCTL_Helper
|
||||
from liquidctl_helper_windows import LiquidCTL_Helper
|
||||
from vitals_helper import VitalsHelperWindows as svh
|
||||
import win32mica # type: ignore
|
||||
import darkdetect # type: ignore
|
||||
elif globals.os == "Linux":
|
||||
from LiquidCTL_Helper_Linux import LiquidCTL_Helper
|
||||
from liquidctl_helper_linux import LiquidCTL_Helper
|
||||
from vitals_helper import VitalsHelperLinux as svh
|
||||
|
||||
|
||||
|
||||
@@ -36,7 +38,7 @@ class MainWindow(QMainWindow):
|
||||
self.setFixedSize(450, 700)
|
||||
|
||||
self.lctl = lctl
|
||||
self.svh = SysVitals_Helper()
|
||||
self.svh = svh()
|
||||
|
||||
# Widgets ##########################################
|
||||
self.lbl_device_name = Labels.MainLabel()
|
||||
@@ -122,10 +124,10 @@ class MainWindow(QMainWindow):
|
||||
|
||||
self.lbl_value_prg_cpu_temp.setText(
|
||||
self.min_max_cur_cpu_temp.builder(
|
||||
self.svh.GetTemps(Component.CPU_AMD), "°C"))
|
||||
self.svh.get_temps(Component.lin_cpu_amd), "°C"))
|
||||
|
||||
self.prg_cpu_temp.setValue(
|
||||
self.svh.GetTemps(Component.CPU_AMD))
|
||||
self.svh.get_temps(Component.lin_cpu_amd))
|
||||
|
||||
self.lbl_device_name.setText(
|
||||
self.lctl.device_name)
|
||||
@@ -154,10 +156,6 @@ class MainWindow(QMainWindow):
|
||||
if self.lctl.device_fwVers is not None:
|
||||
self.lbl_fwvers.setText(f"Firmware: v{self.lctl.device_fwVers}")
|
||||
|
||||
# print(f"CPU: {self.svh.GetTemps(Component.CPU_AMD)}°C")
|
||||
# print(f"GPU: {self.svh.GetTemps(Component.GPU_AMD)}°C")
|
||||
# print(f"MOBO: {self.svh.GetTemps(Component.MOBO_ASUS)}°C")
|
||||
|
||||
|
||||
def main():
|
||||
""" Initialize application and setup window parameters. """
|
||||
@@ -169,9 +167,9 @@ def main():
|
||||
icon = QIcon(":/icons/LiquidGUI.ico")
|
||||
|
||||
if darkdetect.isDark():
|
||||
win32mica.ApplyMica(window.winId(), win32mica.MICAMODE.DARK)
|
||||
win32mica.ApplyMica(window.winId(), win32mica.MicaTheme.DARK)
|
||||
elif darkdetect.isLight():
|
||||
win32mica.ApplyMica(window.winId(), win32mica.MICAMODE.LIGHT)
|
||||
win32mica.ApplyMica(window.winId(), win32mica.MicaTheme.LIGHT)
|
||||
|
||||
elif globals.os == "Linux":
|
||||
app.setDesktopFileName("LiquidGUI")
|
||||
|
||||
Reference in New Issue
Block a user