https://linen.dev logo
Join Discord
Powered by
# haxe-ui
  • h

    hallowed-ocean-84954

    01/30/2023, 2:16 PM
    so sizing the root element correctly is critical then ?
  • b

    bright-gpu-74537

    01/30/2023, 2:17 PM
    well, it depends on what you are after... but if want a box to be 100%, and its parent is 100%, but its parents parent is 0 (ie, autosized) then yeah, all three boxes are gonna be 0 (100% of 0 = 0, and the same applies down the tree)
  • h

    hallowed-ocean-84954

    01/30/2023, 2:18 PM
    Got it. I had thought that the parents were autosized by the size of the content but I guess that's only true if you set the parent size to 100%
  • b

    bright-gpu-74537

    01/30/2023, 2:18 PM
    well, they are autosized by the size of the content... but if the content is 100% (of the parent) then it all ends up as 0
  • h

    hallowed-ocean-84954

    01/30/2023, 2:20 PM
    oh - so that's what the percentage is of - of the parent - I guess that makes sense but hadn't really occurred to me clearly which is odd perhaps given that I use that notion in size the large scale components of the layout
  • h

    hallowed-ocean-84954

    01/30/2023, 2:20 PM
    so height or width really cannot be left out in the vbox/hbox ?
  • b

    bright-gpu-74537

    01/30/2023, 2:20 PM
    yeah, % means "what percentage of the parent" (after removing fixed sizes)
  • b

    bright-gpu-74537

    01/30/2023, 2:21 PM
    sure, they can, if you want the container to size based on the contents
  • h

    hallowed-ocean-84954

    01/30/2023, 2:22 PM
    so I'm confused then when to choose one over the other - is it that if you are using percentages rather than pixels you need a parent size somewhere - but if using pixels then the parent will autosize to the sum ?
  • b

    bright-gpu-74537

    01/30/2023, 2:23 PM
    %'s and px's are the same, in the sense that they all end up as a size, whats not a good idea is mixing %'s with autosized parents
  • b

    bright-gpu-74537

    01/30/2023, 2:25 PM
    http://haxeui.org/builder/?5d1f08d9
  • h

    hallowed-ocean-84954

    01/30/2023, 2:25 PM
    ok - I think that makes sense - I'm always a bit confused as to whether to use % or just leave sizes out altogether. And as you've noted the layout is getting larger - XML is about 536 lines - so making changes to test stuff is a bit laborious
  • b

    bright-gpu-74537

    01/30/2023, 2:25 PM
    yeah, breaking up the xml might help you a bit, for sure
  • h

    hallowed-ocean-84954

    01/30/2023, 2:27 PM
    so on that is the only option basically creating components ? or can I just do sort of include files ?
  • b

    bright-gpu-74537

    01/30/2023, 2:27 PM
    you can include files also... i think... or ... not sure... lemme check
  • h

    hallowed-ocean-84954

    01/30/2023, 2:28 PM
    about the example you just posted I notice that L23-28 works but the root layout vbox does not set a size. Is the root special ?
  • h

    hallowed-ocean-84954

    01/30/2023, 2:30 PM
    components might be more satisfactory overall but alas require more thought 🙂
  • b

    bright-gpu-74537

    01/30/2023, 2:31 PM
    no, so the reason that works, is the root component got a size from the other vboxes... if they were all 100% (or autosized) then you would have the same issue - nothing special about root
  • b

    bright-gpu-74537

    01/30/2023, 2:31 PM
    http://haxeui.org/builder/?159fd7ed
  • h

    hallowed-ocean-84954

    01/30/2023, 2:31 PM
    oh - ok so it's the "one element producing a non-zero size" is enough thing
  • h

    hallowed-ocean-84954

    01/30/2023, 2:31 PM
    ok
  • b

    bright-gpu-74537

    01/30/2023, 2:32 PM
    exactly
  • h

    hallowed-ocean-84954

    01/30/2023, 2:32 PM
    good - I wouldn't have liked a special root
  • b

    bright-gpu-74537

    01/30/2023, 2:32 PM
    if there is one child that ends up as non zero, and its autosized, then that is the size, which means 100% will then work with other children (since it has a size now)
  • h

    hallowed-ocean-84954

    01/30/2023, 2:33 PM
    omitRoot is interesting - so you can almost build a component and then just strip the container bit off - might be able to use that
  • h

    hallowed-ocean-84954

    01/30/2023, 2:35 PM
    Many thanx for all this - helps a lot
  • f

    full-journalist-82607

    01/30/2023, 3:45 PM
    Hmm, I have a SIGSEV crash in hxwidgets , it's here private override function handleDisabled(disable:Bool) { if (window != null) { trace(window); // TransparentPanel trace(!disabled); // true window.enabled = !disabled; // crashes here It seems to be wxwidgets
  • b

    bright-gpu-74537

    01/30/2023, 3:52 PM
    and are you just calling disabled=true, etc?
  • f

    full-journalist-82607

    01/30/2023, 3:54 PM
    I'm just calling removeInteractivity
  • f

    full-journalist-82607

    01/30/2023, 3:54 PM
    sorry disableInteractivity
1...144814491450...1687Latest