Skip to content

Commit 5ba7ad0

Browse files
authored
Feature: Removed web shortcut icon placeholder (#14913)
1 parent e853f42 commit 5ba7ad0

File tree

9 files changed

+6
-75
lines changed

9 files changed

+6
-75
lines changed

src/Files.App/Data/Items/ListedItem.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,6 @@ public bool LoadFileIcon
7070
set => SetProperty(ref loadFileIcon, value);
7171
}
7272

73-
private bool loadWebShortcutGlyph;
74-
public bool LoadWebShortcutGlyph
75-
{
76-
get => loadWebShortcutGlyph;
77-
set => SetProperty(ref loadWebShortcutGlyph, value);
78-
}
79-
8073
private bool loadCustomIcon;
8174
public bool LoadCustomIcon
8275
{
@@ -176,7 +169,6 @@ public BitmapImage FileImage
176169
{
177170
LoadFileIcon = true;
178171
NeedsPlaceholderGlyph = false;
179-
LoadWebShortcutGlyph = false;
180172
}
181173
}
182174
}

src/Files.App/Data/Models/SelectedItemsPropertiesViewModel.cs

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
using Files.Shared.Helpers;
66
using System.Windows.Input;
77
using TagLib;
8-
using Windows.Storage;
9-
using Windows.Storage.FileProperties;
10-
using Windows.Storage.Pickers;
118

129
namespace Files.App.Data.Models
1310
{
@@ -484,7 +481,7 @@ public ICommand FormatDriveCommand
484481
get => formatDriveCommand;
485482
set => SetProperty(ref formatDriveCommand, value);
486483
}
487-
484+
488485
private ICommand editAlbumCoverCommand;
489486
public ICommand EditAlbumCoverCommand
490487
{
@@ -522,7 +519,7 @@ public bool IsItemSelected
522519

523520
public SelectedItemsPropertiesViewModel()
524521
{
525-
522+
526523
}
527524

528525
private bool isSelectedItemImage = false;
@@ -632,13 +629,6 @@ public bool ShortcutItemArgumentsVisibility
632629
set => SetProperty(ref shortcutItemArgumentsVisibility, value);
633630
}
634631

635-
private bool loadLinkIcon;
636-
public bool LoadLinkIcon
637-
{
638-
get => loadLinkIcon;
639-
set => SetProperty(ref loadLinkIcon, value);
640-
}
641-
642632
private RelayCommand shortcutItemOpenLinkCommand;
643633
public RelayCommand ShortcutItemOpenLinkCommand
644634
{
@@ -771,21 +761,21 @@ public bool IsUnblockFileSelected
771761
get => isUnblockFileSelected;
772762
set => SetProperty(ref isUnblockFileSelected, value);
773763
}
774-
764+
775765
private bool isAblumCoverModified;
776766
public bool IsAblumCoverModified
777767
{
778768
get => isAblumCoverModified;
779769
set => SetProperty(ref isAblumCoverModified, value);
780770
}
781-
771+
782772
private bool isEditAlbumCoverVisible;
783773
public bool IsEditAlbumCoverVisible
784774
{
785775
get => isEditAlbumCoverVisible;
786776
set => SetProperty(ref isEditAlbumCoverVisible, value);
787777
}
788-
778+
789779
private Picture modifiedAlbumCover;
790780
public Picture ModifiedAlbumCover
791781
{

src/Files.App/UserControls/FileIcon.xaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,6 @@
4343
x:Load="{x:Bind ViewModel.LoadCustomIcon, Mode=OneWay}"
4444
Source="{x:Bind CustomIconImageSource}" />
4545

46-
<FontIcon
47-
x:Name="WebShortcutGlyph"
48-
HorizontalAlignment="Left"
49-
VerticalAlignment="Stretch"
50-
x:Load="{x:Bind ViewModel.LoadLinkIcon, Mode=OneWay}"
51-
FontSize="{x:Bind ItemSize}"
52-
Glyph="&#xE71B;" />
53-
5446
<Image
5547
x:Name="ItemIcon"
5648
Height="{x:Bind ItemSize}"

src/Files.App/Utils/Storage/Enumerators/UniversalStorageEnumerator.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,6 @@ public static async Task<ListedItem> AddFileAsync(
282282
Opacity = 1,
283283
FileImage = null,
284284
LoadFileIcon = itemThumbnailImgVis,
285-
LoadWebShortcutGlyph = isUrl,
286285
ItemNameRaw = itemName,
287286
ItemDateModifiedReal = itemModifiedDate,
288287
ItemDateCreatedReal = itemCreatedDate,

src/Files.App/Utils/Storage/Enumerators/Win32StorageEnumerator.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
using Files.Core.Services.SizeProvider;
55
using Files.Shared.Helpers;
6-
using Microsoft.UI.Xaml.Media.Imaging;
76
using System.IO;
87
using Vanara.PInvoke;
98
using Windows.Storage;
@@ -287,7 +286,6 @@ CancellationToken cancellationToken
287286
Opacity = opacity,
288287
FileImage = null,
289288
LoadFileIcon = itemThumbnailImgVis,
290-
LoadWebShortcutGlyph = false,
291289
ItemNameRaw = itemName,
292290
ItemDateModifiedReal = itemModifiedDate,
293291
ItemDateAccessedReal = itemLastAccessDate,
@@ -316,7 +314,6 @@ CancellationToken cancellationToken
316314
Opacity = opacity,
317315
FileImage = null,
318316
LoadFileIcon = !shInfo.IsFolder && itemThumbnailImgVis,
319-
LoadWebShortcutGlyph = !shInfo.IsFolder && isUrl && itemEmptyImgVis,
320317
ItemNameRaw = itemName,
321318
ItemDateModifiedReal = itemModifiedDate,
322319
ItemDateAccessedReal = itemLastAccessDate,

src/Files.App/ViewModels/Properties/Items/FileProperties.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ public override async Task GetSpecialPropertiesAsync()
123123
{
124124
ViewModel.ItemCreatedTimestampReal = Item.ItemDateCreatedReal;
125125
ViewModel.ItemAccessedTimestampReal = Item.ItemDateAccessedReal;
126-
ViewModel.LoadLinkIcon = Item.LoadWebShortcutGlyph;
127126
if (Item.IsLinkItem || string.IsNullOrWhiteSpace(((ShortcutItem)Item).TargetPath))
128127
{
129128
// Can't show any other property

src/Files.App/Views/Layouts/ColumnLayoutPage.xaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -260,15 +260,7 @@
260260
x:Load="True"
261261
Source="{x:Bind IconOverlay, Mode=OneWay}"
262262
Stretch="Uniform" />
263-
<Viewbox
264-
x:Name="WebShortcutGlyph"
265-
MaxWidth="20"
266-
MaxHeight="20"
267-
HorizontalAlignment="Stretch"
268-
VerticalAlignment="Stretch"
269-
Visibility="{x:Bind LoadWebShortcutGlyph, Mode=OneWay}">
270-
<FontIcon FontSize="20" Glyph="&#xE71B;" />
271-
</Viewbox>
263+
272264
<Border
273265
x:Name="ShortcutGlyphElement"
274266
HorizontalAlignment="Left"

src/Files.App/Views/Layouts/DetailsLayoutPage.xaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -940,10 +940,6 @@
940940
Margin="2"
941941
x:Load="{x:Bind NeedsPlaceholderGlyph, Mode=OneWay}" />
942942

943-
<FontIcon
944-
x:Name="WebShortcutGlyph"
945-
x:Load="{x:Bind LoadWebShortcutGlyph, Mode=OneWay}"
946-
Glyph="&#xE71B;" />
947943
<Image
948944
x:Name="IconOverlay"
949945
Width="16"

src/Files.App/Views/Layouts/GridLayoutPage.xaml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -149,18 +149,6 @@
149149
Source="{x:Bind IconOverlay, Mode=OneWay}"
150150
Stretch="Uniform" />
151151

152-
<Viewbox
153-
x:Name="WebShortcutGlyph"
154-
MaxWidth="{Binding ElementName=PageRoot, Path=ItemWidthGridView, Mode=OneWay}"
155-
MaxHeight="{Binding ElementName=PageRoot, Path=ItemWidthGridView, Mode=OneWay}"
156-
Margin="12"
157-
HorizontalAlignment="Stretch"
158-
VerticalAlignment="Stretch"
159-
x:Load="{x:Bind LoadWebShortcutGlyph, Mode=OneWay}"
160-
x:Phase="1">
161-
<FontIcon FontSize="28" Glyph="&#xE71B;" />
162-
</Viewbox>
163-
164152
<Viewbox
165153
x:Name="ShortcutGlyphElement"
166154
Width="16"
@@ -336,10 +324,6 @@
336324
Margin="2"
337325
x:Load="{x:Bind NeedsPlaceholderGlyph, Mode=OneWay}" />
338326

339-
<FontIcon
340-
x:Name="WebShortcutGlyph"
341-
x:Load="{x:Bind LoadWebShortcutGlyph, Mode=OneWay}"
342-
Glyph="&#xE71B;" />
343327
<Image
344328
x:Name="IconOverlay"
345329
Width="16"
@@ -538,16 +522,6 @@
538522
Source="{x:Bind IconOverlay, Mode=OneWay}"
539523
Stretch="Uniform" />
540524

541-
<Viewbox
542-
x:Name="WebShortcutGlyph"
543-
MaxWidth="60"
544-
HorizontalAlignment="Center"
545-
VerticalAlignment="Center"
546-
x:Load="{x:Bind LoadWebShortcutGlyph, Mode=OneWay}"
547-
x:Phase="1">
548-
<FontIcon FontSize="28" Glyph="&#xE71B;" />
549-
</Viewbox>
550-
551525
<Viewbox
552526
x:Name="ShortcutGlyphElement"
553527
Width="16"

0 commit comments

Comments
 (0)