Fix sensors

Signed-off-by: Vasiliy Doylov <nekodevelopper@gmail.com>
This commit is contained in:
Vasiliy Doylov 2025-03-02 15:31:16 +03:00
parent 5db4dac1e9
commit 9f6bd2f794
Signed by: NekoCWD
GPG key ID: B7BE22D44474A582

View file

@ -37,13 +37,16 @@ class TheCatTools.GUI.BoubleBar : Adw.Bin, Gtk.Orientable {
}
public void bind_state_to_bubble_pos (Bubble bubble) {
bubble.notify["value-x"].connect (() => {
bool inb = true;
if (bubble.value_x >= clamps.upper) {
set_state_flags (Gtk.StateFlags.CHECKED, false);
inb = false;
} else if (bubble.value_x <= clamps.lower) {
set_state_flags (Gtk.StateFlags.CHECKED, false);
inb = false;
} else
set_state_flags (Gtk.StateFlags.CHECKED, true);
message ("Notify %s", CHECKED in get_state_flags () ? "Inbounds" : "Outbounds");
message ("Notify %s", inb ? "Inbounds" : "Outbounds");
});
}