From 0a671e7c9c386c904e1949061a81b29fea33e9a3 Mon Sep 17 00:00:00 2001 From: Craig Everett Date: Tue, 28 Apr 2026 18:46:43 +0900 Subject: [PATCH] WIP --- src/gd_v_call.erl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gd_v_call.erl b/src/gd_v_call.erl index 248548e..f1009e6 100644 --- a/src/gd_v_call.erl +++ b/src/gd_v_call.erl @@ -124,7 +124,6 @@ init({Prefs, {FunName, FunType}, ConID, Build, Selected, Keys}) -> _ = wxFrame:setSizer(Frame, MainSz), _ = wxFrame:setSize(Frame, Dimensions), _ = wxSizer:layout(MainSz), - ok = gd_v:safe_size(Frame, Prefs), ok = wxFrame:connect(Frame, close_window), ok = wxFrame:connect(Frame, command_button_clicked), true = wxFrame:show(Frame), @@ -171,11 +170,12 @@ call_sizer(Frame, J, CallArgs) -> {Name, C} end, Controls = lists:map(AddArg, CallArgs), - {CallSz, Controls, {600, 700}}. + {CallSz, Controls, {500, 900}}. return_sizer(Frame, J, ReturnType) -> ReturnSz = wxStaticBoxSizer:new(?wxVERTICAL, Frame, [{label, J("Return Type")}]), - Return = wxStaticText:new(Frame, ?wxID_ANY, textify(ReturnType)), + ReturnSzBox = wxStaticBoxSizer:getStaticBox(ReturnSz), + Return = wxStaticText:new(ReturnSzBox, ?wxID_ANY, textify(ReturnType)), _ = wxStaticBoxSizer:add(ReturnSz, Return, zxw:flags({wide, 5})), ReturnSz. @@ -242,6 +242,9 @@ handle_event(#wx{event = #wxCommand{type = command_button_clicked}, id = ID}, State = #s{copy = #w{id = ID}}) -> ok = copy(State), {noreply, State}; +handle_event(#wx{event = #wxClose{}}, State = #s{frame = Frame}) -> + ok = wxWindow:destroy(Frame), + {noreply, State}; handle_event(Event, State) -> ok = tell(info, "Unexpected event ~tp State: ~tp~n", [Event, State]), {noreply, State}.