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

All Boxes in the screen change when adding focu #58

Open
suahdad opened this issue Jul 5, 2022 · 0 comments
Open

All Boxes in the screen change when adding focu #58

suahdad opened this issue Jul 5, 2022 · 0 comments

Comments

@suahdad
Copy link

suahdad commented Jul 5, 2022

whenever the box that has the focus styling configured is focused, all of the elements in the screen had their style changed

i have a UI that instantiates like this

class Library extends TerminalList {
    constructor() {
        super(Config.library);
        this.addListener();
        this.events = new EventEmitter();
    }
...

the config used is below

const style =  {
    fg: 'grey',
    bg: 'black',
    border: {
        fg: '#000000'
    }
};
const border = { type: 'line' };
const Config = {
    controls: {
        label: 'Controls',
        border,
        bottom: '0',
        right: '0',
        width: '50%',
        height: 5,
        style
    },
    library:{
        bgFocus: 'blue',
        label: 'Library',
        border,
        style,
        left: 0,
        bottom: 0,
        width: '50%',
        height: '95%',
    },
    nowplaying:{
        label: 'Now Playing',
        border,
        style,
        right: 0,
        bottom: 6,
        width: '50%',
        height: 5,
        tags: true
    },
    queue:{
        label: 'Queue',
        border,
        style: {
            ...style,
            focus: {
                border: {
                    fg: 'blue'
                }
            }
        },
        right: 0,
        bottom: 11,
        width: '50%',
        height: '95%-11'
    }

};

module.exports = Config;
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