Gtk: How to remove padding around LinkButton #2455
-
Hi there! This is what I get: with this code:
Actually, the label appeared in the middle of the colored block. I have moved it a bit up by doing this:
I would like to remove the padding space around the LinkButton so that both the label and it are vertically aligned in a horizontal StackLayout.... any idea??? Thanks!!! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
In case someone has this same problem, I managed to remove the padding around the buttons (not 100% perfect but enough for me) by adding a custom LinkButtonHandler: I basically copied the exisiting handler in Eto and changed the constructor to apply Css styling on the button (I renamed it to GtkLinkButtonHandler because I had some issues with namespaces):
And then, before running my app:
Based on this answer: https://stackoverflow.com/questions/61375905/gtk3-button-reduce-padding-of-internal-label |
Beta Was this translation helpful? Give feedback.
In case someone has this same problem, I managed to remove the padding around the buttons (not 100% perfect but enough for me) by adding a custom LinkButtonHandler:
I basically copied the exisiting handler in Eto and changed the constructor to apply Css styling on the button (I renamed it to GtkLinkButtonHandler because I had some issues with namespaces):