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

Custom style sheet properties for custom widgets #52

Open
WeirdConstructor opened this issue Nov 8, 2021 · 0 comments
Open

Custom style sheet properties for custom widgets #52

WeirdConstructor opened this issue Nov 8, 2021 · 0 comments

Comments

@WeirdConstructor
Copy link

It would be awesome to have custom style properties in style sheets for custom widgets.
I often have the problem that I would love custom colors and line thickness for my custom widget drawing.
I would suggest collecting style properties that start with ext- or -ext- (what ever you like) and provide
widgets a way to access them:

block_code {
    -ext-block-border-width: 10px;
    -ext-block-color1: #FF00FF;
    -ext-block-color2: #FFFFFF;
    -ext-block-color3: #FF0000;
}

The type of the HashMap could be HashMap<String, StyleValueEnum> and the StyleValueEnum (if tuix doesn't already have something like this) could then be used by the widget to check if the contents is a color or size (or whatever types are possible).

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