Dlang UI - making widget extend to the bounds of the window
stunaep via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Apr 16 01:20:33 PDT 2016
On Friday, 15 April 2016 at 10:33:35 UTC, Vadim Lopatin wrote:
> On Friday, 15 April 2016 at 00:58:58 UTC, stunaep wrote:
>> I'm trying to make a gui program with dlangui, but no matter
>> what I do, I cannot get widgets to fill the whole window. The
>> window is resizable so I cannot just set the widths to static
>> numbers.
>>
>> No layoutWidth and layoutHeight set:
>> http://i.imgur.com/UySt30K.png
>>
>> layoutWidth/Height set to fill (left widget width 300):
>> http://i.imgur.com/76tMIFz.png
>>
>> I need these widgets to extend the width of the window because
>> it is resizable
>> http://i.imgur.com/PiL7Y7f.png
>>
>> You can see this also on DlangUI ML editor:
>> fill:
>> http://i.imgur.com/t9DsASt.png
>>
>> wrap:
>> http://i.imgur.com/FoTS69g.png
>>
>>
>> arbitrary number:
>> http://i.imgur.com/voiYTWZ.png
>
> For parent VerticalLayout, set layoutWidth: fill too
>
> VerticalLayout {
> id: main;
> layoutWidth: fill;
> VerticalLayout {
> layoutWidth: fill;
> TextWidget { text: "test"; layoutWidth: fill }
> }
> }
I am doing that. I think it has to do with my high dpi because
I'm using a 4k monitor.
If I use Modal window flag:
>Window window = Platform.instance.createWindow("DlangUI OpenGL
>Example", null, WindowFlag.Modal, 800, 700);
http://i.imgur.com/FJgPq8U.png
If I use resizable:
>Window window = Platform.instance.createWindow("DlangUI OpenGL
>Example", null, WindowFlag.Resizable, 800, 700);
http://i.imgur.com/PsPwoSN.jpg
More information about the Digitalmars-d-learn
mailing list