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 438
438
HorizontalAlignment =" Center"
439
439
Source =" {Binding PreviewImage}"
440
440
StretchDirection =" DownOnly"
441
- Visibility =" {Binding ShowPreviewImage, Converter={StaticResource BoolToVisibilityConverter} }" >
441
+ Visibility =" {Binding ShowPreviewImage}" >
442
442
<Image .Style>
443
443
<Style TargetType =" {x:Type Image}" >
444
444
<Setter Property =" MaxWidth" Value =" 96" />
Original file line number Diff line number Diff line change @@ -90,26 +90,18 @@ public Visibility ShowIcon
90
90
}
91
91
}
92
92
93
- public bool ShowPreviewImage
93
+ public Visibility ShowPreviewImage
94
94
{
95
95
get
96
96
{
97
- if ( ! string . IsNullOrEmpty ( Result . Preview . PreviewImagePath ) || Result . Preview . PreviewDelegate != null )
97
+ if ( PreviewImageAvailable )
98
98
{
99
- return true ;
99
+ return Visibility . Visible ;
100
100
}
101
101
else
102
102
{
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 ;
113
105
}
114
106
}
115
107
}
@@ -244,7 +236,7 @@ public void LoadPreviewImage()
244
236
{
245
237
if ( ShowDefaultPreview == Visibility . Visible )
246
238
{
247
- if ( ! PreviewImageLoaded && ShowPreviewImage )
239
+ if ( ! PreviewImageLoaded && ShowPreviewImage == Visibility . Visible )
248
240
{
249
241
PreviewImageLoaded = true ;
250
242
_ = LoadPreviewImageAsync ( ) ;
Original file line number Diff line number Diff line change 9
9
using System . Windows . Data ;
10
10
using System . Windows . Documents ;
11
11
using System . Windows . Input ;
12
- using JetBrains . Annotations ;
13
12
14
13
namespace Flow . Launcher . ViewModel
15
14
{
You can’t perform that action at this time.
0 commit comments