File tree Expand file tree Collapse file tree 3 files changed +7
-16
lines changed Expand file tree Collapse file tree 3 files changed +7
-16
lines changed Original file line number Diff line number Diff line change 438438 HorizontalAlignment =" Center"
439439 Source =" {Binding PreviewImage}"
440440 StretchDirection =" DownOnly"
441- Visibility =" {Binding ShowPreviewImage, Converter={StaticResource BoolToVisibilityConverter} }" >
441+ Visibility =" {Binding ShowPreviewImage}" >
442442 <Image .Style>
443443 <Style TargetType =" {x:Type Image}" >
444444 <Setter Property =" MaxWidth" Value =" 96" />
Original file line number Diff line number Diff line change @@ -90,26 +90,18 @@ public Visibility ShowIcon
9090 }
9191 }
9292
93- public bool ShowPreviewImage
93+ public Visibility ShowPreviewImage
9494 {
9595 get
9696 {
97- if ( ! string . IsNullOrEmpty ( Result . Preview . PreviewImagePath ) || Result . Preview . PreviewDelegate != null )
97+ if ( PreviewImageAvailable )
9898 {
99- return true ;
99+ return Visibility . Visible ;
100100 }
101101 else
102102 {
103- // Fall back to Icon
104- if ( ! ImgIconAvailable && ! GlyphAvailable )
105- return true ;
106-
107- // Although user can choose to use glyph icons, plugins may choose to supply only image icons.
108- // In this case we ignore the setting because otherwise icons will not display as intended
109- if ( Settings . UseGlyphIcons && ! GlyphAvailable && ImgIconAvailable )
110- return true ;
111-
112- return ! Settings . UseGlyphIcons && ImgIconAvailable ;
103+ // Fall back to icon
104+ return ShowIcon ;
113105 }
114106 }
115107 }
@@ -244,7 +236,7 @@ public void LoadPreviewImage()
244236 {
245237 if ( ShowDefaultPreview == Visibility . Visible )
246238 {
247- if ( ! PreviewImageLoaded && ShowPreviewImage )
239+ if ( ! PreviewImageLoaded && ShowPreviewImage == Visibility . Visible )
248240 {
249241 PreviewImageLoaded = true ;
250242 _ = LoadPreviewImageAsync ( ) ;
Original file line number Diff line number Diff line change 99using System . Windows . Data ;
1010using System . Windows . Documents ;
1111using System . Windows . Input ;
12- using JetBrains . Annotations ;
1312
1413namespace Flow . Launcher . ViewModel
1514{
You can’t perform that action at this time.
0 commit comments