andlabs / ui

Platform-native GUI library for Go.
Other
8.33k stars 652 forks source link

How to make a window not realizable? #371

Open ajeecai opened 4 years ago

ajeecai commented 4 years ago

Hi,

I love this project since it provides native UI outlook. My question is, when I make up a window based on it, I could resize it by dragging it edges and then the layout inside the window is shifted which looks ugly. How could I prevent this? I check the ui and libui header files and repository issues, there is no answer.

Thanks.

PS. Is there any confirmation message box widget, which has two buttons - "YES" or "NO" ?

andlabs commented 4 years ago

I haven't implemented either yet, sorry. But what do you mean by resizing it makes it look upgly?

ajeecai commented 4 years ago

I mean, if I put widgets in grid, they are in position like this:

| button 1   |    text1     |

Then I resize the edge, button 1 and text 1 are far away.

| button 1  |                                                    text1              |

Or

| button 1  |   text1                                                               |

Or, I have dynamically set long text, the outlook would look strange

| button 1  |  text1text1text1text1text1text1        |  
| button 2  |  text2                                 |

here I perfer being "text1text1..." instead

andlabs commented 4 years ago

And what type of control is text1?

ajeecai commented 4 years ago

ui.NewLabel. Whatever control type, resizing window will make it float I guess ...

andlabs commented 4 years ago

Right, uiLabel doesn't have wrapping or ellipses yet either, sorry about that.

ajeecai commented 4 years ago

Thank you andlabs