starlit  Diff

Differences From Artifact [a436d8c893]:

To Artifact [01dfc2a3de]:


   160    160   		local idx, rowH, totalH = 0,0,0
   161    161   		local cols = def.cols or math.huge
   162    162   		local startX = state.x
   163    163   		local maxX = startX
   164    164   		for _, w in ipairs(def) do idx = idx + 1
   165    165   			local src, st = starlit.ui.build(w, state)
   166    166   			-- TODO alignments
   167         -			rowH = math.max(rowH, st.h)
   168    167   			if idx > cols or (def.w and (state.x + state.spacing + st.w > def.w)) then
   169    168   				totalH = totalH + rowH
   170    169   				state.x = startX
          170  +				state.y = state.y + state.spacing + rowH
   171    171   				rowH,idx = 0,0
   172         -				state.y = state.y + state.spacing + st.h
   173    172   			end
          173  +			rowH = math.max(rowH, st.h)
   174    174   			widget('container[%s,%s]%scontainer_end[]', state.x, state.y, src)
   175    175   			state.x=state.x + state.spacing + st.w
   176    176   			maxX = math.max(state.x, maxX)
   177    177   		end
   178    178   		totalH = totalH + rowH
          179  +		state.y = state.y + rowH
   179    180   		state.h = math.max(state.h, totalH) + state.padding
   180    181   		state.w = state.x + state.padding/2
   181    182   		state.x = maxX
   182    183   	elseif def.kind == 'pane' then
   183    184   		local top = state.y
   184    185   		widget('scroll_container[%s,%s;%s,%s;%s;vertical]',
   185    186   			state.x, state.y, state.w, state.h,