Add clip mask

This commit is contained in:
Garulf 2022-08-30 04:27:37 -04:00
parent 70ea6a89e3
commit bd1499b2d3
2 changed files with 18 additions and 1 deletions

View file

@ -88,7 +88,11 @@
HorizontalAlignment="Center"
Source="{Binding Image, TargetNullValue={x:Null}}"
Stretch="Uniform"
Visibility="{Binding ShowIcon}" />
Visibility="{Binding ShowIcon}">
<Image.Clip>
<EllipseGeometry RadiusX="{Binding IconRadius}" RadiusY="{Binding IconRadius}" Center="16 16"/>
</Image.Clip>
</Image>
</Border>
<Border
Margin="9,0,0,0"

View file

@ -84,6 +84,19 @@ namespace Flow.Launcher.ViewModel
}
}
public double IconRadius
{
get
{
if (Result.RoundedIcon)
{
return IconXY / 2;
}
return IconXY;
}
}
public Visibility ShowGlyph
{
get