From 042dd619a30d12352ab960586fcc1920ae717ece Mon Sep 17 00:00:00 2001 From: Yaroslav Chvanov Date: Tue, 18 Jul 2023 21:26:51 +0300 Subject: [PATCH] resolutionrow: disable the "disable" button for the default resolution Ideally I would like it to also show the reason for example on hover, but this is already better. --- piper/resolutionrow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piper/resolutionrow.py b/piper/resolutionrow.py index f65090f..8c295e8 100644 --- a/piper/resolutionrow.py +++ b/piper/resolutionrow.py @@ -131,7 +131,7 @@ class ResolutionRow(Gtk.ListBoxRow): self.active_button.set_sensitive(True) if self.CAP_DISABLE: with self.disable_button.handler_block(self._disabled_button_handler): - self.disable_button.set_sensitive(True) + self.disable_button.set_sensitive(not resolution.is_default) if resolution.is_disabled: self.disable_button.set_active(True) self.active_button.set_sensitive(False)