From beda45970a3740480b32a7472c31f1fb0648d477 Mon Sep 17 00:00:00 2001 From: Alexander Chernoskutov Date: Wed, 15 Jan 2025 23:00:48 +0400 Subject: [PATCH] Fix: do not limit displayed RMP value --- README.md | 3 +++ installer-inno-config.iss | 2 +- src/GUI/AppGUI.py | 2 +- src/GUI/QGauge.py | 22 ++++++---------------- 4 files changed, 11 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index b309f0f..5eb699a 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,9 @@ Big thanks to the amazing people who have contributed to the project: ## Changelog +- 1.6.4 + - Fix: do not limit displayed RMP value + - 1.6.3 - Add tray icon tooltip (show current temperatures, fan speeds, thermal mode) - Add tray icon G mode indication diff --git a/installer-inno-config.iss b/installer-inno-config.iss index 4bd89f9..2f0ec5e 100644 --- a/installer-inno-config.iss +++ b/installer-inno-config.iss @@ -2,7 +2,7 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "Thermal Control Center" -#define MyAppVersion "1.6.3" +#define MyAppVersion "1.6.4" #define MyAppPublisher "AlexIII" #define MyAppURL "https://github.com/AlexIII/tcc-g15" #define MyAppExeName "tcc-g15.exe" diff --git a/src/GUI/AppGUI.py b/src/GUI/AppGUI.py index 47a8394..6d0e675 100644 --- a/src/GUI/AppGUI.py +++ b/src/GUI/AppGUI.py @@ -100,7 +100,7 @@ class TCC_GUI(QtWidgets.QWidget): FAILSAFE_TRIGGER_DELAY_SEC = 8 FAILSAFE_RESET_AFTER_TEMP_IS_OK_FOR_SEC = 60 APP_NAME = "Thermal Control Center for Dell G15" - APP_VERSION = "1.6.3" + APP_VERSION = "1.6.4" APP_DESCRIPTION = "This app is an open-source replacement for Alienware Control Center " APP_URL = "github.com/AlexIII/tcc-g15" diff --git a/src/GUI/QGauge.py b/src/GUI/QGauge.py index b075008..4970dde 100644 --- a/src/GUI/QGauge.py +++ b/src/GUI/QGauge.py @@ -14,33 +14,23 @@ def __init__(self, parent: Optional[QtWidgets.QWidget] = None) -> None: def setColorScheme(self, colorScheme: dict[int, str]) -> None: self._colorScheme = colorScheme - self._onValUpd() - self._connectValUp() + self._updateColor() def createLabel(self) -> QtWidgets.QLabel: if not self._extLabel: self._extLabel = QtWidgets.QLabel() - self._connectValUp() - self._onValUpd() return self._extLabel - def _connectValUp(self): - if not self._updColor_connected: - self.valueChanged.connect(self._onValUpd) - self._updColor_connected = True - def setValue(self, value: int): + # Update label + if self._extLabel: + self._extLabel.setText(self.format().replace('%v', str(value))) if value < self.minimum(): value = self.minimum() if value > self.maximum(): value = self.maximum() super().setValue(value) + self._updateColor() - @QtCore.Slot() - def _onValUpd(self): - # Update label - if self._extLabel: - self._extLabel.setText(self.text()) - - # Update color + def _updateColor(self): if self._colorScheme: val = self.value() color = '#000'