Button Icon Size

Sorry this seems like a very basic question but I can’t seem to figure it out. Is there a way to change the size of icons in New-UDButton?

There only seems to be an option to provide the name of the icon, if I create an icon object (where you can specify the size) and pass that into the -icon parameter of the button it doesn’t seem to work and seems to only accept a string of the icon name.

Hi @tom.obrien there is no size parameter for the icon, so sadly you cannot set the size of the icon within New-UDButton. However I am sure you could create a workaround…will have a think and update…
Just for clarification it would appear the icon is being set via the fontsize…so you could always increase the font size via CSS to increase the icon

'.btn, .btn-flat, .btn-floating, .btn-large, .btn-small' = @{
	'font-size' = "34px"
}

Excellent thanks, that should do the trick as the text size is fairly small anyway :slight_smile:

1 Like

As mentioned this is a ‘work-around’ to what you wanted…there is a section on this forum for feature requests…and the official github repo for universaldashboard where you could log that you wish for there to be a -IconSize parameter in new-udbutton and see if it will be implemented, or if you happy with the solution provided, then just add the custom theme to your dashboard. If you only want this applying to specific buttons then you will need to use udstyle https://psdevuk.github.io/ud-flix/Bring-more-styles-with-UDStyle/

1 Like

Oh nice I didn’t realise you could do that. I’ve only been using UD for a few days now but I’m really impressed with what it can do. It’s just taking some getting used to! Thanks again for your help @psDevUK, I’m sure this won’t be the last time you have to help me!