can-lehmann / owlkettle

A declarative user interface framework based on GTK 4
https://can-lehmann.github.io/owlkettle/README
MIT License
375 stars 13 forks source link

Add center box #112

Closed PhilippMDoerner closed 11 months ago

PhilippMDoerner commented 11 months ago

Adds gtk's center box. Honestly I'm not entirely sure if this PR is worth it. I've stared at the example widget more than once and asked myself if I'd want to use that...

Anyway, here's the widget.

PhilippMDoerner commented 11 months ago

I'm not quite sure what supposedly is broken here? This is the error:

 /usr/bin/ld: /home/runner/.cache/nim/introduction_d/@m..@sowlkettle@swidgets.nim.c.o: in function `buildState__OOZowlkettleZwidgets_u4427':
@m..@sowlkettle@swidgets.nim.c:(.text+0x861a): undefined reference to `gtk_center_box_set_shrink_center_last'
/usr/bin/ld: /home/runner/.cache/nim/introduction_d/@m..@sowlkettle@swidgets.nim.c.o: in function `updateState__OOZowlkettleZwidgets_u4620':
@m..@sowlkettle@swidgets.nim.c:(.text+0x8b9f): undefined reference to `gtk_center_box_set_shrink_center_last'

I can not replicate this issue on any nim version I have locally. This feels like maybe a cache issue? I'm adding the -f flag to compiling the examples so it ignores cache, maybe that fixes it.

PhilippMDoerner commented 11 months ago

Yeah no clue what's going on here. I can't reproduce the issues that the github pipeline has. Do you have any idea here maybe?

can-lehmann commented 11 months ago

It says:

undefined reference to `gtk_center_box_set_shrink_center_last'

Which is since: 4.12 according to the docs.

PhilippMDoerner commented 11 months ago

It says:

undefined reference to `gtk_center_box_set_shrink_center_last'

Which is since: 4.12 according to the docs.

Argh, when reading comprehension fails. Well, fixed that, updated docs, reverted changes to the nimble command. Compiles fine now.

can-lehmann commented 11 months ago

Sorry in case you got emails about the CI failing. I changed the naming for the BaselinePosition and forgot to update it in a few places. Fixed in https://github.com/can-lehmann/owlkettle/commit/6ae5ae82d0495910c84a303d56eeed7d367c4c70