Is there a more recent reincarnation of ExpandView (from wslib)?

I’m curious if anyone has [re]implemented a drop-down view, like wslib’s ExpandView, especially one that uses the more recent Qt layouts instead of the legacy flow decorator. (Responding to resizing events, besides the drop-down action, is on ExpandView’s “TODO” list.)

I know MenuActions support custom drawing via CustomViewAction and stacking some sub-menus of those sorta makes it look like the same thing like ExpandView. (In fact toolbars with CustomViewAction would be a decent way to reimplement EZ Sliders, but alas they there are presently issues with borders not being settable on MenuActions because they need Qt stylesheet support for that, which lacks scland bindings presently.)

Something like ExpandView It’s a alas not a standard widget in Qt either; there are some implementations for Qt too, but it would require recompling SC for the bindings etc.

In case you wonder what I’m using it for: it’s somewhat more useful to display [pre]settings variants in those ExpandViews than with PdefPresetGui because for morphs/blends/interpolations you can display both endpints statically/editably while the morph is going on, unlike with PdefPresetGui that can only display one dict, which is nearly useless while the morphing is going on, as the values change (while the end-values obviously don’t). Additionally, you can stack more than two ExpandViews for visualizing a “breakpoint envelope” of presets.

(Aside: I’m not actually using PdefPreset at all, as I found that “plain” events/dictionaries are more flexible because you can custom merge them with events [while Pdef only does one “override logic” for its envir], and Dictionary.blend also does Spec unamp/map so that e.g. exp->exp blending works as expected. The Dictionary.merge (and blend) is slightly gimped as it only does inner and outer joins [in database terminology], with fill=true/false, but adding left and right joins for “overrides” is a smop.)

You can easily implement an ExpandView using the visible method of View:

(
	{
		var layout;
		var blockview = View.new;
		blockview.layout = VLayout(
			Slider.new.orientation_(\horizontal),
			Slider.new.orientation_(\horizontal),
			Slider.new.orientation_(\horizontal),
			Slider.new.orientation_(\horizontal),
		);
		layout = VLayout(
			HLayout(
				Button.new.states_([
					["-"],
					["+"],
				]).action_({ arg me;
					if(me.value == 0) {
						blockview.visible = true;
					} {
						blockview.visible = false;
					}
				}).fixedWidth_(30),
				[StaticText.new.string_(" Osc Block 1").background_(Color.grey), stretch:0],
			).spacing_(0),
			blockview,
			Button.new,
			nil
		);
		layout;
		Window.new.layout_(layout).front;
	}.value
)