mirror of
https://github.com/LorenEteval/Furious.git
synced 2026-10-01 03:18:16 +03:00
Synchronize TUN mode label availability
Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
@@ -47,7 +47,8 @@ def baseStyleSheet(palette):
|
||||
background-color: transparent;
|
||||
}}
|
||||
|
||||
QLabel:disabled {{
|
||||
QLabel:disabled,
|
||||
QLabel#SettingsCardTitle:disabled {{
|
||||
color: {palette['disabled']};
|
||||
}}
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user