2 Commits

Author SHA1 Message Date
ca036a5576 LiquidGUI [1.1.3.0]
- Added emoji to value text.
- Refactored label styling.
2024-07-14 15:24:26 +01:00
39c8fe48c8 LiquidGUI [1.1.2.0]
- Support for light mode.
2024-07-14 00:22:27 +01:00
7 changed files with 62 additions and 42 deletions
+3 -1
View File
@@ -17,4 +17,6 @@ class MinMaxCurrent:
if self.cur < self.min: if self.cur < self.min:
self.min = _cur self.min = _cur
return f"Current: {self.cur}{_unit}\n(Min: {self.min}{_unit} / Max: {self.max}{_unit})" return (f"🟢 Current: {self.cur}{_unit}\n"
f"❄️ Min: {self.min}{_unit} / "
f"☀️ Max: {self.max}{_unit}")
+4 -4
View File
@@ -7,8 +7,8 @@ VSVersionInfo(
ffi=FixedFileInfo( ffi=FixedFileInfo(
# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4) # filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)
# Set not needed items to zero 0. Must always contain 4 elements. # Set not needed items to zero 0. Must always contain 4 elements.
filevers=(1,1,1,0), filevers=(1,1,3,0),
prodvers=(1,1,1,0), prodvers=(1,1,3,0),
# Contains a bitmask that specifies the valid bits 'flags'r # Contains a bitmask that specifies the valid bits 'flags'r
mask=0x3f, mask=0x3f,
# Contains a bitmask that specifies the Boolean attributes of the file. # Contains a bitmask that specifies the Boolean attributes of the file.
@@ -32,12 +32,12 @@ VSVersionInfo(
u'040904B0', u'040904B0',
[StringStruct(u'CompanyName', u'Fil Sapia'), [StringStruct(u'CompanyName', u'Fil Sapia'),
StringStruct(u'FileDescription', u'LiquidGUI'), StringStruct(u'FileDescription', u'LiquidGUI'),
StringStruct(u'FileVersion', u'1.1.1.0'), StringStruct(u'FileVersion', u'1.1.3.0'),
StringStruct(u'InternalName', u'LiquidGUI'), StringStruct(u'InternalName', u'LiquidGUI'),
StringStruct(u'LegalCopyright', u'© Fil Sapia. All rights reserved.'), StringStruct(u'LegalCopyright', u'© Fil Sapia. All rights reserved.'),
StringStruct(u'OriginalFilename', u'LiquidGUI.exe'), StringStruct(u'OriginalFilename', u'LiquidGUI.exe'),
StringStruct(u'ProductName', u'LiquidGUI'), StringStruct(u'ProductName', u'LiquidGUI'),
StringStruct(u'ProductVersion', u'1.1.1.0')]) StringStruct(u'ProductVersion', u'1.1.3.0')])
]), ]),
VarFileInfo([VarStruct(u'Translation', [0, 1200, 1033, 1252])]) VarFileInfo([VarStruct(u'Translation', [0, 1200, 1033, 1252])])
] ]
+16 -16
View File
@@ -4,11 +4,11 @@ import win32mica
from PySide6.QtWidgets import QApplication, QMainWindow, QWidget, QVBoxLayout, QLabel, QProgressBar, QPushButton from PySide6.QtWidgets import QApplication, QMainWindow, QWidget, QVBoxLayout, QLabel, QProgressBar, QPushButton
from PySide6.QtCore import Qt, QTimer, QThreadPool from PySide6.QtCore import Qt, QTimer, QThreadPool
from PySide6.QtGui import QFont, QIcon from PySide6.QtGui import QFont, QIcon
import darkdetect
# Internal Imports # Internal Imports
from LiquidCTL_Helper import LiquidCTL_Helper from LiquidCTL_Helper import LiquidCTL_Helper
from MessageHandler import MessageHandler from MessageHandler import MessageHandler
from styles.SubLabel import SubLabel from styles import Labels
from styles.SubLabelValue import SubLabelValue
import common import common
import resources, pkg_resources.extern import resources, pkg_resources.extern
@@ -18,41 +18,38 @@ class MainWindow(QMainWindow):
def __init__(self, lctl): def __init__(self, lctl):
super(MainWindow, self).__init__() super(MainWindow, self).__init__()
self.setWindowTitle("LiquidGUI (v.1.1.1.0)") self.setWindowTitle("LiquidGUI (v.1.1.3.0)")
self.setFixedSize(450, 450) self.setFixedSize(450, 500)
self.lctl = lctl self.lctl = lctl
# Widgets ########################################## # Widgets ##########################################
self.lbl_device_name = QLabel(font=QFont("Calibri", self.lbl_device_name = Labels.MainLabel()
18,
weight=QFont.Weight.Bold),
alignment=Qt.AlignmentFlag.AlignCenter)
self.lbl_temp = SubLabel(value="💧 Liquid Temperature:") self.lbl_temp = Labels.SubLabel(value="💧 Liquid Temperature:")
self.min_max_cur_temp = common.MinMaxCurrent() self.min_max_cur_temp = common.MinMaxCurrent()
self.prg_temp = QProgressBar(textVisible=False, self.prg_temp = QProgressBar(textVisible=False,
minimum=0, minimum=0,
maximum=50) maximum=50)
self.lbl_value_prg_temp = SubLabelValue() self.lbl_value_prg_temp = Labels.SubLabelValue()
self.lbl_fanspeed = SubLabel(value="🍃 Fan Speed:") self.lbl_fanspeed = Labels.SubLabel(value="🍃 Fan Speed:")
self.min_max_cur_fanspeed = common.MinMaxCurrent() self.min_max_cur_fanspeed = common.MinMaxCurrent()
self.prg_fanspeed = QProgressBar(textVisible=False, self.prg_fanspeed = QProgressBar(textVisible=False,
minimum=520, minimum=520,
maximum=1700) maximum=1700)
self.lbl_value_prg_fanspeed = SubLabelValue() self.lbl_value_prg_fanspeed = Labels.SubLabelValue()
self.lbl_pumpspeed = SubLabel(value="⛽ Pump Speed:") self.lbl_pumpspeed = Labels.SubLabel(value="⛽ Pump Speed:")
self.min_max_cur_pumpspeed = common.MinMaxCurrent() self.min_max_cur_pumpspeed = common.MinMaxCurrent()
self.prg_pumpspeed = QProgressBar(textVisible=False, self.prg_pumpspeed = QProgressBar(textVisible=False,
minimum=1900, minimum=1900,
maximum=2700) maximum=2700)
self.lbl_value_prg_pumpspeed = SubLabelValue() self.lbl_value_prg_pumpspeed = Labels.SubLabelValue()
self.btn_reset_min_max = QPushButton("Reset Min/Max") self.btn_reset_min_max = QPushButton("Reset Min/Max")
self.btn_reset_min_max.clicked.connect(self.on_reset_min_max) self.btn_reset_min_max.clicked.connect(self.on_reset_min_max)
self.lbl_fwvers = SubLabelValue() self.lbl_fwvers = Labels.SubLabelValue()
# Layout ########################################## # Layout ##########################################
widget = QWidget(self) widget = QWidget(self)
@@ -127,7 +124,10 @@ def main():
MessageHandler().ShowNoDevicesFoundError() MessageHandler().ShowNoDevicesFoundError()
sys.exit(1) sys.exit(1)
else: else:
win32mica.ApplyMica(window.winId(), win32mica.MICAMODE.DARK) if darkdetect.isDark():
win32mica.ApplyMica(window.winId(), win32mica.MICAMODE.DARK)
elif darkdetect.isLight():
win32mica.ApplyMica(window.winId(), win32mica.MICAMODE.LIGHT)
window.show() window.show()
app.exec() app.exec()
+12
View File
@@ -0,0 +1,12 @@
from setuptools import setup
setup(
name='LiquidGUI',
version='1.1.3.0',
packages=[''],
url='',
license='',
author='Fil Sapia',
author_email='filippo333@gmail.com',
description=''
)
+27
View File
@@ -0,0 +1,27 @@
from PySide6.QtWidgets import QLabel
from PySide6.QtGui import QFont
from PySide6.QtCore import Qt
class MainLabel(QLabel):
def __init__(self):
super().__init__()
self.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.setFont(QFont("Calibri",
18,
weight=QFont.Weight.ExtraBold))
class SubLabel(QLabel):
""" Formatting for sub-labels. """
def __init__(self, value):
super().__init__()
self.setFont(QFont("Calibri", 12, weight=QFont.Weight.Thin))
self.setText(value)
class SubLabelValue(QLabel):
""" Formatting for values. """
def __init__(self):
super().__init__()
self.setAlignment(Qt.AlignmentFlag.AlignRight)
self.setFont(QFont("Cascadia Code", 8))
-11
View File
@@ -1,11 +0,0 @@
from PySide6.QtWidgets import QLabel
from PySide6.QtGui import QFont
class SubLabel(QLabel):
""" Formatting for sub-labels. """
def __init__(self, value):
super().__init__()
self.setFont(QFont("Calibri", 12, weight=QFont.Weight.Bold))
self.setText(value)
-10
View File
@@ -1,10 +0,0 @@
from PySide6.QtWidgets import QLabel
from PySide6.QtGui import QFont
from PySide6.QtCore import Qt
class SubLabelValue(QLabel):
""" Formatting for values. """
def __init__(self):
super().__init__()
self.setAlignment(Qt.AlignmentFlag.AlignRight)
self.setFont(QFont("Cascadia Code", 8))