Shoes.app do
stack do
flow do
para "hide"
check checked: false do |c|
if c.checked?
@hidden_slot.show
@el.focus # bug !
else
@hidden_slot.hide
end
end
end
@hidden_slot = stack hidden: true do
@bt = button "nothing"
@sl = slider
@el = edit_line ""
@ck = check
@rd = radio
@pg = progress
@eb = edit_box
@lb = list_box
end
end
end
setting focus on a native widget makes it visible even if setting parent slot to be hidden
VALUE
shoes_control_focus(VALUE self)
{
GET_STRUCT(control, self_t);
// ATTRSET(self_t->attr, hidden, Qtrue); // commenting fix the issue
if (self_t->ref != NULL) shoes_native_control_focus(self_t->ref);
return self;
}
this seems to fix the issue,
but why the line ATTRSET(self_t->attr, hidden, Qtrue); in the first place ?
(why hiding a widget when focusing on it ?, for side effect(s) ?)
given :
setting focus on a native widget makes it visible even if setting parent slot to be hidden
Proposed change : (ruby.c https://github.com/Shoes3/shoes3/blob/master/shoes/ruby.c#L3009)
this seems to fix the issue, but why the line
ATTRSET(self_t->attr, hidden, Qtrue);
in the first place ? (why hiding a widget when focusing on it ?, for side effect(s) ?)