Skip to content

Commit

Permalink
Toggle allow editing of DPI entry if 'disable' button clicked.
Browse files Browse the repository at this point in the history
  • Loading branch information
sizzlesloth committed May 26, 2024
1 parent 9c076c9 commit a13acce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion piper/resolutionrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ def _on_change_value(

def _on_disable_button_toggled(self, togglebutton: Gtk.Button) -> None:
# The disable button has been toggled, update RatbagdResolution.
self._resolution.set_disabled(togglebutton.get_active())
is_active = togglebutton.get_active()
self._resolution.set_disabled(is_active)
self.dpi_entry.set_editable(not is_active)

# Update UI
self._on_status_changed(self._resolution, pspec=None)
Expand Down

0 comments on commit a13acce

Please sign in to comment.