Skip to content

More robust button rendering/styling #57

@lambdadog

Description

@lambdadog

For users largely using worm as a floating WM like myself, the button styling and rendering are okay, but not great. Typically I'd like my buttons to change on hover (to indicate that if I click, I will be clicking them and not the space surrounding them) and with everything else having active and inactive coloration, it'd be nice if the buttons could have the same. With the default config's coloration, for example, a black button disappears on a foreground window but looks perfect on a background window.

Some thought needs to be put into how to achieve this however -- ideally you could just give SVG elements a class like worm-fill or worm-stroke and worm could change their colors dynamically, but looking at pixie it doesn't look like this kind of behavior is exposed in any way.

It's still probably technically doable -- just separate out a codepath for SVG files, parse the XML, find all elements with class worm-{fill,stroke}, and set their fill or stroke value or whatever the case may be to the selected color, then render back to text and pass to decodeSvg -- but it wouldn't be particularly clean.

Perhaps worth looking into upstream contributions to pixie's SVG support? SVGs in the browser support styling, with CSS being able to set certain values (including fill and stroke), but since Pixie isn't a browser it does seem like there possibly ought to be a way to pass styles in when rendering an SVG that's not CSS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions