From e4bf189b167e2e5df587807bb98d9aae27ca0379 Mon Sep 17 00:00:00 2001 From: Loren Eteval Date: Wed, 9 Sep 2026 13:38:54 +0800 Subject: [PATCH] Synchronize TUN mode label availability Signed-off-by: Loren Eteval --- Furious/Qt/StyleSheets/Base.py | 3 ++- Furious/Window/HomePage.py | 1 + Furious/Window/SettingsPage.py | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Furious/Qt/StyleSheets/Base.py b/Furious/Qt/StyleSheets/Base.py index ac1a472..27c4c7f 100644 --- a/Furious/Qt/StyleSheets/Base.py +++ b/Furious/Qt/StyleSheets/Base.py @@ -47,7 +47,8 @@ def baseStyleSheet(palette): background-color: transparent; }} - QLabel:disabled {{ + QLabel:disabled, + QLabel#SettingsCardTitle:disabled {{ color: {palette['disabled']}; }} diff --git a/Furious/Window/HomePage.py b/Furious/Window/HomePage.py index 87289ac..64dc06d 100644 --- a/Furious/Window/HomePage.py +++ b/Furious/Window/HomePage.py @@ -944,6 +944,7 @@ class HomePage(Mixins.QTranslatable, QMainWindow): """Gate connection-sensitive Home controls during lifecycle transitions.""" self.systemProxyComboBox.setEnabled(bool(enabled)) self.tunModeSwitch.setEnabled(bool(enabled) and self._tunModeAvailable) + self.tunModeLabel.setEnabled(self.tunModeSwitch.isEnabled()) @QtCore.Slot() def handleServerSelectionChanged(self, *_args): diff --git a/Furious/Window/SettingsPage.py b/Furious/Window/SettingsPage.py index ba09a8d..d76ad8f 100644 --- a/Furious/Window/SettingsPage.py +++ b/Furious/Window/SettingsPage.py @@ -649,6 +649,7 @@ class SettingsPage(Mixins.QTranslatable, QMainWindow): _('Route system traffic through the active proxy connection.'), ) self.tunModeCard.checkBox.setEnabled(self._tunModeAvailable) + self.tunModeCard.titleLabel.setEnabled(self.tunModeCard.checkBox.isEnabled()) AppSettingsController().tunModeChanged.connect( self.tunModeCard.checkBox.syncCheckedAnimated @@ -1123,6 +1124,7 @@ class SettingsPage(Mixins.QTranslatable, QMainWindow): def setConnectionControlsEnabled(self, enabled: bool): """Disable connection-sensitive settings during a transition.""" self.tunModeCard.checkBox.setEnabled(bool(enabled) and self._tunModeAvailable) + self.tunModeCard.titleLabel.setEnabled(self.tunModeCard.checkBox.isEnabled()) self.systemProxyCard.comboBox.setEnabled(bool(enabled)) def showEvent(self, event):