Immediate-Mode-UI / Nuklear

A single-header ANSI C immediate mode cross-platform GUI library
https://immediate-mode-ui.github.io/Nuklear/doc/index.html
Other
9.16k stars 551 forks source link

Group margins/alignment Ubuntu #617

Open Axle-Ozz-i-sofT opened 7 months ago

Axle-Ozz-i-sofT commented 7 months ago

Hi team I have recently started learning/using Nuklear. I don't know if this is a Nuklear, Allegro5 or Ubuntu 20.04 issue :(

Using groups in Windows aligns correctly, but under Ubuntu the top and left side is cut off of widgets. Has anyone else encountered this? If so, are there settings in the source where I can change the top and left margins to navigate around this?

Best Regards Axle

Ubuntu (Missing top left margin) NK_Ubuntu Windows (Margins are fine) NK_Windows

Axle-Ozz-i-sofT commented 7 months ago

The margin issue is also coming up in the demo/common/overview.c code.

P.S. I have uploaded the Windows and Ubuntu version if anyone may find it useful. Not trying to grab free adds on your repo... See a video here: https://www.youtube.com/watch?v=IAx9d8fft7s&list=PLenZ1bghNvzhoNTYqJ-KfLZkEu1T_gq2I Repo: https://github.com/Axle-Ozz-i-sofT/Nuklear-Visual-Style-Editor

Regards Axle

RobLoach commented 6 months ago

If you're using Allegro for this, it could be a problem with the allegro renderer.

Axle-Ozz-i-sofT commented 6 months ago

If you're using Allegro for this, it could be a problem with the allegro renderer.

Thanks @RobLoach I wasn't sure. At first it only showed up on the Ubuntu version with Allegro, and windows was fine so I didn't see it at first. I just did an SDL2 version and it is there in Windows. I haven't compiled and tested on Ubuntu yet. That being said I followed the demo examples and suspect there may be something wrong with the way I am using groups and layout_row begin/end. The API docs are a little scant, so I am relying upon most of the demo/examples to feel my way around. I got a hint yesterday from some Java API notes on Coding Fox, so I have to follow up and see where that leads. So I will break out a small section with a tree node and some groups and debug the heck out of it when I get chance. With both SDL and Allegro. Axle

P.S. I did see #ifndef DEMO_DO_NOT_USE_COLOR_PICKER and I see that the color picker isn't showing in Allegro so I am guessing there are a lot of quirks for me to still discover.

Ryder17z commented 3 weeks ago

As there's a similar bug when using SDL2 on Linux too this issue is probably the same as what's spotted in #653

Axle-Ozz-i-sofT commented 3 weeks ago

As there's a similar bug when using SDL2 on Linux too this issue is probably the same as what's spotted in #653

Thank you for the heads up :)