andlabs / andlabs/libui

Space between controls - AKA spacers

Aperta
#506 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C
Stelle
10.9k
Fork
612
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

`libui-rs` currently uses empty `uiBox`es as stretchy spacers, but what if I want fixed spacers? Not by any particular amount, of course, I just want a _unit of space_ to separate things out by. Like the window margin - no nonstandard px amounts, just one standard unit of space.

Right now, an empty label works okay as a vertical spacer.

![image](https://user-images.githubusercontent.com/4723091/91097191-15efe880-e614-11ea-932a-7c155800be44.png)

But what about a horizontal one? A label with a couple space characters as its content? Honestly, both of these solutions feel dirty to me. I think libui should implement proper spacers.

There could be a zero-size spacer, meant for stretchy use, and a one-size spacer meant for non-stretchy use. Maybe there could be two variants of the one-size spacer - one vertical one with zero width, and one horizontal one with zero height.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.