Skip to content
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
1 change: 1 addition & 0 deletions src/Languages/lang_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@
"Close UniGetUI to the system tray": "Close UniGetUI to the system tray",
"Manage UniGetUI autostart behaviour": "Manage UniGetUI autostart behaviour",
"Show package icons on package lists": "Show package icons on package lists",
"Show illustrations on package lists": "Show illustrations on package lists",
"Clear cache": "Clear cache",
"Select upgradable packages by default": "Select upgradable packages by default",
"Light": "Light",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ partial void OnIsFilterPaneOpenChanged(bool value)
private readonly string _noPackagesSubtitleBase;
private readonly string _stillLoadingSubtitle;
private readonly bool _showLastCheckedTime;
private readonly bool _showPackageIllustrations;
private DateTime _lastLoadTime = DateTime.Now;

protected AbstractPackageLoader Loader;
Expand Down Expand Up @@ -219,9 +220,10 @@ public PackagesPageViewModel(PackagesPageData data)
DisableReload = data.DisableReload;
LoadsOnStart = !data.DisableAutomaticPackageLoadOnStart;
_showLastCheckedTime = data.ShowLastLoadTime;
_showPackageIllustrations = !Settings.Get(Settings.K.DisablePackageIllustrations);
NoPackagesText = data.NoPackages_BackgroundText;
NoMatchesText = data.NoMatches_BackgroundText;
if (!string.IsNullOrEmpty(data.NoPackages_ImagePath))
if (_showPackageIllustrations && !string.IsNullOrEmpty(data.NoPackages_ImagePath))
{
using var stream = AssetLoader.Open(new Uri(data.NoPackages_ImagePath));
NoPackagesImage = new Bitmap(stream);
Expand Down Expand Up @@ -561,7 +563,7 @@ public void FilterPackages(bool fromQuery = false)
{
BackgroundText = _stillLoadingSubtitle;
BackgroundTextVisible = true;
LoadingImageVisible = true;
LoadingImageVisible = _showPackageIllustrations;
NoPackagesImageVisible = false;
}
else if (FilteredPackages.Count == 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@
StateChangedCommand="{Binding ShowRestartRequiredCommand}"
CornerRadius="8,8,0,0"/>

<settings:CheckboxCard SettingName="DisablePackageIllustrations"
Text="{t:Translate Show illustrations on package lists}"
WarningText="{t:Translate Restart UniGetUI to apply this change}"
StateChangedCommand="{Binding ShowRestartRequiredCommand}"
CornerRadius="0"
BorderThickness="1,0,1,1"/>

<settings:ButtonCard x:Name="ResetIconCache"
CornerRadius="0,0,8,8"
BorderThickness="1,0,1,1"
Expand Down
2 changes: 2 additions & 0 deletions src/UniGetUI.Core.Settings/SettingsEngine_Names.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public enum K
DisableWinGetMalfunctionDetector,
EnableBackupTimestamping,
DisableIconsOnPackageLists,
DisablePackageIllustrations,
ProxyURL,
ProxyUsername,
PreferredLanguage,
Expand Down Expand Up @@ -156,6 +157,7 @@ public static string ResolveKey(K key)
K.DisableWinGetMalfunctionDetector => "DisableWinGetMalfunctionDetector",
K.EnableBackupTimestamping => "EnableBackupTimestamping",
K.DisableIconsOnPackageLists => "DisableIconsOnPackageLists",
K.DisablePackageIllustrations => "DisablePackageIllustrations",
K.ProxyURL => "ProxyURL",
K.ProxyUsername => "ProxyUsername",
K.PreferredLanguage => "PreferredLanguage",
Expand Down
Loading