PSU Version 4.0.11
Just following the New-UDList example here:
It shows in the demo image, a nicely spaced and formatted list:
I’ve copied and pasted the code as is, but my when I look at mine, it’s rendering without spaces between icons and labels so looks a bit squished together.
For example:
Is this a bug or is the demo using some custom css in the app, and if so, please can you point me in the direction if there’s an example of how to do this?
Thanks,
Tom
I found exactly the same issue with the Label and Icon spacing but wasn’t sure if it had anything to do with the MaterialDesign theme I`m using. Not had time to dig into it yet though…
I`d also be interested in the reason and a fix
… Just tried changing the theme and now I`m confused as the spacing appears to be OK in the default theme
And huge in MaterialDesign
Cheers
Hmmm what version are you using? I’m using the out of the box theme on 4.0.11
I`m on version 4.0.12 which I installed yesterday over the top of 4.0.11 and to be honest, I can’t recall if I was still on 4.0.11 when I noticed the lack of spacing issue as you described it or when I set the theme to MaterialDesign.
Cheers
This is using the code you linked to with the default theme on 4.0.12
and this is with MaterialDesign
Cheers
Thanks, I think this is where I need to go then!
Was that using this: Universal.Icons.MaterialDesign - Ironman Software ?
Edit: Just attempted to install that module and use it.
I got the example to work New-UDMaterialDesignIcon -Icon "Md123"
but I found the lack of documentation and parameters difficult to work with, I couldnt seem to change the size of the component even and -style @{width=100}
just seemed to shift it 100 pixels to the right rather than make it 100px wide.
Not using that module specifically but have applied the MaterialDesign theme (which I believe is included in a standard install) to the entire app:
New-UDApp -Title “Test” -Theme (Get-UDTheme -Name ‘MaterialDesign’) -Pages $Pages
Awesome. Thanks for the details I’ll give that a go!
1 Like
(I don`t know all the correct terms so if anyone wants to jump in and enlighten me, it would be appreciated ) …
The gap between the icon and text in MaterialDesign ListItems appears to be due to this element which has a min-width attribute of 56px
Altering it in the browser developer tools results in a far “nicer looking” space but I have no idea how to override the defaults in the PSU code.
This is with it set to 30px
And this is with it set to 25px
Cheers
OK, this looks better
$Theme = Get-UDTheme -Name 'MaterialDesign'
$Theme = @{
overrides = @{
MuiListItemIcon = @{
root = @{
minWidth = '25px'
}
}
}
}
Hopefully someone else will find this helpful
2 Likes