Adds unlit color to hidden file system browser dialog elements.

This commit is contained in:
BinaryAlley committed 2026-11-15 13:53:23 +02:00
1 parent 3f7cc2c60f
commit b46dce745b
58 files changed
+855 -360

No files matched your search

@@ -22,12 +22,14 @@ public class DirectoryDtoFixture
/// </summary>
/// <param name="path">Optional. The full path to the directory.</param>
/// <param name="name">Optional. The name of the directory.</param>
/// <param name="isHidden">Optional. Whether the directory is hidden. If not provided, a random value is generated.</param>
/// <param name="items">Optional. The children items of the directory.</param>
/// <param name="includeItems">Whether the children items should be included, or forced to an empty collection.</param>
/// <returns>The created <see cref="DirectoryDto"/>.</returns>
public DirectoryDto Create(
string? path = null,
string? name = null,
bool? isHidden = null,
List<FileSystemItemDto>? items = null,
bool includeItems = false)
{
@@ -38,6 +40,7 @@ public class DirectoryDtoFixture
Name = name ?? Path.GetFileName(generatedPath),
DateCreated = _faker.Date.Past(),
DateModified = _faker.Date.Recent(),
IsHidden = isHidden ?? _faker.Random.Bool(),
Items = includeItems ? (items ?? []) : []
};
}
@@ -23,11 +23,13 @@ public class FileDtoFixture
/// <param name="path">Optional. The full path to the file.</param>
/// <param name="name">Optional. The name of the file.</param>
/// <param name="size">Optional. The size of the file, in bytes.</param>
/// <param name="isHidden">Optional. Whether the file is hidden. If not provided, a random value is generated.</param>
/// <returns>A configured <see cref="FileDto"/> instance.</returns>
public FileDto Create(
string? path = null,
string? name = null,
long? size = null)
long? size = null,
bool? isHidden = null)
{
string generatedPath = _faker.System.FilePath();
return new FileDto
@@ -36,6 +38,7 @@ public class FileDtoFixture
Name = name ?? Path.GetFileName(generatedPath),
DateCreated = _faker.Date.Past(),
DateModified = _faker.Date.Recent(),
IsHidden = isHidden ?? _faker.Random.Bool(),
Size = size ?? _faker.Random.Long(0, 10_000_000)
};
}
@@ -24,11 +24,13 @@ public class FileSystemTreeNodeDtoFixture
/// <param name="path">Optional. The full path of the file or directory.</param>
/// <param name="name">Optional. The name of the file or directory.</param>
/// <param name="itemType">Optional. The type of the item, indicating whether it is a file, directory, or drive.</param>
/// <param name="isHidden">Optional. Whether the node is hidden. If not provided, a random value is generated.</param>
/// <returns>A configured <see cref="FileSystemTreeNodeDto"/> instance.</returns>
public FileSystemTreeNodeDto Create(
string? path = null,
string? name = null,
FileSystemItemType? itemType = null)
FileSystemItemType? itemType = null,
bool? isHidden = null)
{
string generatedPath = _faker.System.FilePath();
return new FileSystemTreeNodeDto
@@ -36,6 +38,7 @@ public class FileSystemTreeNodeDtoFixture
Path = path ?? generatedPath,
Name = name ?? Path.GetFileName(generatedPath),
ItemType = itemType ?? _faker.PickRandom<FileSystemItemType>(),
IsHidden = isHidden ?? _faker.Random.Bool(),
IsExpanded = _faker.Random.Bool(),
ChildrenLoaded = _faker.Random.Bool(),
Children = []