ui icon indicating copy to clipboard operation
ui copied to clipboard

How to make a window not realizable?

Open ajeecai opened this issue 5 years ago • 6 comments

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" ?

ajeecai avatar Nov 20 '19 06:11 ajeecai

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

andlabs avatar Nov 20 '19 13:11 andlabs

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

ajeecai avatar Nov 21 '19 02:11 ajeecai

And what type of control is text1?

andlabs avatar Nov 21 '19 14:11 andlabs

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

ajeecai avatar Nov 21 '19 16:11 ajeecai

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

andlabs avatar Nov 21 '19 16:11 andlabs

Thank you andlabs

ajeecai avatar Nov 23 '19 00:11 ajeecai