Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VirtualLayout caches itemWidth and itemHeight which cause problems when Toolkit.pixelsPerRem value is changed #530

Open
NipponSunrise opened this issue Jun 15, 2023 · 0 comments

Comments

@NipponSunrise
Copy link

NipponSunrise commented Jun 15, 2023

VirtualLayout caches itemWidth and itemHeight which cause problems when Toolkit.pixelsPerRem value is changed. As a solution I use the following patch in ListView

class ListViewEvents extends ScrollViewEvents {
    ...
    public override function register() {
        ...
        registerEvent(UIEvent.RESIZE, onUIResize);
        ...
    }

    public override function unregister() {
        ...
        unregisterEvent(UIEvent.RESIZE, onUIResize);
        ...
    }

    private function onUIResize(e:UIEvent) {
        _listview.itemHeight = 0;
        _listview.itemWidth = 0;
    }
    ...

I'm not sure this solution follows the concepts of a framework, so it has to be re-thought. Also reworked solution should cover TableView as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant