From 89e3d03d148c57029bcceeef7970a554c38336d2 Mon Sep 17 00:00:00 2001
From: 0x5BFA <62196528+0x5bfa@users.noreply.github.com>
Date: Thu, 10 Aug 2023 09:14:38 +0900
Subject: [PATCH] Feature: Updated the design of the home page headers (#13053)
---
.../UserControls/AddressToolbar.xaml | 2 +-
.../UserControls/Widgets/DrivesWidget.xaml | 2 +-
.../UserControls/Widgets/FileTagsWidget.xaml | 1 -
.../Widgets/QuickAccessWidget.xaml | 2 -
.../Widgets/RecentFilesWidget.xaml | 4 +-
.../Widgets/WidgetsListControl.xaml | 436 ++++++++++++++----
.../Widgets/WidgetsListControl.xaml.cs | 12 +-
7 files changed, 356 insertions(+), 103 deletions(-)
diff --git a/src/Files.App/UserControls/AddressToolbar.xaml b/src/Files.App/UserControls/AddressToolbar.xaml
index 6ad32f8242f0..386c91b909a9 100644
--- a/src/Files.App/UserControls/AddressToolbar.xaml
+++ b/src/Files.App/UserControls/AddressToolbar.xaml
@@ -631,4 +631,4 @@
-
+
\ No newline at end of file
diff --git a/src/Files.App/UserControls/Widgets/DrivesWidget.xaml b/src/Files.App/UserControls/Widgets/DrivesWidget.xaml
index 3605128e1c5c..086bbf5a898d 100644
--- a/src/Files.App/UserControls/Widgets/DrivesWidget.xaml
+++ b/src/Files.App/UserControls/Widgets/DrivesWidget.xaml
@@ -1,4 +1,4 @@
-
+
@@ -12,7 +11,6 @@
diff --git a/src/Files.App/UserControls/Widgets/RecentFilesWidget.xaml b/src/Files.App/UserControls/Widgets/RecentFilesWidget.xaml
index 68ae6129d054..c1fc2776e4af 100644
--- a/src/Files.App/UserControls/Widgets/RecentFilesWidget.xaml
+++ b/src/Files.App/UserControls/Widgets/RecentFilesWidget.xaml
@@ -1,4 +1,4 @@
-
+
-
+
\ No newline at end of file
diff --git a/src/Files.App/UserControls/Widgets/WidgetsListControl.xaml b/src/Files.App/UserControls/Widgets/WidgetsListControl.xaml
index b37be02acc94..7bdee43d072d 100644
--- a/src/Files.App/UserControls/Widgets/WidgetsListControl.xaml
+++ b/src/Files.App/UserControls/Widgets/WidgetsListControl.xaml
@@ -3,18 +3,27 @@
x:Class="Files.App.UserControls.Widgets.WidgetsListControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:controls="using:Microsoft.UI.Xaml.Controls"
+ xmlns:animatedvisuals="using:Microsoft.UI.Xaml.Controls.AnimatedVisuals"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:helpers="using:Files.App.Helpers"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="using:Files.App.ViewModels.Widgets"
- d:DesignHeight="300"
- d:DesignWidth="400"
+ DataContext="{x:Bind ViewModel, Mode=OneWay}"
mc:Ignorable="d">
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ Content="{x:Bind WidgetControl, Mode=OneWay}" />
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
-
\ No newline at end of file
+
+
diff --git a/src/Files.App/UserControls/Widgets/WidgetsListControl.xaml.cs b/src/Files.App/UserControls/Widgets/WidgetsListControl.xaml.cs
index 5ec8637634a2..d9c1795616f0 100644
--- a/src/Files.App/UserControls/Widgets/WidgetsListControl.xaml.cs
+++ b/src/Files.App/UserControls/Widgets/WidgetsListControl.xaml.cs
@@ -5,23 +5,17 @@
using Microsoft.UI.Xaml.Controls;
using System;
-// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
-
namespace Files.App.UserControls.Widgets
{
public sealed partial class WidgetsListControl : UserControl, IDisposable
{
- public WidgetsListControlViewModel ViewModel
- {
- get => (WidgetsListControlViewModel)DataContext;
- set => DataContext = value;
- }
+ public WidgetsListControlViewModel ViewModel { get; set; }
public WidgetsListControl()
{
InitializeComponent();
- ViewModel = new WidgetsListControlViewModel();
+ ViewModel = new();
}
public void Dispose()
@@ -29,4 +23,4 @@ public void Dispose()
ViewModel?.Dispose();
}
}
-}
\ No newline at end of file
+}