Slab.BeginWindow("sample", {Title = "Sample", W = 640, AutoSizeWindow = false})
Slab.BeginLayout("layout", {
Columns = 2,
ExpandW = true,
AlignX = "center",
AlignRowY = "center",
})
for k, v in pairs(test) do
Slab.SetLayoutColumn(1)
Slab.Text(k)
Slab.SetLayoutColumn(2)
if Slab.Button("up") then
end
Slab.SameLine()
if Slab.Button("down") then
end
end
Slab.EndLayout()
Slab.EndWindow()
shows
DearImGui solves this by allowing SmallButton which takes the same height as font (i assume) so it would be equal to the height of the text.
Another solution I can think of is to make layout columns use the max height.
Code snippet below:
shows![image](https://user-images.githubusercontent.com/17418737/148491047-848f546d-2bac-4467-9e81-78af24b347d6.png)
DearImGui solves this by allowing
SmallButton
which takes the same height as font (i assume) so it would be equal to the height of the text.Another solution I can think of is to make layout columns use the max height.