haxeui / haxeui-heaps

MIT License
31 stars 12 forks source link

Resize issue #5

Open hoseyjoe opened 4 years ago

hoseyjoe commented 4 years ago

When the application resizes their is no effect launch the Main.hl and resize the application. No change. I have no direction for that

Also the default is black screen other targets are white

HTML after resize
image

HL after resize
image

Also notice in the Hl the "Random" button near bottom after resize isnt readable. That may be user error or becaus it originally rendered offscreen.

HaxeUITest.zip

hoseyjoe commented 3 years ago

Just need to tie into resize issue with

hxd.Window.getInstance().addResizeEvent(onResize); var stage = hxd.Window.getInstance();

function onResize() { var stage = hxd.Window.getInstance(); this.width = stage.width; this.height = stage.height; }

ianharrigan commented 3 years ago

Is your root object 100% w/h?

EDIT: whats "this" in your code above?

hoseyjoe commented 3 years ago

I can make a test project if it helps

This is the first line of xml

<vbox width="100%" height="100%">

This is MainView. I used the "new" example project style. Where class MainView extends VBox

package;

import haxe.ui.Toolkit;
import haxe.ui.HaxeUIApp;

class Main {
    public static function main() {
        Toolkit.theme = "dark";
        var app = new HaxeUIApp();
        app.ready(function() {
            app.addComponent(new MainView());

            app.start();
        });
    }
}
ianharrigan commented 3 years ago

OK, ill test it out, but with 100% w/h i would certainly expect the resulting ui to take up all the space without having to manually update something might be that haxeui-heaps needs a tweak in that area.