Skip to content

Feature: Removed web shortcut icon placeholder #14913

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions src/Files.App/Data/Items/ListedItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,6 @@ public bool LoadFileIcon
set => SetProperty(ref loadFileIcon, value);
}

private bool loadWebShortcutGlyph;
public bool LoadWebShortcutGlyph
{
get => loadWebShortcutGlyph;
set => SetProperty(ref loadWebShortcutGlyph, value);
}

private bool loadCustomIcon;
public bool LoadCustomIcon
{
Expand Down Expand Up @@ -176,7 +169,6 @@ public BitmapImage FileImage
{
LoadFileIcon = true;
NeedsPlaceholderGlyph = false;
LoadWebShortcutGlyph = false;
}
}
}
Expand Down
20 changes: 5 additions & 15 deletions src/Files.App/Data/Models/SelectedItemsPropertiesViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
using Files.Shared.Helpers;
using System.Windows.Input;
using TagLib;
using Windows.Storage;
using Windows.Storage.FileProperties;
using Windows.Storage.Pickers;

namespace Files.App.Data.Models
{
Expand Down Expand Up @@ -484,7 +481,7 @@ public ICommand FormatDriveCommand
get => formatDriveCommand;
set => SetProperty(ref formatDriveCommand, value);
}

private ICommand editAlbumCoverCommand;
public ICommand EditAlbumCoverCommand
{
Expand Down Expand Up @@ -522,7 +519,7 @@ public bool IsItemSelected

public SelectedItemsPropertiesViewModel()
{

}

private bool isSelectedItemImage = false;
Expand Down Expand Up @@ -632,13 +629,6 @@ public bool ShortcutItemArgumentsVisibility
set => SetProperty(ref shortcutItemArgumentsVisibility, value);
}

private bool loadLinkIcon;
public bool LoadLinkIcon
{
get => loadLinkIcon;
set => SetProperty(ref loadLinkIcon, value);
}

private RelayCommand shortcutItemOpenLinkCommand;
public RelayCommand ShortcutItemOpenLinkCommand
{
Expand Down Expand Up @@ -771,21 +761,21 @@ public bool IsUnblockFileSelected
get => isUnblockFileSelected;
set => SetProperty(ref isUnblockFileSelected, value);
}

private bool isAblumCoverModified;
public bool IsAblumCoverModified
{
get => isAblumCoverModified;
set => SetProperty(ref isAblumCoverModified, value);
}

private bool isEditAlbumCoverVisible;
public bool IsEditAlbumCoverVisible
{
get => isEditAlbumCoverVisible;
set => SetProperty(ref isEditAlbumCoverVisible, value);
}

private Picture modifiedAlbumCover;
public Picture ModifiedAlbumCover
{
Expand Down
8 changes: 0 additions & 8 deletions src/Files.App/UserControls/FileIcon.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,6 @@
x:Load="{x:Bind ViewModel.LoadCustomIcon, Mode=OneWay}"
Source="{x:Bind CustomIconImageSource}" />

<FontIcon
x:Name="WebShortcutGlyph"
HorizontalAlignment="Left"
VerticalAlignment="Stretch"
x:Load="{x:Bind ViewModel.LoadLinkIcon, Mode=OneWay}"
FontSize="{x:Bind ItemSize}"
Glyph="&#xE71B;" />

<Image
x:Name="ItemIcon"
Height="{x:Bind ItemSize}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ public static async Task<ListedItem> AddFileAsync(
Opacity = 1,
FileImage = null,
LoadFileIcon = itemThumbnailImgVis,
LoadWebShortcutGlyph = isUrl,
ItemNameRaw = itemName,
ItemDateModifiedReal = itemModifiedDate,
ItemDateCreatedReal = itemCreatedDate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using Files.Core.Services.SizeProvider;
using Files.Shared.Helpers;
using Microsoft.UI.Xaml.Media.Imaging;
using System.IO;
using Vanara.PInvoke;
using Windows.Storage;
Expand Down Expand Up @@ -287,7 +286,6 @@ CancellationToken cancellationToken
Opacity = opacity,
FileImage = null,
LoadFileIcon = itemThumbnailImgVis,
LoadWebShortcutGlyph = false,
ItemNameRaw = itemName,
ItemDateModifiedReal = itemModifiedDate,
ItemDateAccessedReal = itemLastAccessDate,
Expand Down Expand Up @@ -316,7 +314,6 @@ CancellationToken cancellationToken
Opacity = opacity,
FileImage = null,
LoadFileIcon = !shInfo.IsFolder && itemThumbnailImgVis,
LoadWebShortcutGlyph = !shInfo.IsFolder && isUrl && itemEmptyImgVis,
ItemNameRaw = itemName,
ItemDateModifiedReal = itemModifiedDate,
ItemDateAccessedReal = itemLastAccessDate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ public override async Task GetSpecialPropertiesAsync()
{
ViewModel.ItemCreatedTimestampReal = Item.ItemDateCreatedReal;
ViewModel.ItemAccessedTimestampReal = Item.ItemDateAccessedReal;
ViewModel.LoadLinkIcon = Item.LoadWebShortcutGlyph;
if (Item.IsLinkItem || string.IsNullOrWhiteSpace(((ShortcutItem)Item).TargetPath))
{
// Can't show any other property
Expand Down
10 changes: 1 addition & 9 deletions src/Files.App/Views/Layouts/ColumnLayoutPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -260,15 +260,7 @@
x:Load="True"
Source="{x:Bind IconOverlay, Mode=OneWay}"
Stretch="Uniform" />
<Viewbox
x:Name="WebShortcutGlyph"
MaxWidth="20"
MaxHeight="20"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Visibility="{x:Bind LoadWebShortcutGlyph, Mode=OneWay}">
<FontIcon FontSize="20" Glyph="&#xE71B;" />
</Viewbox>

<Border
x:Name="ShortcutGlyphElement"
HorizontalAlignment="Left"
Expand Down
4 changes: 0 additions & 4 deletions src/Files.App/Views/Layouts/DetailsLayoutPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -940,10 +940,6 @@
Margin="2"
x:Load="{x:Bind NeedsPlaceholderGlyph, Mode=OneWay}" />

<FontIcon
x:Name="WebShortcutGlyph"
x:Load="{x:Bind LoadWebShortcutGlyph, Mode=OneWay}"
Glyph="&#xE71B;" />
<Image
x:Name="IconOverlay"
Width="16"
Expand Down
26 changes: 0 additions & 26 deletions src/Files.App/Views/Layouts/GridLayoutPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,18 +149,6 @@
Source="{x:Bind IconOverlay, Mode=OneWay}"
Stretch="Uniform" />

<Viewbox
x:Name="WebShortcutGlyph"
MaxWidth="{Binding ElementName=PageRoot, Path=ItemWidthGridView, Mode=OneWay}"
MaxHeight="{Binding ElementName=PageRoot, Path=ItemWidthGridView, Mode=OneWay}"
Margin="12"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
x:Load="{x:Bind LoadWebShortcutGlyph, Mode=OneWay}"
x:Phase="1">
<FontIcon FontSize="28" Glyph="&#xE71B;" />
</Viewbox>

<Viewbox
x:Name="ShortcutGlyphElement"
Width="16"
Expand Down Expand Up @@ -336,10 +324,6 @@
Margin="2"
x:Load="{x:Bind NeedsPlaceholderGlyph, Mode=OneWay}" />

<FontIcon
x:Name="WebShortcutGlyph"
x:Load="{x:Bind LoadWebShortcutGlyph, Mode=OneWay}"
Glyph="&#xE71B;" />
<Image
x:Name="IconOverlay"
Width="16"
Expand Down Expand Up @@ -538,16 +522,6 @@
Source="{x:Bind IconOverlay, Mode=OneWay}"
Stretch="Uniform" />

<Viewbox
x:Name="WebShortcutGlyph"
MaxWidth="60"
HorizontalAlignment="Center"
VerticalAlignment="Center"
x:Load="{x:Bind LoadWebShortcutGlyph, Mode=OneWay}"
x:Phase="1">
<FontIcon FontSize="28" Glyph="&#xE71B;" />
</Viewbox>

<Viewbox
x:Name="ShortcutGlyphElement"
Width="16"
Expand Down