Closed mueller-ma closed 1 year ago
How is defined your icon attribute in your sitemap? Just to understand what icon source you use. In case it is a custom icon in OH classic iconset, shouldn't it have the proper size?
With the same icon either retrieved directly from iconify or from the same icon defined as custom OH icon:
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="M12 2a7 7 0 0 0-7 7c0 2.38 1.19 4.47 3 5.74V17a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-2.26c1.81-1.27 3-3.36 3-5.74a7 7 0 0 0-7-7M9 21a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1v-1H9v1Z"/></svg>
sitemap test8 label="Tests"
{
Frame {
Switch item=TestDimmer icon="mdi_lightbulb"
Switch item=TestDimmer icon="if:mdi:lightbulb"
}
}
So yes, OH icons are noit scaled while iconify icons are. I am going to fix that.
Which UI are you reporting an issue for?
The problem
SVG icons smaller than 32x32 aren't scaled to fit the icon (CSS class
mdl-form__icon
):Icon from classic looks fine:
Icon from mdi is too small:
Expected behavior
All icons should be scaled to 32x32 px. The Android app scales all icons to the same size as well.
Steps to reproduce
Your environment
Browser console
Browser network traffic
Additional information
Suggestion: The CSS could be update to:
But that may cause issues with non-square icons.