redisplay() {
        // workaround to update width and height values
        this.vfunc_get_preferred_height();

        for (let i = 0; i < this._items.length; i++) {
            let bbox = this._items[i];
            bbox.setSize(this._childWidth, this._childHeight);

            let leftPadding = bbox.get_theme_node().get_padding(St.Side.LEFT);
            let rightPadding = bbox.get_theme_node().get_padding(St.Side.RIGHT);
            let topPadding = bbox.get_theme_node().get_padding(St.Side.TOP);
            let bottomPadding = bbox.get_theme_node().get_padding(St.Side.BOTTOM);

            for (let i = 0; i < bbox.get_child().get_children().length; i++) {
                let item = bbox.get_child().get_children()[i];
                if (item instanceof GWorkspaceThumbnail.WorkspaceThumbnail) {
                    // 2 is magic number. Can not find the reason for it.
                    item.setScale((bbox.get_width() - leftPadding - rightPadding - 2) / item.get_width(), (bbox.get_height() - topPadding - bottomPadding - 2) / item.get_height());
                }
                if (item instanceof SwitcherButton) {
                    item.setSize(this._childWidth - leftPadding - rightPadding, this._childHeight - topPadding - bottomPadding);
                    let label = item.get_child();
                    label.style = 'font-size: ' + Math.min(this._childHeight, this._childWidth) / 8 + 'px;';
                }
            }
        }

        let workspaceManager = global.workspace_manager;
        this.highlight(workspaceManager.get_active_workspace_index());
    }
// update width/height on spacing update
update width/height on spacing update
update width / height on spacing update
redisplay() {
        this.vfunc_get_preferred_height();
        for (let i = 0; i < this._items.length; i++) {
            let bbox = this._items[i];
            bbox.setSize(this._childWidth, this._childHeight);
            let leftPadding = bbox.get_theme_node().get_padding(St.Side.LEFT);
            let rightPadding = bbox.get_theme_node().get_padding(St.Side.RIGHT);
            let topPadding = bbox.get_theme_node().get_padding(St.Side.TOP);
            let bottomPadding = bbox.get_theme_node().get_padding(St.Side.BOTTOM);
            for (let i = 0; i < bbox.get_child().get_children().length; i++) {
                let item = bbox.get_child().get_children()[i];
                if (item instanceof GWorkspaceThumbnail.WorkspaceThumbnail) {
                    item.setScale((bbox.get_width() - leftPadding - rightPadding - 2) / item.get_width(), (bbox.get_height() - topPadding - bottomPadding - 2) / item.get_height());
                }
                if (item instanceof SwitcherButton) {
                    item.setSize(this._childWidth - leftPadding - rightPadding, this._childHeight - topPadding - bottomPadding);
                    let label = item.get_child();
                    label.style = 'font-size: ' + Math.min(this._childHeight, this._childWidth) / 8 + 'px;';
                }
            }
        }
        let workspaceManager = global.workspace_manager;
        this.highlight(workspaceManager.get_active_workspace_index());
    }
redisplay ( ) { this . vfunc_get_preferred_height ( ) ; for ( let i = 0 ; i < this . _items . length ; i ++ ) { let bbox = this . _items [ i ] ; bbox . setSize ( this . _childWidth , this . _childHeight ) ; let leftPadding = bbox . get_theme_node ( ) . get_padding ( St . Side . LEFT ) ; let rightPadding = bbox . get_theme_node ( ) . get_padding ( St . Side . RIGHT ) ; let topPadding = bbox . get_theme_node ( ) . get_padding ( St . Side . TOP ) ; let bottomPadding = bbox . get_theme_node ( ) . get_padding ( St . Side . BOTTOM ) ; for ( let i = 0 ; i < bbox . get_child ( ) . get_children ( ) . length ; i ++ ) { let item = bbox . get_child ( ) . get_children ( ) [ i ] ; if ( item instanceof GWorkspaceThumbnail . WorkspaceThumbnail ) { item . setScale ( ( bbox . get_width ( ) - leftPadding - rightPadding - 2 ) / item . get_width ( ) , ( bbox . get_height ( ) - topPadding - bottomPadding - 2 ) / item . get_height ( ) ) ; } if ( item instanceof SwitcherButton ) { item . setSize ( this . _childWidth - leftPadding - rightPadding , this . _childHeight - topPadding - bottomPadding ) ; let label = item . get_child ( ) ; label . style = 'font-size: ' + Math . min ( this . _childHeight , this . _childWidth ) / 8 + 'px;' ; } } } let workspaceManager = global . workspace_manager ; this . highlight ( workspaceManager . get_active_workspace_index ( ) ) ; }
update width/height on spacing update
update width / height on spacing update
// workaround to update width and height values // 2 is magic number. Can not find the reason for it.