Update Fire.js

This commit is contained in:
Justin Garza
2025-03-08 11:53:38 -05:00
parent 845c765843
commit 18d1e3f6f6
+3 -3
View File
@@ -139,7 +139,7 @@ export default class Effect {
} }
// enables and disables the color buttons // enables and disables the color buttons
function EnableDisableColorButtons(dialog, state) { function enableDisableColorButtons(dialog, state) {
for (let i = 1; i <= 5; i++) { for (let i = 1; i <= 5; i++) {
dialog.getBuilder().get_object('fire-color-' + i).set_sensitive(!state); dialog.getBuilder().get_object('fire-color-' + i).set_sensitive(!state);
@@ -151,7 +151,7 @@ export default class Effect {
// Connect to the "state-set" signal to update preferences dynamically based on // Connect to the "state-set" signal to update preferences dynamically based on
// the switch state. // the switch state.
switchWidget.connect('state-set', (widget, state) => { switchWidget.connect('state-set', (widget, state) => {
EnableDisableColorButtons(dialog, enableDisableColorButtons(dialog,
state); // Update sensitivity when the state changes. state); // Update sensitivity when the state changes.
}); });
@@ -159,7 +159,7 @@ export default class Effect {
// switch. // switch.
const initialState = const initialState =
switchWidget.get_active(); // Get the current state of the switch. switchWidget.get_active(); // Get the current state of the switch.
EnableDisableColorButtons(dialog, initialState); enableDisableColorButtons(dialog, initialState);
} else { } else {
// Log an error if the switch widget is not found in the UI. // Log an error if the switch widget is not found in the UI.
log('Error: \'fire-random-color\' switch widget not found.'); log('Error: \'fire-random-color\' switch widget not found.');