Skip to content
Discussion options

You must be logged in to vote

It should normally center the icon:

  cairo_translate(
      draw, lpad + (b->widget.w - iconw * scale - lpad - rpad) * b->xalign,
      tpad + (b->widget.h - iconh * scale - tpad - bpad) * b->yalign);
  cairo_scale(draw, scale, scale);

you might want to do 'element-icon { expand: true;}' so if the underlying widget is bigger the element-icon widget takes up the whole space.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by Beruxyz
Comment options

You must be logged in to vote
1 reply
@DaveDavenport
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants