libui-node icon indicating copy to clipboard operation
libui-node copied to clipboard

Grid not working on macOS

Open mischnic opened this issue 7 years ago • 6 comments

Some elements are missing

examples/grid.js (0_1_0)

var grid = new libui.UiGrid();
grid.padded = true;
grid.append(new libui.UiLabel('name'), 0, 0, 2, 1, 0, 0, 0, 1);
grid.append(new libui.UiLabel('surname'), 0, 1, 2, 1, 0, 0, 0, 1);
grid.append(new libui.UiLabel('age'), 0, 2, 2, 1, 0, 0, 0, 1);

grid.append(name, 2, 0, 2, 1, 0, 0, 0, 1);
grid.append(surname, 2, 1, 2, 1, 0, 0, 0, 1);
grid.append(age, 2, 2, 2, 1, 0, 0, 0, 1);

grid.append(JSONData, 4, 0, 1, 3, 1, 0, 1, 0);

bildschirmfoto 2018-03-19 um 18 52 54

Corresponding issue: https://github.com/kusti8/proton-native/issues/55

mischnic avatar Mar 18 '18 15:03 mischnic

Grid does work on macOS; it's just insanely buggy because either Auto Layout is hard or my attempt at making a grid with it is poor (probably the latter), so it only works under specific circumstances... This is an active problem. What should that example look like?

andlabs avatar Mar 19 '18 15:03 andlabs

Shows a completely empty window on Win10.

Linux:

unbenannt

mischnic avatar Mar 19 '18 17:03 mischnic

I should update the age too 😌

parro-it avatar Mar 19 '18 18:03 parro-it

Also: some enums aren't exposed

_UI_ENUM(uiAlign) {
	uiAlignFill,
	uiAlignStart,
	uiAlignCenter,
	uiAlignEnd,
};

_UI_ENUM(uiAt) {
	uiAtLeading,
	uiAtTop,
	uiAtTrailing,
	uiAtBottom,
};

mischnic avatar Apr 09 '18 16:04 mischnic

On a side note - is halign and valign working? Some examples may be helpful. Right now I can not achieve any change in regards to horizontal or vertical alignment, but this may be due to me improperly using it. The more examples the better IMO. From the example here, by the way, I realized that I may want to pad grid too. ;)

rubyFeedback avatar Aug 29 '21 15:08 rubyFeedback

Screenshots are great too because we get visual impressions, even if there are bugs. I don't know how my libui-specific code looks on macOS otherwise, for instance.

rubyFeedback avatar Aug 29 '21 15:08 rubyFeedback