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

Broken VirtualTree theme item #9

Open
goldim opened this issue Apr 19, 2024 · 2 comments
Open

Broken VirtualTree theme item #9

goldim opened this issue Apr 19, 2024 · 2 comments
Assignees

Comments

@goldim
Copy link

goldim commented Apr 19, 2024

Looks like VirtualTree somehow broken. I see now picture of folder by default.
ville.Fluent theme:
изображение
classic.Theme:
изображение

My code:

qx.Class.define("scada.signalmonitor.tree.Item", {
    extend: qx.ui.tree.VirtualTreeItem,

    properties: {
        checked: {
            check : "Boolean",
            event: "changeChecked",
            nullable : true
        },

        image: {
            check : "String",
            event: "changeImage",
            nullable : true
        },

        count: {
            check : "String",
            event: "changeCount",
            nullable : true
        }
    },

    members: {
        __checkbox : null,
        __image : null,
        __count : null,

        _addWidgets(){
            this.addSpacer();
            this.addOpenButton();

            this.addIcon();
            this.bind("image", this, "icon");

            this.__checkbox = this.__createCheckBox();
            this.addWidget(this.__checkbox);
            this.addLabel();

            this.addListener("click", function(e) {
                if (e.getTarget() !== this.getChildControl("open")){
                    this.__checkbox.execute();
                }
            }, this);

            this.__checkbox.addListener("click", function(e) {
                e.stopPropagation();
            }, this);

            // All else should be right justified
            this.addWidget(new qx.ui.core.Spacer(), {flex: 1});
        },

        __createCheckBox(){
            const checkbox = new qx.ui.form.CheckBox().set({
                focusable: false,
                triState: true,
                marginRight: 4
            });
            this.bind("checked", checkbox, "value");
            checkbox.bind("value", this, "checked");
            return checkbox;
        }
    }
});
@sqville sqville self-assigned this Apr 19, 2024
@sqville
Copy link
Owner

sqville commented Apr 19, 2024

@goldim I hunted all around demos and it looks like that's the default behavior when the tree-folder is included in the theme. I'll keep testing to see what I can find out. Leaving this item open and unlabeled for now.

@goldim
Copy link
Author

goldim commented Apr 19, 2024

Ok, if I have a little spare time I will check it out myself.

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

2 participants