Fix sensors
Signed-off-by: Vasiliy Doylov <nekodevelopper@gmail.com>
This commit is contained in:
parent
5db4dac1e9
commit
9f6bd2f794
1 changed files with 4 additions and 1 deletions
|
@ -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");
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue