From 8ee6aa34bd57b107674e339837e3a869f02a4f2d Mon Sep 17 00:00:00 2001
From: Yair <39923744+yaira2@users.noreply.github.com>
Date: Wed, 21 Dec 2022 14:07:11 -0500
Subject: [PATCH] Feature: Refactoring the preview pane
---
src/Files.App/Constants.cs | 18 --
.../UserControls/Pane/PreviewPane.xaml | 168 ++++++------------
2 files changed, 52 insertions(+), 134 deletions(-)
diff --git a/src/Files.App/Constants.cs b/src/Files.App/Constants.cs
index 9638785abd39..fdc78771ef36 100644
--- a/src/Files.App/Constants.cs
+++ b/src/Files.App/Constants.cs
@@ -174,24 +174,6 @@ public static class PreviewPane
/// The maximum file size, in bytes, that will attempted to be loaded as text if the extension is unknown.
///
public const long TryLoadAsTextSizeLimit = 500000;
-
- ///
- /// The number of thumbnails that will be shown for FolderPreviews
- ///
- public const int FolderPreviewThumbnailCount = 10;
- }
-
- public static class PaneContent
- {
- public const string ContentKey = "PaneContent";
-
- public const string HorizontalSizePxKey = "PaneHorizontalSizePx";
-
- public const string VerticalSizePxKey = "PaneVerticalSizePx";
-
- public const string MediaVolumeKey = "PaneMediaVolume";
-
- public const string ShowPreviewOnlyKey = "ShowPreviewOnly";
}
public static class ResourceFilePaths
diff --git a/src/Files.App/UserControls/Pane/PreviewPane.xaml b/src/Files.App/UserControls/Pane/PreviewPane.xaml
index 52d60328ea55..1c9e0c668d5e 100644
--- a/src/Files.App/UserControls/Pane/PreviewPane.xaml
+++ b/src/Files.App/UserControls/Pane/PreviewPane.xaml
@@ -38,17 +38,10 @@
Height="3*"
MinHeight="100" />
-
-
-
-
@@ -88,108 +81,59 @@
Visibility="Collapsed" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+ MaxLines="2"
+ Style="{StaticResource BodyTextBlockStyle}"
+ Text="{x:Bind Name, Mode=OneWay}" />
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -204,7 +148,6 @@
-
@@ -217,8 +160,6 @@
-
-
@@ -229,7 +170,6 @@
-
@@ -241,7 +181,6 @@
-
@@ -260,10 +199,7 @@
-
-
-
-
+