File tree Expand file tree Collapse file tree 3 files changed +26
-3
lines changed Expand file tree Collapse file tree 3 files changed +26
-3
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,10 @@ public string IcoPath
6666 }
6767 }
6868 }
69+ /// <summary>
70+ /// Determines if Icon has a border radius
71+ /// </summary>
72+ public bool RoundedIcon { get ; set ; } = false ;
6973
7074 /// <summary>
7175 /// Delegate function, see <see cref="Icon"/>
Original file line number Diff line number Diff line change 8282 BorderThickness =" 0" >
8383 <Image
8484 x : Name =" ImageIcon"
85- Width =" 32 "
86- Height =" 32 "
85+ Width =" {Binding IconXY} "
86+ Height =" {Binding IconXY} "
8787 Margin =" 0,0,0,0"
8888 HorizontalAlignment =" Center"
8989 Source =" {Binding Image, TargetNullValue={x:Null}}"
9090 Stretch =" Uniform"
91- Visibility =" {Binding ShowIcon}" />
91+ Visibility =" {Binding ShowIcon}" >
92+ <Image .Clip>
93+ <EllipseGeometry RadiusX =" {Binding IconRadius}" RadiusY =" {Binding IconRadius}" Center =" 16 16" />
94+ </Image .Clip>
95+ </Image >
9296 </Border >
9397 <Border
9498 Margin =" 9,0,0,0"
Original file line number Diff line number Diff line change @@ -84,6 +84,19 @@ public Visibility ShowIcon
8484 }
8585 }
8686
87+ public double IconRadius
88+ {
89+ get
90+ {
91+ if ( Result . RoundedIcon )
92+ {
93+ return IconXY / 2 ;
94+ }
95+ return IconXY ;
96+ }
97+
98+ }
99+
87100 public Visibility ShowGlyph
88101 {
89102 get
@@ -175,6 +188,8 @@ public int ResultProgress
175188
176189 public string QuerySuggestionText { get ; set ; }
177190
191+ public double IconXY { get ; set ; } = 32 ;
192+
178193 public override bool Equals ( object obj )
179194 {
180195 return obj is ResultViewModel r && Result . Equals ( r . Result ) ;
You can’t perform that action at this time.
0 commit comments