LiquidGUI [1.1.3.0]

- Added emoji to value text.
- Refactored label styling.
This commit is contained in:
2024-07-14 15:24:26 +01:00
parent 39c8fe48c8
commit ca036a5576
7 changed files with 57 additions and 41 deletions
+3 -1
View File
@@ -17,4 +17,6 @@ class MinMaxCurrent:
if self.cur < self.min:
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(
# 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.
filevers=(1,1,2,0),
prodvers=(1,1,2,0),
filevers=(1,1,3,0),
prodvers=(1,1,3,0),
# Contains a bitmask that specifies the valid bits 'flags'r
mask=0x3f,
# Contains a bitmask that specifies the Boolean attributes of the file.
@@ -32,12 +32,12 @@ VSVersionInfo(
u'040904B0',
[StringStruct(u'CompanyName', u'Fil Sapia'),
StringStruct(u'FileDescription', u'LiquidGUI'),
StringStruct(u'FileVersion', u'1.1.2.0'),
StringStruct(u'FileVersion', u'1.1.3.0'),
StringStruct(u'InternalName', u'LiquidGUI'),
StringStruct(u'LegalCopyright', u'© Fil Sapia. All rights reserved.'),
StringStruct(u'OriginalFilename', u'LiquidGUI.exe'),
StringStruct(u'ProductName', u'LiquidGUI'),
StringStruct(u'ProductVersion', u'1.1.2.0')])
StringStruct(u'ProductVersion', u'1.1.3.0')])
]),
VarFileInfo([VarStruct(u'Translation', [0, 1200, 1033, 1252])])
]
+11 -15
View File
@@ -8,8 +8,7 @@ import darkdetect
# Internal Imports
from LiquidCTL_Helper import LiquidCTL_Helper
from MessageHandler import MessageHandler
from styles.SubLabel import SubLabel
from styles.SubLabelValue import SubLabelValue
from styles import Labels
import common
import resources, pkg_resources.extern
@@ -19,41 +18,38 @@ class MainWindow(QMainWindow):
def __init__(self, lctl):
super(MainWindow, self).__init__()
self.setWindowTitle("LiquidGUI (v.1.1.2.0)")
self.setFixedSize(450, 450)
self.setWindowTitle("LiquidGUI (v.1.1.3.0)")
self.setFixedSize(450, 500)
self.lctl = lctl
# Widgets ##########################################
self.lbl_device_name = QLabel(font=QFont("Calibri",
18,
weight=QFont.Weight.Bold),
alignment=Qt.AlignmentFlag.AlignCenter)
self.lbl_device_name = Labels.MainLabel()
self.lbl_temp = SubLabel(value="💧 Liquid Temperature:")
self.lbl_temp = Labels.SubLabel(value="💧 Liquid Temperature:")
self.min_max_cur_temp = common.MinMaxCurrent()
self.prg_temp = QProgressBar(textVisible=False,
minimum=0,
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.prg_fanspeed = QProgressBar(textVisible=False,
minimum=520,
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.prg_pumpspeed = QProgressBar(textVisible=False,
minimum=1900,
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.clicked.connect(self.on_reset_min_max)
self.lbl_fwvers = SubLabelValue()
self.lbl_fwvers = Labels.SubLabelValue()
# Layout ##########################################
widget = QWidget(self)
+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))